/* Components CSS - ВИПРАВЛЕНИЙ СКРОЛ DEPLOY СЕКЦІЇ + MULTIWALLET СТИЛІ */

/* Compiler секція */
.compiler-config {
    padding: 16px;
    overflow-y: auto;
}

.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    font-size: 12px;
    margin-bottom: 6px;
    color: var(--text-main);
    font-weight: 500;
}

.form-control {
    width: 100%;
    padding: 6px 8px;
    background: var(--bg-input);
    border: 1px solid var(--border-strong);
    border-radius: 4px;
    color: var(--text-main);
    font-size: 12px;
}

.form-control:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 1px var(--accent);
}

.checkbox-group {
    display: flex;
    align-items: center;
    gap: 6px;
}

.checkbox-group input[type="checkbox"] {
    width: 14px;
    height: 14px;
}

.checkbox-group label {
    margin: 0;
    font-size: 12px;
    cursor: pointer;
}

/* Кнопки */
.remix-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    width: 100%;
    justify-content: center;
}

.remix-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.remix-btn-primary {
    background: var(--accent);
    color: white;
}

.remix-btn-primary:hover:not(:disabled) {
    background: var(--accent-hover);
}

.remix-btn-orange {
    background: #f6851b;
    color: white;
}

.remix-btn-orange:hover:not(:disabled) {
    background: #e2761b;
}

.remix-btn-secondary {
    background: var(--btn-secondary);
    color: white;
}

.remix-btn-secondary:hover:not(:disabled) {
    background: var(--btn-secondary-hover);
}

.compile-button {
    margin-top: 8px;
}

/* ВИПРАВЛЕНА Deploy секція - правильний скрол */
.deploy-config {
    padding: 0;
    height: 100%;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.deploy-form-section {
    padding: 16px;
    flex-shrink: 0;
}

.constructor-params {
    margin-bottom: 16px;
}

.param-inputs {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.param-input {
    padding: 6px 8px;
    background: var(--bg-input);
    border: 1px solid var(--border-strong);
    border-radius: 4px;
    color: var(--text-main);
    font-size: 12px;
}

.account-balance {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 4px;
}

/* ВИПРАВЛЕНА Deployed Contracts секція */
.deployed-contracts {
    margin-top: 0;
    max-height: none;
    overflow-y: visible;
    padding: 0px 16px 8px 16px;
    flex: 1;
    min-height: 0;
}

.deployed-contracts h4 {
    font-size: 13px;
    color: var(--text-bright);
    margin-bottom: 12px;
}

.contract-address-input {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
}

.contract-address-input input {
    flex: 1;
}

.contract-address-input button {
    width: auto;
    min-width: 80px;
}

.contracts-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.deployed-contract {
    background: var(--bg-elevated);
    border: 1px solid var(--border-main);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 8px;
}

.contract-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    background: var(--bg-muted-2);
    cursor: pointer;
    min-height: 40px;
}

.contract-name {
    font-weight: 600;
    color: var(--text-bright);
    font-size: 12px;
    word-break: break-word;
}

.contract-address {
    font-size: 9px;
    color: var(--text-muted);
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 200px;
    margin-top: 2px;
}

.contract-name-row {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    justify-content: space-between;
}

.contract-name-row .contract-name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
}

.copy-address-btn {
    position: relative;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    height: 20px;
    padding: 0 8px;
    border: none;
    border-radius: 4px;
    background: var(--accent);
    color: #ffffff;
    font-size: 10px;
    font-weight: 600;
    font-family: inherit;
    letter-spacing: 0.3px;
    cursor: pointer;
    transition: background 0.15s;
}

.copy-address-btn:hover {
    background: var(--accent-hover);
}

.copy-address-btn.copied {
    background: #238636;
}

.copy-tooltip {
    position: absolute;
    z-index: 1000;
    bottom: calc(100% + 8px);
    right: 0;
    padding: 5px 10px;
    background: #1f6f33;
    color: #ffffff;
    font-size: 10px;
    font-weight: 600;
    white-space: nowrap;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    opacity: 0;
    visibility: hidden;
    transform: translateY(4px);
    transition: opacity 0.2s, transform 0.2s, visibility 0.2s;
    pointer-events: none;
}

