/* deposit.css — страница вклада + стили таблицы скринера */

.bs-h1 { font-size: 14px; font-weight: 500; color: var(--muted); margin: 0 0 12px; }

/* ── Фильтры (стиль мегабондс: .sb-filters) ───────────────────────────────── */
.bs-filters {
    background: var(--surface);
    border-radius: 12px;
    padding: 0;
    margin-bottom: 12px;
    box-shadow: 0 1px 4px rgba(0,0,0,.08);
    overflow: hidden;
}
.bs-filters-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px;
    cursor: pointer;
    user-select: none;
}
.bs-filters-toggle:hover { background: var(--bg-soft); }
.bs-filters-toggle h3 {
    font-size: 13px; font-weight: 600; color: var(--muted);
    text-transform: uppercase; letter-spacing: .5px;
    margin: 0;
}
.bs-filters-toggle .toggle-icon {
    font-size: 11px; color: var(--light);
    transition: transform .2s;
}
.bs-filters.open .toggle-icon { transform: rotate(180deg); }

.bs-filters-body {
    display: none;
    padding: 0 20px 18px;
    border-top: 1px solid var(--border-light);
}
.bs-filters.open .bs-filters-body { display: block; }

.filter-row {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
    margin-top: 16px;
    align-items: flex-start;
}
.filter-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 120px;
}
.filter-group-banks { flex: 1 1 100%; }
.filter-group-search { flex: 1 1 240px; }
.filter-group label {
    display: block;
    font-size: 11px; font-weight: 600;
    color: var(--muted);
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: .3px;
}
.filter-range { display: flex; gap: 6px; }
.filter-range input {
    width: 72px; flex: 0 0 72px;
    padding: 7px 8px;
    text-align: center;
}

/* ── Чипы-фильтры (мегабондс style: pill, синий active) ───────────────────── */
.btn-filter-group {
    display: flex; flex-wrap: wrap; gap: 6px;
}
.btn-filter {
    display: inline-flex; align-items: center; gap: 4px;
    padding: 6px 12px;
    border: 1.5px solid var(--border);
    border-radius: 999px;
    background: var(--bg-soft);
    font-size: 12px; font-weight: 500;
    color: #475569;
    cursor: pointer;
    transition: all .12s;
    user-select: none;
    white-space: nowrap;
}
.btn-filter:hover { border-color: var(--light); background: var(--surface); }
.btn-filter.active {
    border-color: transparent;
    background: var(--blue);
    color: #fff;
    font-weight: 600;
}

.filter-actions {
    display: flex; gap: 10px;
    margin-top: 16px;
    justify-content: flex-end;
}
.btn-reset {
    padding: 9px 16px;
    background: transparent; color: var(--muted);
    border: 1.5px solid var(--border); border-radius: 8px;
    font-size: 13px; cursor: pointer;
    transition: all .15s;
}
.btn-reset:hover { border-color: var(--light); color: var(--text); }

/* ── Results panel + header ────────────────────────────────────────────────── */
.results-header {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 14px;
    flex-wrap: wrap;
    gap: 8px;
    padding: 0 4px;
}
.results-meta { font-size: 12px; color: var(--muted); }
.results-meta strong { color: var(--text); font-weight: 600; }

.page-ellipsis { padding: 0 4px; color: var(--light); }

#deposits-container.is-loading {
    opacity: .55;
    transition: opacity .15s;
    pointer-events: none;
}

/* ── Таблица вкладов (стиль #bonds-table из мегабондс) ─────────────────────── */
.deposits-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    background: var(--surface);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 1px 4px rgba(0,0,0,.08);
}
.deposits-table thead th {
    background: var(--bg-soft);
    color: #475569;
    font-weight: 600;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .3px;
    padding: 10px 12px;
    border-bottom: 2px solid var(--border);
    white-space: nowrap;
    text-align: left;
}
.deposits-table.sortable th[data-col] {
    cursor: pointer;
    user-select: none;
    transition: background .1s, color .1s;
}
.deposits-table.sortable th[data-col]:hover {
    background: var(--border-light);
    color: var(--accent);
}
.deposits-table.sortable th.th-active {
    color: var(--accent);
    background: var(--border-light);
}
.deposits-table tbody tr {
    border-bottom: 1px solid var(--border-light);
    cursor: pointer;
    transition: background .1s;
}
.deposits-table tbody tr:last-child { border-bottom: none; }
.deposits-table tbody tr:hover { background: var(--bg-soft); }
.deposits-table tbody td { padding: 10px 12px; vertical-align: middle; }

