/* ============================================
   Currency Page — V2 (priceshub-style)
   currency.css v1.0
   ============================================ */

/* --- Hero --- */
.cur-hero {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 60%, rgba(5,150,105,0.13) 100%);
    padding: 40px 0 32px;
    color: #fff;
    text-align: center;
}
.cur-hero-title {
    font-family: var(--font-heading);
    font-size: 2rem;
    margin: 0 0 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}
.cur-hero-title i { color: #34d399; font-size: 1.6rem; }
.cur-hero-sub {
    color: rgba(255,255,255,0.6);
    font-size: 1rem;
    margin: 0 0 24px;
}

/* Hero NBG rate pairs */
.cur-hero-rates {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}
.cur-hero-pair {
    display: flex;
    align-items: center;
    gap: 14px;
    background: rgba(255,255,255,0.07);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 16px;
    padding: 16px 24px;
    transition: transform 0.2s;
}
.cur-hero-pair:hover { transform: translateY(-2px); }
.cur-hp-flag { font-size: 1.6rem; }
.cur-hp-info {
    display: flex;
    flex-direction: column;
    text-align: left;
}
.cur-hp-code {
    font-size: 0.78rem;
    font-weight: 600;
    color: rgba(255,255,255,0.5);
    letter-spacing: 0.5px;
}
.cur-hp-rate {
    font-family: 'Inter', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: #fff;
}
.cur-hp-diff {
    font-size: 0.82rem;
    font-weight: 600;
    padding: 4px 12px;
    border-radius: 20px;
}
.cur-hp-diff.up {
    background: rgba(5,150,105,0.2);
    color: #34d399;
}
.cur-hp-diff.down {
    background: rgba(239,68,68,0.2);
    color: #f87171;
}

/* --- Best Rates Ribbon --- */
.cur-best-section {
    background: var(--bg, #f8fafc);
    padding: 28px 0;
    border-bottom: 1px solid var(--border, #e2e8f0);
}
.cur-best-heading {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    margin: 0 0 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text);
}
.cur-best-heading i { color: #f59e0b; }
.cur-best-ribbon {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding-bottom: 8px;
    scrollbar-width: thin;
    -webkit-overflow-scrolling: touch;
}
.cur-best-card {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 190px;
    padding: 14px 18px;
    background: var(--surface, #fff);
    border-radius: 14px;
    border: 1px solid var(--border, #e2e8f0);
    border-left: 4px solid var(--cat-color);
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    transition: transform 0.2s, box-shadow 0.2s;
    flex-shrink: 0;
}
.cur-best-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.08);
}
.cur-brc-icon { font-size: 1.5rem; flex-shrink: 0; }
.cur-brc-info {
    display: flex;
    flex-direction: column;
    gap: 1px;
}
.cur-brc-type {
    font-size: 0.78rem;
    color: var(--text-muted, #64748b);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}
.cur-brc-rate {
    font-family: 'Inter', monospace;
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--cat-color);
}
.cur-brc-bank {
    font-size: 0.75rem;
    color: var(--text-muted, #64748b);
}

/* --- Main --- */
.cur-main { padding-bottom: 40px; }

/* --- Section Head --- */
.cur-section-head {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 32px 0 20px;
}
.cur-section-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: linear-gradient(135deg, #059669, #34d399);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1rem;
    flex-shrink: 0;
}
.cur-section-head h2 {
    font-family: var(--font-heading);
    font-size: 1.3rem;
    margin: 0;
    color: var(--text);
}

/* --- Category Tabs --- */
.cur-cat-tabs {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 8px;
    scrollbar-width: thin;
    -webkit-overflow-scrolling: touch;
}
.cur-cat-tab {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 12px 16px;
    border: 2px solid var(--border, #e2e8f0);
    border-radius: 14px;
    background: var(--surface, #fff);
    cursor: pointer;
    min-width: 100px;
    transition: all 0.2s;
    font-family: var(--font-heading);
    white-space: nowrap;
    flex-shrink: 0;
}
.cur-cat-tab i {
    font-size: 1.1rem;
    color: var(--text-muted, #64748b);
    transition: color 0.2s;
}
.cur-cat-tab .cct-name {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text);
}
.cur-cat-tab .cct-best {
    font-family: 'Inter', monospace;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-muted, #64748b);
    transition: color 0.2s;
}
.cur-cat-tab:hover {
    border-color: var(--cat-color);
    box-shadow: 0 3px 10px rgba(0,0,0,0.06);
}
.cur-cat-tab.active {
    border-color: var(--cat-color);
    box-shadow: 0 4px 14px rgba(0,0,0,0.08);
}
.cur-cat-tab.active i { color: var(--cat-color); }
.cur-cat-tab.active .cct-best { color: var(--cat-color); }

/* --- Panels --- */
.cur-cat-panel { display: none; }
.cur-cat-panel.active {
    display: block;
    animation: curFadeIn 0.3s ease;
}
@keyframes curFadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* --- Panel Header --- */
.cur-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px;
    margin: 16px 0 12px;
    background: var(--surface, #fff);
    border-radius: 12px;
    border-left: 4px solid var(--cat-color);
    box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}
.cur-panel-title {
    font-family: var(--font-heading);
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 8px;
}
.cur-panel-title i { color: var(--cat-color); }
.cur-panel-range {
    font-family: 'Inter', monospace;
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--cat-color);
}

/* --- Comparison List --- */
.cur-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 16px;
}
.cur-row {
    display: grid;
    grid-template-columns: 42px 38px minmax(80px, 1fr) auto minmax(80px, 1fr) auto auto;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background: var(--surface, #fff);
    border-radius: 12px;
    border: 1px solid var(--border, #e2e8f0);
    transition: transform 0.15s, box-shadow 0.15s;
    position: relative;
}
.cur-row:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(0,0,0,0.06);
}
.cur-row--best {
    border: 2px solid #059669;
    background: linear-gradient(135deg, rgba(5,150,105,0.04), var(--surface, #fff));
}

/* Place */
.cur-place { display: flex; align-items: center; justify-content: center; }
.cur-medal {
    width: 32px; height: 32px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-weight: 800; font-size: 0.85rem; color: #fff;
}
.cur-medal-1 { background: linear-gradient(135deg, #FFD700, #FFA500); box-shadow: 0 2px 8px rgba(255,215,0,0.3); }
.cur-medal-2 { background: linear-gradient(135deg, #C0C0C0, #9CA3AF); box-shadow: 0 2px 8px rgba(192,192,192,0.3); }
.cur-medal-3 { background: linear-gradient(135deg, #CD7F32, #B8860B); box-shadow: 0 2px 8px rgba(205,127,50,0.3); }
.cur-num {
    width: 32px; height: 32px; border-radius: 50%;
    background: var(--bg, #f1f5f9); border: 2px solid var(--border, #e2e8f0);
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: 0.85rem; color: var(--text-muted, #64748b);
}

/* Bank color dot with initial */
.cur-bank-dot {
    width: 38px; height: 38px; border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: 0.85rem; color: #fff;
    flex-shrink: 0;
}

/* Name */
.cur-name {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 0.92rem;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Type badge */
.cur-type-badge {
    font-size: 0.7rem;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 6px;
    white-space: nowrap;
}
.cur-type-commercial_bank { background: rgba(37,99,235,0.1); color: #2563eb; }
.cur-type-exchange_bureau { background: rgba(5,150,105,0.1); color: #059669; }
.cur-type-online { background: rgba(147,51,234,0.1); color: #9333ea; }

/* Bar */
.cur-bar-wrap {
    height: 8px;
    background: var(--bg, #f1f5f9);
    border-radius: 4px;
    overflow: hidden;
}
.cur-bar {
    height: 100%;
    border-radius: 4px;
    transition: width 0.5s ease;
}

/* Rate cell */
.cur-rate-cell {
    display: flex;
    align-items: baseline;
    gap: 3px;
    justify-content: flex-end;
    white-space: nowrap;
}
.cur-rate {
    font-family: 'Inter', monospace;
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text);
}
.cur-lari {
    font-size: 0.8rem;
    color: var(--text-muted, #64748b);
    font-weight: 600;
}

/* Badge & Diff */
.cur-badge {
    background: linear-gradient(135deg, #059669, #10b981);
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
}
.cur-diff {
    font-size: 0.78rem;
    color: #dc2626;
    font-weight: 600;
    font-family: 'Inter', monospace;
    white-space: nowrap;
}

/* --- Bank Cards Grid --- */
.cur-banks-section {
    margin-top: 16px;
    padding: 40px 0;
    background: linear-gradient(180deg, var(--bg, #f8fafc) 0%, var(--bg, #f8fafc) 100%);
}
.cur-bank-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}
.cur-bank-card {
    background: var(--surface, #fff);
    border-radius: 16px;
    border: 1px solid var(--border, #e2e8f0);
    border-top: 4px solid var(--brand);
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    transition: transform 0.25s, box-shadow 0.25s;
}
.cur-bank-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(0,0,0,0.08);
}
.cur-bch {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px 20px;
    border-bottom: 1px solid var(--border, #e2e8f0);
}
.cur-bch-dot {
    width: 44px; height: 44px; border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: 1.1rem; color: #fff;
    flex-shrink: 0;
}
.cur-bch-meta h3 {
    font-family: var(--font-heading);
    font-size: 1rem;
    margin: 0 0 2px;
    color: var(--text);
}
.cur-bch-link {
    font-size: 0.78rem;
    color: var(--text-muted, #64748b);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 4px;
}
.cur-bch-link i { font-size: 0.65rem; }
.cur-bch-link:hover { color: var(--brand); }
.cur-bch-type {
    font-size: 0.78rem;
    color: var(--text-muted, #64748b);
}

/* Table inside bank card */
.cur-bct {
    width: 100%;
    border-collapse: collapse;
}
.cur-bct thead th {
    padding: 10px 16px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted, #64748b);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-align: left;
    background: var(--bg, #f8fafc);
    border-bottom: 1px solid var(--border, #e2e8f0);
}
.cur-bct thead th:not(:first-child) { text-align: right; }
.cur-bct tbody td {
    padding: 10px 16px;
    font-size: 0.88rem;
    color: var(--text);
    border-bottom: 1px solid rgba(0,0,0,0.04);
}
.cur-bct tbody tr:last-child td { border-bottom: none; }
.cur-bct tbody td:not(:first-child) {
    text-align: right;
    font-family: 'Inter', monospace;
    font-weight: 700;
    font-size: 0.92rem;
    white-space: nowrap;
}
.cur-spread-col { color: var(--text-muted, #64748b) !important; font-weight: 500 !important; }

/* --- NBG Grid --- */
.cur-nbg-section { padding: 0; }
.cur-nbg-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(155px, 1fr));
    gap: 12px;
}
.cur-nbg-card {
    background: var(--surface, #fff);
    border-radius: 14px;
    border: 1px solid var(--border, #e2e8f0);
    padding: 16px;
    text-align: center;
    box-shadow: 0 2px 6px rgba(0,0,0,0.03);
    transition: transform 0.2s, box-shadow 0.2s;
}
.cur-nbg-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.06);
}
.cur-nbg-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 8px;
}
.cur-nbg-flag { font-size: 1.3rem; }
.cur-nbg-code {
    font-family: 'Inter', monospace;
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text);
}
.cur-nbg-qty {
    font-size: 0.7rem;
    background: var(--bg, #f1f5f9);
    padding: 2px 6px;
    border-radius: 4px;
    color: var(--text-muted, #64748b);
    font-weight: 600;
}
.cur-nbg-rate {
    font-family: 'Inter', monospace;
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 4px;
}
.cur-nbg-diff {
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 6px;
}
.cur-nbg-diff.up { color: #059669; }
.cur-nbg-diff.down { color: #ef4444; }
.cur-nbg-name {
    font-size: 0.75rem;
    color: var(--text-muted, #64748b);
}

/* --- Calculator --- */
.cur-calc-section { padding: 0 0 24px; }
.cur-calc-card {
    background: var(--surface, #fff);
    border-radius: 16px;
    border: 1px solid var(--border, #e2e8f0);
    padding: 24px;
    max-width: 500px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}
.cur-calc-row {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 16px;
}
.cur-calc-row label {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-muted, #64748b);
}
.cur-calc-row select,
.cur-calc-row input {
    padding: 10px 14px;
    border: 2px solid var(--border, #e2e8f0);
    border-radius: 10px;
    font-size: 0.95rem;
    font-family: inherit;
    background: var(--bg, #f8fafc);
    color: var(--text);
    transition: border-color 0.2s;
}
.cur-calc-row select:focus,
.cur-calc-row input:focus {
    outline: none;
    border-color: #059669;
}
.cur-calc-inputs {
    display: flex;
    align-items: flex-end;
    gap: 16px;
    margin-bottom: 16px;
}
.cur-calc-inputs .cur-calc-row { flex: 1; margin-bottom: 0; }
.cur-calc-result {
    display: flex;
    align-items: center;
    gap: 6px;
    padding-bottom: 6px;
}
.cur-calc-eq {
    font-size: 1.2rem;
    color: var(--text-muted, #64748b);
    font-weight: 700;
}
.cur-calc-total {
    font-family: 'Inter', monospace;
    font-size: 1.6rem;
    font-weight: 700;
    color: #059669;
}
.cur-calc-cur {
    font-size: 1rem;
    color: var(--text-muted, #64748b);
    font-weight: 600;
}
.cur-calc-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: linear-gradient(135deg, #059669, #34d399);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-family: var(--font-heading);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.15s;
}
.cur-calc-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(5,150,105,0.3);
}

/* --- Responsive --- */
@media (max-width: 1024px) {
    .cur-row {
        grid-template-columns: 38px 34px 1fr auto auto auto;
    }
    .cur-bar-wrap { display: none; }
    .cur-bank-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
    .cur-hero { padding: 28px 0 20px; }
    .cur-hero-title { font-size: 1.5rem; }
    .cur-hero-rates { gap: 12px; }
    .cur-hero-pair { padding: 12px 18px; }
    .cur-hp-rate { font-size: 1.2rem; }

    .cur-best-ribbon { gap: 10px; }
    .cur-best-card { min-width: 170px; padding: 12px 14px; }
    .cur-brc-rate { font-size: 1rem; }

    .cur-cat-tabs { gap: 6px; }
    .cur-cat-tab { padding: 10px 12px; min-width: 85px; }

    .cur-row {
        grid-template-columns: 34px 32px 1fr auto auto;
        gap: 8px;
        padding: 10px 12px;
    }
    .cur-bar-wrap { display: none; }
    .cur-type-badge { display: none; }
    .cur-rate { font-size: 0.92rem; }

    .cur-bank-grid { grid-template-columns: 1fr; }
    .cur-calc-card { max-width: 100%; }
    .cur-nbg-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
}
@media (max-width: 480px) {
    .cur-hero-title { font-size: 1.25rem; }
    .cur-hero-pair { padding: 10px 14px; gap: 10px; }
    .cur-hp-flag { font-size: 1.2rem; }
    .cur-hp-rate { font-size: 1.1rem; }
    .cur-hp-diff { font-size: 0.75rem; padding: 3px 8px; }

    .cur-best-card { min-width: 160px; padding: 10px 12px; gap: 10px; }
    .cur-brc-icon { font-size: 1.2rem; }
    .cur-brc-rate { font-size: 0.92rem; }
    .cur-brc-type { font-size: 0.72rem; }

    .cur-cat-tab { min-width: 75px; padding: 8px 10px; }
    .cur-cat-tab .cct-name { font-size: 0.72rem; }
    .cur-cat-tab .cct-best { font-size: 0.72rem; }

    .cur-row {
        grid-template-columns: 30px 30px 1fr auto;
        gap: 6px;
        padding: 8px 10px;
        border-radius: 10px;
    }
    .cur-medal, .cur-num { width: 28px; height: 28px; font-size: 0.78rem; }
    .cur-bank-dot { width: 30px; height: 30px; font-size: 0.75rem; border-radius: 8px; }
    .cur-name { font-size: 0.82rem; }
    .cur-badge { font-size: 0.65rem; padding: 2px 6px; }
    .cur-diff { display: none; }

    .cur-calc-inputs { flex-direction: column; gap: 12px; }
    .cur-bct thead th,
    .cur-bct tbody td { padding: 8px 12px; }
    .cur-spread-col { display: none; }
    .cur-nbg-grid { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); }
}