.copy-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    right: 14px;
    border: 5px solid transparent;
    border-top-color: #1f6f33;
}

.copy-address-btn.copied .copy-tooltip {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* НОВІ СТИЛІ ФУНКЦІЙ КОНТРАКТІВ */
.contract-functions {
    padding: 8px;
    display: none;
    max-height: 300px;
    overflow-y: auto;
    background: var(--bg-panel);
}

.contract-functions.expanded {
    display: block;
}

/* Function with parameters - горизонтальний layout */
.function-item-horizontal {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    width: 100%;
    box-sizing: border-box;
}

/* Звичайні функції без параметрів */
.function-item {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    margin-bottom: 8px;
    width: 100%;
    box-sizing: border-box;
}

/* ВСІ КНОПКИ ФУНКЦІЙ - ПОКРАЩЕНИЙ ДИЗАЙН */
.function-button,
.function-button-small {
    background: #f6851b;
    color: white;
    border: 1px solid var(--border-main) !important;
    padding: 8px 8px 8px 6px !important;
    font-size: 10px !important;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s;
    white-space: nowrap;
    width: 50% !important;
    height: 36px !important;
    display: flex !important;
    align-items: center;
    justify-content: flex-start;
    border-radius: 4px !important;
    margin: 0 !important;
    flex-shrink: 0;
    text-transform: none !important;
    letter-spacing: normal !important;
    /* ВИПРАВЛЕННЯ OVERFLOW */
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    min-width: 0 !important;
}

/* Кольори кнопок */
.function-button.remix-btn-primary,
.function-button-small.remix-btn-primary {
    background: var(--accent) !important;
}

.function-button.remix-btn-orange,
.function-button-small.remix-btn-orange {
    background: #f6851b !important;
}

.function-button:hover,
.function-button-small:hover {
    filter: brightness(1.1);
}

/* Контейнер для dropdown параметрів */
.function-inputs-horizontal {
    flex: 1;
    background: var(--bg-input);
    border: 1px solid var(--border-soft);
    border-radius: 4px;
    height: 36px;
    position: relative;
    display: flex;
    align-items: center;
    width: 40%;
}

/* Dropdown стилі */
.function-param-dropdown {
    width: 100%;
    position: relative;
}

.function-param-type {
    color: var(--text-main);
    font-size: 11px;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    cursor: pointer;
    padding: 8px 8px;
    width: 100%;
    height: 36px;
    display: flex;
    align-items: center;
    background: transparent;
    border: none;
    transition: background-color 0.2s;
}

.function-param-type:hover {
    background: var(--scroll-thumb);
}

.function-dropdown-arrow {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 10px;
    pointer-events: none;
}

/* Input поле (показується при кліку) */
.function-param-input {
    width: 100%;
    background: var(--bg-input);
    border: 1px solid var(--border-soft);
    border-radius: 4px;
    color: var(--text-bright);
    font-size: 11px;
    padding: 8px 12px;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    display: none;
    height: 36px;
    box-sizing: border-box;
}

.function-param-input.active {
    display: block;
}

.function-param-input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 2px rgba(0, 122, 204, 0.2);
}

/* Результати функцій */
.function-result {
    padding: 6px 8px;
    background: var(--bg-deep);
    border-top: 1px solid var(--border-main);
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 10px;
    max-height: 80px;
    overflow-y: auto;
    word-break: break-all;
    line-height: 1.3;
    animation: fadeIn 0.2s ease-in;
}

.function-result a {
    color: var(--accent);
    text-decoration: none;
    word-break: break-all;
}

.function-result a:hover {
    text-decoration: underline;
}

/* Результати компіляції */
.compilation-output {
    background: var(--bg-base);
    border: 1px solid var(--border-main);
    border-radius: 4px;
    padding: 12px;
    margin-top: 12px;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 11px;
    max-height: 200px;
    overflow-y: auto;
}