/* ── Пагинация (если ещё не в main.css — на всякий случай) ─────────────────── */
.bs-pagination {
    display: flex; align-items: center; gap: 6px;
    justify-content: center;
    margin-top: 20px;
    flex-wrap: wrap;
}
.page-btn {
    min-width: 34px; height: 34px;
    padding: 0 10px;
    border: 1.5px solid var(--border);
    background: var(--surface); color: #475569;
    border-radius: 7px;
    font-size: 13px;
    cursor: pointer;
    transition: all .15s;
}
.page-btn:hover { border-color: var(--blue); color: var(--blue); }
.page-btn.active {
    background: var(--blue); color: #fff;
    border-color: var(--blue); font-weight: 600;
}
.page-btn:disabled { opacity: .4; cursor: default; }

/* ── Mobile ────────────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
    .bs-container { padding: 12px 10px 40px; }
    .deposits-table { font-size: 12px; }
    .deposits-table thead th,
    .deposits-table tbody td { padding: 8px 6px; }
    .filter-row { gap: 16px 14px; }
    .filter-range input { flex: 1 1 0; min-width: 0; width: auto; }
    .btn-filter { font-size: 13px; padding: 7px 11px; }
    .btn-filter-group { gap: 5px; }
}

.td-bank { font-weight: 600; }
.td-muted { color: var(--muted); }

/* ── Бейджи (только недостающие в main.css) ─────────────────────────────────── */
.badge-cny      { background: #fef2f2; color: #991b1b; }

/* Категорийные бейджи */
.badge-social   { background: #fef3c7; color: #92400e; }
.badge-promo    { background: #d1fae5; color: #065f46; }
.badge-premium  { background: #ede9fe; color: #4c1d95; }
.badge-reason   { background: #f1f5f9; color: #475569; font-size: 10px; }

/* Ряд бейджей в ячейке вклада: имя сверху, бейджи снизу с отступом */
.td-name .deposit-name {
    display: block;
    font-size: inherit;
    font-weight: 500;
}
.td-name .badge-row {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 6px;
}

/* Строка соцвклада — слегка приглушена */
.row-social td { opacity: .82; }
.row-social:hover td { opacity: 1; }

/* ── Чекбокс «Показать социальные вклады» ───────────────────────────────────── */
.filter-group-social { justify-content: flex-end; }
.social-toggle {
    display: inline-flex; align-items: center; gap: 7px;
    font-size: 12px; color: var(--muted);
    cursor: pointer;
    user-select: none;
    padding: 6px 0;
}
.social-toggle input[type="checkbox"] { cursor: pointer; accent-color: var(--blue); }
.social-toggle:hover { color: var(--text); }

/* ── Блок ограничений на странице вклада ────────────────────────────────────── */
.card-restrictions { border-left: 3px solid #f59e0b; }
.restrictions-list {
    list-style: none;
    margin: 0; padding: 16px 24px;
    display: flex; flex-direction: column; gap: 8px;
}
.restrictions-list li {
    font-size: 13px; color: var(--text);
    padding-left: 16px;
    position: relative;
}
.restrictions-list li::before {
    content: '!';
    position: absolute; left: 0;
    color: #f59e0b;
    font-weight: 700;
}

.rate-max {
    font-weight: 700;
    color: var(--accent);
    font-size: 15px;
    display: block;
}
.rate-base-hint {
    display: block;
    font-size: 11px;
    color: var(--muted);
    margin-top: 2px;
}

/* ── Хлебные крошки ─────────────────────────────────────────────────────────── */
.breadcrumbs {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--muted);
    margin-bottom: 20px;
}
.breadcrumbs a { color: var(--blue); text-decoration: none; }
.breadcrumbs a:hover { text-decoration: underline; }

/* ── Layout ─────────────────────────────────────────────────────────────────── */
.deposit-layout {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* ── Hero ───────────────────────────────────────────────────────────────────── */
.deposit-hero {
    padding: 28px 32px;
    display: flex;
    flex-direction: column;
    gap: 22px;
}
.deposit-hero-top {
    display: flex;
    gap: 32px;
    align-items: flex-start;
    justify-content: space-between;
    flex-wrap: wrap;
}
.deposit-hero-meta {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    flex: 1 1 auto;
    min-width: 0;
}
.deposit-hero-rate {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
    flex-shrink: 0;
}
.bank-logo {
    width: 48px; height: 48px;
    border-radius: 10px;
    object-fit: contain;
    border: 1px solid var(--border);
    flex-shrink: 0;
}
.deposit-bank { font-size: 13px; color: var(--muted); margin-bottom: 4px; }
.deposit-name {
    font-size: 26px;
    font-weight: 700;
    color: var(--text);
    line-height: 1.2;
    margin: 0;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}
.deposit-name .badge { font-size: 13px; }

.hero-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 12px;
}
.chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 500;
    white-space: nowrap;
}
.chip-sign { font-weight: 700; line-height: 1; }
.chip-yes  { background: #d1fae5; color: #065f46; }
.chip-no   { background: #fee2e2; color: #991b1b; }

.rate-headline-value {
    font-size: 44px;
    font-weight: 700;
    color: var(--accent);
    line-height: 1;
}
.rate-headline-base { font-size: 13px; color: var(--muted); }

.deposit-hero-stats {
    display: flex;
    gap: 32px;
    padding-top: 18px;
    border-top: 1px solid var(--border-light);
    flex-wrap: wrap;
}
.hero-stat {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.hero-stat-label {
    font-size: 11px;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: .5px;
    font-weight: 600;
}
.hero-stat-value {
    font-size: 16px;
    font-weight: 600;
    color: var(--text);
}

@media (max-width: 640px) {
    .deposit-hero { padding: 20px; gap: 18px; }
    .deposit-hero-top { gap: 16px; }
    .deposit-hero-rate { align-items: flex-start; width: 100%; }
    .rate-headline-value { font-size: 36px; }
    .deposit-name { font-size: 22px; }
    .deposit-hero-stats { gap: 20px; }
}

/* ── Надбавки ───────────────────────────────────────────────────────────────── */
.bonus-list {
    display: flex;
    flex-direction: column;
    padding: 4px 24px 12px;
}
.bonus-item {
    display: grid;
    grid-template-columns: 76px 1fr;
    gap: 20px;
    align-items: baseline;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-light);
}
.bonus-item:last-child { border-bottom: none; }
.bonus-rate {
    font-size: 20px;
    font-weight: 700;
    color: var(--green);
    white-space: nowrap;
}
.bonus-mark {
    color: var(--green);
    font-size: 20px;
    font-weight: 700;
}
.bonus-desc {
    font-size: 13px;
    color: var(--text);
    line-height: 1.45;
}

/* ── Таблица ставок по срокам ───────────────────────────────────────────────── */
.rate-table-wrap { overflow-x: auto; }
.rate-table {
    width: 100%;
    border-collapse: collapse;
}
.rate-table th, .rate-table td {
    padding: 10px 24px;
    text-align: left;
    font-size: 13px;
    border-bottom: 1px solid var(--border-light);
}
.rate-table th {
    font-size: 11px;
    color: var(--muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .4px;
    background: var(--bg-soft);
}
.rate-table tbody tr:hover { background: var(--bg-soft); }
.rate-table tbody tr:last-child td { border-bottom: none; }
.rate-cell { font-weight: 600; color: var(--accent); }
.rate-cell--max { color: var(--green); }

/* Горизонтальная таблица: сроки в колонках, ставки в строках */
.rate-table--horizontal th,
.rate-table--horizontal td {
    text-align: center;
    padding: 10px 14px;
    white-space: nowrap;
}
.rate-table--horizontal thead th { font-size: 11px; }
.rate-table--horizontal tbody th[scope="row"] {
    text-align: left;
    padding-left: 24px;
    padding-right: 20px;
    font-size: 12px;
    font-weight: 500;
    color: var(--muted);
    text-transform: none;
    letter-spacing: 0;
    background: transparent;
    border-bottom: 1px solid var(--border-light);
}
.rate-table--horizontal tbody tr:hover { background: transparent; }
.rate-table--horizontal tbody tr:hover th[scope="row"] { background: transparent; }

/* Подсветка колонки с максимальной ставкой */
.rate-table--horizontal .col-peak {
    background: #d1fae5;
    font-weight: 700;
}
.rate-table--horizontal thead th.col-peak { background: #a7f3d0; }

/* ── Условия (плотная сетка) ────────────────────────────────────────────────── */
.conditions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 0 32px;
}
.cond-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 12px;
    padding: 8px 0;
    font-size: 13px;
    border-bottom: 1px solid var(--border-light);
}
.cond-label {
    color: var(--muted);
    font-weight: 400;
    flex-shrink: 0;
}
.cond-value {
    color: var(--text);
    font-weight: 500;
    text-align: right;
    word-break: break-word;
}
.cond-yes { color: var(--green); }
.cond-no  { color: var(--red); }

.btn-source {
    display: inline-block;
    padding: 10px 16px;
    background: var(--bg-soft);
    border: 1.5px solid var(--border);
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    color: var(--accent);
    text-decoration: none;
    text-align: center;
    transition: border-color .15s, background .15s;
    white-space: nowrap;
}
.btn-source:hover { border-color: var(--blue); background: var(--surface); }

/* ── Финальный CTA на банк ──────────────────────────────────────────────────── */
.deposit-cta {
    margin-top: 8px;
    padding: 28px 24px;
    background: var(--surface);
    border: 1.5px solid var(--border);
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 1px 4px rgba(0,0,0,.06);
}
.btn-cta {
    display: inline-block;
    padding: 14px 36px;
    background: var(--blue);
    color: #fff;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    transition: background .15s, transform .05s;
}
.btn-cta:hover { background: #1e40af; }
.btn-cta:active { transform: translateY(1px); }
.deposit-cta-note {
    margin-top: 10px;
    font-size: 12px;
    color: var(--light);
}

.snapshot-note {
    font-size: 11px;
    color: var(--light);
    text-align: center;
    margin-top: 8px;
}
