/* Главная и направления обмена: сайдбар выбора валют, таблица курсов, мобильный порядок блоков */
    .exchange-sidebar {
        background-color: var(--kn-panel);
        border-radius: var(--bs-border-radius);
        display: flex;
        flex-direction: column;
        height: 800px;
        overflow: hidden;
        border: 1px solid rgba(255, 255, 255, 0.08);
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    }
    @media (max-width: 991.98px) {
        .exchange-sidebar {
            height: 400px;
        }
    }
    .exchange-sidebar-title {
        text-align: center;
        padding: 20px 15px;
        font-weight: 600;
        font-size: 1.1rem;
        color: #fff;
        margin: 0;
    }
    .search-row {
        display: flex;
        padding: 0 15px 15px 15px;
        gap: 10px;
    }
    .search-box {
        flex: 1;
        position: relative;
    }
    .search-icon {
        position: absolute;
        left: 10px;
        top: 50%;
        transform: translateY(-50%);
        color: #6b7280;
        width: 14px;
        height: 14px;
        z-index: 2;
    }
    /* No-JS: иконка поиска из PNG-спрайта вместо inline SVG */
    .nojs-mode .search-icon.bi {
        font-size: 14px;
        line-height: 1;
    }
    .nojs-mode .search-icon.bi::before {
        vertical-align: top;
    }
    .search-input {
        background: var(--kn-inset);
        border: 1px solid var(--kn-border-strong);
        color: #fff;
        border-radius: var(--bs-border-radius);
        padding: 8px 30px 8px 30px;
        font-size: 0.8rem;
        width: 100%;
        transition: border-color 0.2s;
    }
    .search-input:focus {
        outline: none;
        border-color: var(--brand-blue-light);
    }
    .nojs-search-submit {
        position: absolute;
        top: 1px;
        right: 1px;
        bottom: 1px;
        width: 32px;
        color: #94a3b8;
        background: var(--kn-inset);
        border: 0;
        border-left: 1px solid var(--kn-border-strong);
        border-radius: 0 4px 4px 0;
    }
    .nojs-search-submit:hover,
    .nojs-search-submit:focus {
        color: var(--brand-green);
    }
    .clear-search {
        position: absolute;
        right: 10px;
        top: 50%;
        transform: translateY(-50%);
        color: #6b7280;
        cursor: pointer;
        display: none;
        width: 14px;
        height: 14px;
        z-index: 2;
    }
    .clear-search:hover {
        color: #fff;
    }
    
    /* Выпадающий список поиска */
    .search-dropdown {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: var(--kn-panel);
        border: 1px solid var(--kn-border-strong);
        border-radius: var(--bs-border-radius);
        margin-top: 5px;
        max-height: 300px;
        overflow-y: auto;
        z-index: 100;
        box-shadow: 0 10px 25px rgba(0,0,0,0.5);
        display: none;
    }
    .search-dropdown::-webkit-scrollbar { width: 4px; }
    .search-dropdown::-webkit-scrollbar-thumb { background: var(--kn-border-strong); border-radius: 4px; }
    .search-dropdown-item {
        padding: 10px 15px;
        display: flex;
        justify-content: space-between;
        align-items: center;
        cursor: pointer;
        border-bottom: 1px solid rgba(255,255,255,0.02);
        color: #d1d5db;
        font-size: 0.8rem;
        transition: background 0.2s;
    }
    .search-dropdown-item:last-child {
        border-bottom: none;
    }
    .search-dropdown-item:hover {
        background: var(--kn-border-strong);
        color: #fff;
    }
    .search-dropdown-empty {
        padding: 15px;
        text-align: center;
        color: #6b7280;
        font-size: 0.8rem;
    }
    
    .currency-list-container {
        flex: 1;
        overflow-y: auto;
        display: flex;
        flex-direction: column;
    }
    .currency-list-container::-webkit-scrollbar { width: 4px; }
    .currency-list-container::-webkit-scrollbar-thumb { background: var(--kn-border-strong); border-radius: 4px; }
    .exchange-sidebar.is-expanded {
        height: auto;
        overflow: visible;
    }
    .exchange-sidebar.is-expanded .currency-list-container {
        flex: 0 0 auto;
        overflow: visible;
    }
    .exchange-sidebar-footer {
        padding: 12px 15px 15px;
        border-top: 1px solid var(--kn-border-strong);
        background: var(--kn-panel);
    }
    .exchange-sidebar-toggle {
        width: 100%;
        border: 1px solid rgba(59, 130, 246, 0.35);
        color: var(--brand-blue-light);
        background: rgba(59, 130, 246, 0.08);
        border-radius: var(--bs-border-radius);
        padding: 8px 12px;
        font-size: 0.85rem;
        font-weight: 600;
        transition: all 0.2s;
    }
    .exchange-sidebar-toggle:hover {
        color: var(--brand-green);
        border-color: rgba(34, 197, 94, 0.45);
        background: rgba(34, 197, 94, 0.08);
    }
    
    .currency-category-wrapper {
        display: flex;
        flex-direction: column;
        width: 100%;
        margin-bottom: 10px;
    }
    
    .currency-category {
        font-size: 0.7rem;
        text-transform: uppercase;
        color: #6b7280;
        padding: 12px 15px 8px;
        font-weight: 600;
        letter-spacing: 0.5px;
        text-align: center;
        width: 100%;
        background: var(--kn-inset);
        border-top: 1px solid var(--kn-border-strong);
        border-bottom: 1px solid var(--kn-border-strong);
        margin-top: 10px;
    }
    
    .currency-items-row {
        display: flex;
        width: 100%;
    }
    .currency-col {
        flex: 1;
        width: 50%;
        display: flex;
        flex-direction: column;
    }
    .currency-col.give-col {
        padding: 0 5px 0 15px;
    }
    .currency-col.get-col {
        padding: 0 15px 0 5px;
        border-left: 1px solid var(--kn-border-strong);
    }
    
    .currency-item {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 8px 10px;
        margin: 1px 0;
        cursor: pointer;
        border-radius: var(--bs-border-radius);
        font-size: 0.8rem;
        color: #d1d5db;
        text-decoration: none;
        transition: all 0.2s;
    }
    .currency-item:hover {
        background-color: var(--kn-border-strong);
        color: #fff;
    }
    .currency-item.active {
        background-color: var(--kn-border-strong);
        color: #fff;
    }
    .currency-name {
        min-width: 0;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    .currency-name-wrap {
        display: flex;
        align-items: center;
        flex: 1 1 auto;
        min-width: 0;
        gap: 7px;
    }
    .currency-icon {
        width: 18px;
        height: 18px;
        flex: 0 0 18px;
        border-radius: 50%;
        object-fit: contain;
        background: rgba(255, 255, 255, 0.04);
    }
    .currency-ticker {
        font-size: 0.65rem;
        color: #6b7280;
        margin-left: 5px;
        flex: 0 0 auto;
    }
    
    /* Mobile Table Layout for Exchangers */
    @media (max-width: 767.98px) {
        .resource-mobile-order {
            display: flex;
            flex-direction: column;
        }
        .resource-content-row,
        .resource-list-col {
            display: contents;
        }
        /* .row/.col стали display: contents, поэтому Bootstrap-паддинги колонки (.row > *) и margin-top гаттера
           делали сайдбар уже карточек списка; выравниваем по ширине и даём отступ до списка (как на /mixers) */
        .resource-mobile-order .resource-sidebar-col {
            order: 1;
            padding-left: 0;
            padding-right: 0;
            margin-top: 0;
            margin-bottom: 16px;
        }
        .resource-list-card {
            order: 2;
        }
        .resource-popular-card {
            order: 3;
        }
        .resource-text-card {
            order: 4;
        }
    }