.output-placeholder {
    color: var(--text-muted);
    text-align: center;
    padding: 16px;
}

.compilation-success {
    color: var(--success-strong);
}

.compilation-error {
    color: var(--danger-strong);
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
}

.modal-content {
    position: relative;
    background: var(--bg-elevated);
    border-radius: 8px;
    padding: 24px;
    max-width: 400px;
    width: 90%;
    max-height: 90vh;
    max-height: 90dvh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid var(--border-main);
}

.modal-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    flex-shrink: 0;
}

.modal-header h2 {
    color: var(--text-bright);
    font-size: 18px;
    font-weight: 600;
}

.modal-body {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    margin-bottom: 16px;
    padding-right: 12px;
}

.modal-body p {
    color: var(--text-main);
    line-height: 1.5;
}

.modal-footer {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    flex-shrink: 0;
}

.modal-footer .remix-btn {
    width: auto;
    min-width: 100px;
}

/* НОВІ СТИЛІ ДЛЯ MULTIWALLET МОДАЛЬНОГО ВІКНА */
.wallet-selection-modal {
    max-width: 480px;
    width: 95%;
}

.wallet-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
}

.wallet-option {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
    background: var(--bg-input);
    border: 2px solid var(--border-strong);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    width: 100%;
    text-align: left;
    color: var(--text-bright);
    font-size: 14px;
    font-weight: 500;
}

.wallet-option:hover {
    background: var(--scroll-thumb);
    border-color: var(--accent);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 122, 204, 0.2);
}

.wallet-option:active {
    transform: translateY(0);
}

.wallet-icon {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.08);
    flex-shrink: 0;
}

.wallet-icon svg {
    width: 22px;
    height: 22px;
    display: block;
}

.wallet-icon-fallback {
    font-size: 20px;
    line-height: 1;
}

.wallet-name {
    flex: 1;
    font-weight: 600;
    color: var(--text-bright);
}

.wallet-install-modal {
    max-width: 720px;
    width: 95%;
}

.wallet-install-modal .modal-header {
    margin-bottom: 8px;
}

.wallet-install-title-icon {
    font-size: 28px;
    line-height: 1;
}

.wallet-install-subtitle {
    color: var(--text-muted);
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 16px;
}

.wallet-install-options {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 12px;
    margin: 16px 0;
}

.wallet-install-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px;
    background: var(--bg-input);
    color: var(--text-bright);
    text-decoration: none;
    border-radius: 10px;
    border: 1px solid var(--border-strong);
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

.wallet-install-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 0.2s ease;
    background: linear-gradient(135deg, var(--wallet-brand-color) 0%, transparent 70%);
}

.wallet-install-btn:hover {
    transform: translateY(-2px);
    border-color: var(--wallet-brand-color);
    box-shadow: 0 6px 20px color-mix(in srgb, var(--wallet-brand-color) 25%, transparent);
}

.wallet-install-btn:hover::before {
    opacity: 0.12;
}

.wallet-install-icon {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: color-mix(in srgb, var(--wallet-brand-color) 15%, transparent);
    flex-shrink: 0;
    position: relative;
    z-index: 1;
}

.wallet-install-icon svg {
    width: 26px;
    height: 26px;
    display: block;
}

.wallet-install-icon .wallet-icon-fallback {
    font-size: 24px;
    line-height: 1;
}

.wallet-install-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
    min-width: 0;
    position: relative;
    z-index: 1;
}

.wallet-install-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-bright);
}

.wallet-install-desc {
    font-size: 12px;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.wallet-install-arrow {
    font-size: 16px;
    color: var(--text-muted);
    transition: transform 0.2s ease, color 0.2s ease;
    position: relative;
    z-index: 1;
}

.wallet-install-btn:hover .wallet-install-arrow {
    transform: translateX(3px);
    color: var(--wallet-brand-color);
}

/* Wallet brand colors */
.wallet-metamask    { --wallet-brand-color: #f6851b; }
.wallet-trust       { --wallet-brand-color: #3375bb; }
.wallet-phantom     { --wallet-brand-color: #ab9ff2; }
.wallet-okx         { --wallet-brand-color: #000000; }
.wallet-coinbase    { --wallet-brand-color: #0052ff; }
.wallet-rabby       { --wallet-brand-color: #ff6238; }
.wallet-exodus      { --wallet-brand-color: #00d395; }
.wallet-brave       { --wallet-brand-color: #ff4720; }
.wallet-rainbow     { --wallet-brand-color: #ff5b24; }
.wallet-bitget      { --wallet-brand-color: #00f0ff; }

/* Search, Debugger, Settings стилі - залишаю як є */
.search-config {
    padding: 16px;
    overflow-y: auto;
}

.search-input-group {
    display: flex;
    margin-bottom: 12px;
}

.search-input {
    flex: 1;
    padding: 8px 12px;
    background: var(--bg-input);
    border: 1px solid var(--border-strong);
    border-radius: 4px 0 0 4px;
    color: var(--text-main);
    font-size: 13px;
}

.search-input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 1px var(--accent);
}

.search-button {
    background: var(--accent);
    border: 1px solid var(--accent);
    border-radius: 0 4px 4px 0;
    color: white;
    padding: 8px 12px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.search-button:hover {
    background: var(--accent-hover);
}

.search-options {
    display: flex;
    gap: 16px;
    margin-bottom: 12px;
}

.search-option {
    display: flex;
    align-items: center;
    gap: 6px;
}

.search-option input[type="checkbox"] {
    width: 14px;
    height: 14px;
}

.search-option label {
    font-size: 12px;
    color: var(--text-main);
    cursor: pointer;
}

.search-tabs {
    display: flex;
    border-bottom: 1px solid var(--border-main);
    margin-bottom: 12px;
}

.search-tab {
    background: none;
    border: none;
    color: var(--text-main);
    padding: 8px 12px;
    cursor: pointer;
    font-size: 12px;
    border-bottom: 2px solid transparent;
    transition: all 0.2s;
}

.search-tab:hover {
    color: var(--text-bright);
    background: var(--bg-hover);
}

.search-tab.active {
    color: var(--accent);
    border-bottom-color: var(--accent);
}

.debugger-config {
    padding: 16px;
    overflow-y: auto;
    overflow-x: hidden;
}

.debug-tabs {
    display: flex;
    flex-wrap: wrap;
    border-bottom: 1px solid var(--border-main);
    margin-bottom: 16px;
    overflow: hidden;
}

/* Long labels - allow wrapping to a second row instead of scrolling */
.debug-tab {
    flex: 1 1 auto;
    min-width: 0;
    background: none;
    border: none;
    color: var(--text-main);
    padding: 8px 6px;
    cursor: pointer;
    font-size: 11px;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    border-bottom: 2px solid transparent;
    transition: all 0.2s;
}

.debug-tab:hover {
    color: var(--text-bright);
    background: var(--bg-hover);
}

.debug-tab.active {
    color: var(--accent);
    border-bottom-color: var(--accent);
}

.settings-config {
    padding: 16px;
    overflow-y: auto;
    overflow-x: hidden;
}

.settings-tabs {
    display: flex;
    flex-wrap: wrap;
    border-bottom: 1px solid var(--border-main);
    margin-bottom: 16px;
    overflow: hidden;
}

/* Tabs size to their own label and split the leftover space between them,
   so a long label like "Appearance" is never clipped to fit a rigid column. */
.settings-tab {
    flex: 1 1 auto;
    min-width: 0;
    background: none;
    border: none;
    color: var(--text-main);
    padding: 8px 4px;
    cursor: pointer;
    font-size: 11px;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    border-bottom: 2px solid transparent;
    transition: color 0.2s, background-color 0.2s, border-color 0.2s;
}

.settings-tab:hover {
    color: var(--text-bright);
    background: var(--bg-hover);
}

.settings-tab.active {
    color: var(--accent);
    border-bottom-color: var(--accent);
}

/* Settings panels - only the active one is shown */
.settings-panel {
    display: none;
}

.settings-panel.active {
    display: block;
}

/* Анімації */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Responsive правила */
@media (max-width: 768px) {
    .search-options {
        flex-direction: column;
        gap: 8px;
    }
    
    
    .wallet-options {
        gap: 8px;
    }
    
    .wallet-option {
        padding: 12px 16px;
        gap: 12px;
    }
    
    .wallet-icon {
        width: 32px;
        height: 32px;
    }

    .wallet-icon svg {
        width: 20px;
        height: 20px;
    }

    .wallet-icon-fallback {
        font-size: 18px;
    }

    .wallet-name {
        font-size: 13px;
    }

    .wallet-install-options {
        grid-template-columns: 1fr;
    }

    .wallet-install-btn {
        padding: 12px 14px;
    }

    .wallet-install-icon {
        width: 40px;
        height: 40px;
    }

    .wallet-install-icon svg {
        width: 24px;
        height: 24px;
    }

    .wallet-install-icon .wallet-icon-fallback {
        font-size: 22px;
    }

    .wallet-install-name {
        font-size: 13px;
    }

    .wallet-install-desc {
        font-size: 11px;
    }
}

@media (max-width: 1200px) {
    .function-button,
    .function-button-small {
        font-size: 10px !important;
        padding: 6px 6px !important;
    }
}

@media (max-width: 900px) {
    .function-button,
    .function-button-small {
        font-size: 9px !important;
        padding: 4px 8px !important;
    }
}

/* Scrollbars */
.contract-functions::-webkit-scrollbar {
    width: 4px;
}

.contract-functions::-webkit-scrollbar-track {
    background: var(--bg-base);
}

.contract-functions::-webkit-scrollbar-thumb {
    background: var(--scroll-thumb);
    border-radius: 2px;
}

.contract-functions::-webkit-scrollbar-thumb:hover {
    background: var(--scroll-thumb-hover);
}

.deploy-config::-webkit-scrollbar {
    width: 6px;
}

.deploy-config::-webkit-scrollbar-track {
    background: var(--bg-base);
}

.deploy-config::-webkit-scrollbar-thumb {
    background: var(--scroll-thumb);
    border-radius: 3px;
}

.deploy-config::-webkit-scrollbar-thumb:hover {
    background: var(--scroll-thumb-hover);
}

/* Settings action buttons */
.settings-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    align-items: center;
    flex-wrap: wrap;
    margin-top: 24px;
    padding-top: 16px;
    border-top: 1px solid var(--bg-input);
}


/* ═══════════════════════════════════════════
   Search - result list
   ═══════════════════════════════════════════ */

.search-results {
    display: flex;
    flex-direction: column;
}

.search-section h4 {
    margin: 0 0 8px 0;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    color: var(--text-muted);
}

.search-placeholder,
.search-loading,
.search-error {
    padding: 16px 8px;
    text-align: center;
    font-size: 12px;
    color: var(--text-muted);
}

.search-error {
    color: var(--danger);
}

/* File result */
.search-result-item {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 6px 8px;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.search-result-item:hover {
    background: var(--bg-hover-soft);
}

.search-result-icon {
    display: flex;
    flex-shrink: 0;
    margin-top: 2px;
    color: var(--accent);
}

.search-result-info {
    flex: 1;
    min-width: 0;
}

.search-result-name {
    font-size: 13px;
    color: var(--text-main);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.search-result-item:hover .search-result-name {
    color: var(--text-bright);
}

.search-result-path {
    margin-top: 2px;
    font-size: 11px;
    line-height: 1.4;
    color: var(--text-muted);
    overflow-wrap: anywhere;
}

.search-result-meta {
    margin-top: 2px;
    font-size: 11px;
    color: var(--text-dim);
}

/* Content search results */
.search-file-group {
    margin-bottom: 10px;
}

.search-file-header {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 8px;
    border-radius: 4px;
    cursor: pointer;
    color: var(--accent);
    transition: background-color 0.2s;
}

.search-file-header:hover {
    background: var(--bg-hover-soft);
}

.search-file-name {
    flex: 1;
    min-width: 0;
    font-size: 13px;
    color: var(--text-main);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.search-match-count {
    flex-shrink: 0;
    font-size: 10px;
    color: var(--text-dim);
}

.search-matches {
    padding-left: 12px;
    border-left: 1px solid var(--border-main);
    margin-left: 14px;
}

.search-match-item {
    display: flex;
    gap: 8px;
    padding: 3px 8px;
    border-radius: 4px;
    cursor: pointer;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', 'Consolas', monospace;
    font-size: 11px;
    transition: background-color 0.2s;
}

.search-match-item:hover {
    background: var(--bg-hover-soft);
}

.search-line-number {
    flex-shrink: 0;
    min-width: 28px;
    text-align: right;
    color: var(--text-dim);
}

.search-line-content {
    flex: 1;
    min-width: 0;
    color: var(--text-editor);
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.search-highlight {
    background: var(--accent);
    color: #ffffff;
    border-radius: 2px;
    padding: 0 1px;
}

.search-more-matches {
    padding: 4px 8px;
    font-size: 11px;
    font-style: italic;
    color: var(--text-dim);
}


/* ═══════════════════════════════════════════
   Debugger - panels and lists
   ═══════════════════════════════════════════ */

/* Only the active panel is shown */
.debug-panel {
    display: none;
}

.debug-panel.active {
    display: block;
}

.debug-section h4 {
    margin: 0 0 8px 0;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    color: var(--text-muted);
}

.debug-placeholder {
    padding: 16px 8px;
    text-align: center;
    font-size: 12px;
    color: var(--text-muted);
}

.transaction-list,
.call-stack-list,
.error-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

/* Shared look for entry cards */
.transaction-item,
.call-item,
.error-item {
    padding: 8px;
    background: var(--bg-elevated);
    border: 1px solid var(--border-main);
    border-radius: 4px;
    transition: background-color 0.2s;
}

.transaction-item,
.error-item {
    cursor: pointer;
}

.transaction-item:hover,
.error-item:hover {
    background: var(--bg-hover);
}

/* Card header */
.transaction-header,
.call-header,
.error-header {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 4px;
}

.transaction-status,
.call-status {
    flex-shrink: 0;
}

.transaction-type,
.call-function,
.error-type {
    flex: 1;
    min-width: 0;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-bright);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.transaction-time,
.call-time,
.error-time {
    flex-shrink: 0;
    font-size: 10px;
    color: var(--text-dim);
}

/* Card body */
.transaction-info,
.call-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    font-size: 11px;
    color: var(--text-muted);
}

.transaction-hash,
.call-contract {
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', 'Consolas', monospace;
    overflow-wrap: anywhere;
}

.transaction-function {
    color: var(--accent);
    overflow-wrap: anywhere;
}

.call-parameters {
    margin-top: 4px;
    padding-top: 4px;
    border-top: 1px solid var(--border-main);
    font-size: 10px;
    color: var(--text-dim);
    overflow-wrap: anywhere;
}

.error-type {
    color: var(--danger);
}

.error-message {
    font-size: 11px;
    line-height: 1.4;
    color: var(--text-main);
    overflow-wrap: anywhere;
}

.error-location {
    margin-top: 4px;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', 'Consolas', monospace;
    font-size: 10px;
    color: var(--text-dim);
    overflow-wrap: anywhere;
}

/* Gas Analytics */
.gas-analytics {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.gas-stat {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 8px;
    background: var(--bg-elevated);
    border: 1px solid var(--border-main);
    border-radius: 4px;
}

.gas-label {
    font-size: 12px;
    color: var(--text-main);
}

.gas-value {
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', 'Consolas', monospace;
    font-size: 12px;
    font-weight: 600;
    color: var(--accent);
}
