/* Currencies Page Specific Styles */

.currencies-page .bank-col {
    text-align: center;
    background: rgba(0, 0, 0, 0.01);
    width: 20%;
}

.currencies-page .sub-header-row th {
    font-size: 10px;
    text-transform: uppercase;
    color: var(--text-tertiary);
    text-align: center;
    padding: 8px;
    border-bottom: 1px solid var(--border-color);
}

.currencies-page .rate-cell {
    text-align: center;
    padding: 16px 8px;
}

.currencies-page .rate-row {
    font-family: 'JetBrains Mono', 'Roboto Mono', monospace;
    font-size: 14px;
    font-weight: 600;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
}

.currencies-page .buy {
    color: #10B981; /* Green for buying */
}

.currencies-page .sell {
    color: #EF4444; /* Red for selling */
}

.currencies-page .divider {
    color: var(--border-light);
    font-weight: 400;
    opacity: 0.5;
}

.currencies-page .currency-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.currencies-page .flag-icon {
    font-size: 20px;
}

/* ========================================
   Currencies Date Week Strip (like Commodities)
   ======================================== */

.currencies-date-panel {
    margin-bottom: 14px;
}

.currencies-date-controls {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
}

.currencies-date-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.currencies-top-links {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.converter-link-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    font-size: 12px;
    font-weight: 800;
    color: #065f46;
    background: rgba(16, 185, 129, 0.10);
    border: 1px solid rgba(16, 185, 129, 0.22);
    border-radius: 10px;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.18s ease;
    white-space: nowrap;
}

.converter-link-btn:hover {
    background: rgba(16, 185, 129, 0.16);
    border-color: rgba(16, 185, 129, 0.35);
    color: #064e3b;
}

.converter-link-btn svg {
    flex-shrink: 0;
    opacity: 0.95;
}

.converter-bank-links {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 6px;
    border-radius: 999px;
    border: 1px solid var(--border-color, #e5e7eb);
    background: rgba(255, 255, 255, 0.65);
    backdrop-filter: blur(6px);
}

.converter-bank-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 5px 10px;
    border-radius: 999px;
    text-decoration: none;
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 0.02em;
    color: var(--text-secondary, #6b7280);
    background: rgba(0, 0, 0, 0.03);
    transition: all 0.15s ease;
    white-space: nowrap;
}

.converter-bank-pill:hover {
    background: rgba(0, 0, 0, 0.06);
    color: var(--text-primary, #111827);
}

.currencies-date-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.cal-btn {
    background: none;
    border: 1px solid var(--border-color, #e5e7eb);
    border-radius: 10px;
    padding: 6px 12px;
    font-size: 13px;
    font-weight: 800;
    color: var(--text-secondary, #6b7280);
    cursor: pointer;
    transition: all 0.15s ease;
}

.cal-btn:hover {
    background: rgba(0, 0, 0, 0.03);
    color: var(--text-primary, #111827);
}

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

.currencies-week-strip {
    display: flex;
    border: 1px solid var(--border-color, #e5e7eb);
    border-radius: 12px;
    overflow: hidden;
    background: var(--bg-light, #fff);
    width: 100%;
}

.currencies-week-strip--full {
    width: 100%;
}

.currencies-week-day {
    flex: 1;
    text-align: center;
    padding: 10px 6px 12px;
    cursor: pointer;
    border-right: 1px solid var(--border-color, #e5e7eb);
    transition: background 0.15s ease;
    user-select: none;
}

.currencies-week-day:last-child { border-right: none; }
.currencies-week-day:hover { background: rgba(0, 0, 0, 0.02); }
.currencies-week-day.active { background: rgba(16, 185, 129, 0.07); }

.currencies-week-day.disabled {
    cursor: not-allowed;
    background: rgba(0, 0, 0, 0.015);
}

.currencies-week-day.disabled:hover { background: rgba(0, 0, 0, 0.015); }

.currencies-week-day.today .day-name {
    color: #059669;
    font-weight: 900;
}

.currencies-week-day .day-name {
    font-size: 11px;
    font-weight: 800;
    color: var(--text-secondary, #6b7280);
    text-transform: uppercase;
    margin-bottom: 3px;
}

.currencies-week-day .day-date {
    font-size: 14px;
    font-weight: 900;
    color: var(--text-primary, #111827);
    margin-bottom: 4px;
}

.currencies-week-day.disabled .day-date {
    color: var(--text-secondary, #9ca3af);
}

.currencies-week-day .day-count {
    font-size: 11px;
    color: var(--text-tertiary, #9ca3af);
    font-weight: 700;
}

.currencies-week-day .day-count.has-data {
    color: #059669;
}

@media (max-width: 768px) {
    .currencies-date-controls {
        align-items: flex-start;
        width: 100%;
    }
    .currencies-week-strip {
        max-width: none;
    }
    .converter-bank-links {
        display: none;
    }
}

/* Date Selector Styling */
.group-header-with-selector {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-light);
}

.group-header-with-selector .group-title {
    margin-bottom: 0;
    border-bottom: none;
    padding-bottom: 0;
}

.table-date-selector {
    display: flex;
    align-items: center;
    gap: 10px;
}

.table-date-selector label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
}

.premium-select {
    padding: 6px 32px 6px 12px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    background-color: var(--bg-light);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m3 4.5 3 3 3-3'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    cursor: pointer;
    transition: all 0.2s ease;
    outline: none;
    min-width: 140px;
}

.premium-select:hover {
    border-color: var(--text-secondary);
    background-color: var(--bg-main);
}

.premium-select:focus {
    border-color: #6366F1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

/* Responsiveness */
@media (max-width: 1200px) {
    .currencies-page .bank-col,
    .currencies-page .rate-cell {
        min-width: 140px;
    }
}

@media (max-width: 768px) {
    .group-header-with-selector {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    .currencies-page .rate-row {
        font-size: 12px;
    }
}

/* Embed Link Button */
.embed-link-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    font-size: 12px;
    font-weight: 600;
    color: #6366f1;
    background: rgba(99, 102, 241, 0.08);
    border: 1px solid rgba(99, 102, 241, 0.25);
    border-radius: 8px;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.embed-link-btn:hover {
    background: rgba(99, 102, 241, 0.15);
    border-color: #6366f1;
    color: #4f46e5;
}

.embed-link-btn svg {
    flex-shrink: 0;
}

/* ── Currency converter (/finance/currencies/.../convert/) ───────────────── */
.currency-converter-card__header.card-header-premium {
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 20px 24px;
    padding-bottom: 20px;
}

.currency-converter-card__title-block {
    flex: 1 1 240px;
    min-width: 0;
}

.currency-converter-card__title {
    margin: 0 0 8px;
    font-size: 1.35rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.2;
    color: var(--text-primary);
    font-family: inherit;
}

.currency-converter-card__lede {
    margin: 0;
    font-size: 0.875rem;
    line-height: 1.5;
    font-weight: 500;
    color: var(--text-secondary);
    max-width: 42rem;
}

.currency-converter-card__date {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
    min-width: min(100%, 200px);
}

.currency-converter-card__date-label {
    font-size: 0.6875rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-tertiary);
}

.currency-converter-card__date-select {
    width: 100%;
    min-height: 42px;
    padding: 8px 14px;
    border-radius: 12px;
    border: 1px solid var(--border-light);
    background: #fff;
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--text-primary);
    cursor: pointer;
}

.currency-converter-card__date-select:focus {
    outline: none;
    border-color: var(--finance-primary, #00b894);
    box-shadow: 0 0 0 3px rgba(0, 184, 148, 0.12);
}

.currency-converter-card__body {
    padding: 4px 24px 28px;
}

.currency-converter-fields {
    display: grid;
    grid-template-columns: 1.1fr 1fr 1fr;
    gap: 20px 18px;
    align-items: end;
}

.currency-converter-field__label {
    display: block;
    margin-bottom: 10px;
    font-size: 0.8125rem;
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: -0.01em;
}

.currency-converter-field__hint {
    font-weight: 600;
    font-size: 0.6875rem;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-left: 6px;
}

.currency-converter-field__input {
    height: 52px !important;
    border-radius: 14px !important;
    font-size: 0.9375rem !important;
}

select.currency-converter-field__input {
    padding-right: 36px !important;
    cursor: pointer;
}

.currency-converter-result {
    margin-top: 26px;
    padding: 20px 22px;
    border-radius: 16px;
    border: 1px solid rgba(0, 0, 0, 0.06);
    background: linear-gradient(165deg, rgba(0, 184, 148, 0.07) 0%, rgba(255, 255, 255, 0.65) 100%);
}

.currency-converter-result__row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    flex-wrap: wrap;
}

.currency-converter-result__value {
    margin: 0;
    flex: 1 1 200px;
    min-width: 0;
    font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-weight: 700;
    font-size: clamp(1.2rem, 2.4vw, 1.55rem);
    line-height: 1.35;
    letter-spacing: -0.02em;
    color: var(--text-primary);
    font-variant-numeric: tabular-nums slashed-zero;
}

.currency-converter-copy {
    flex-shrink: 0;
    margin: 0;
    padding: 10px 14px;
    border-radius: 12px;
    border: 1px solid rgba(0, 184, 148, 0.35);
    background: rgba(255, 255, 255, 0.85);
    color: var(--finance-primary, #00b894);
    font: inherit;
    font-size: 0.8125rem;
    font-weight: 800;
    letter-spacing: 0.02em;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease, transform 0.12s ease;
}

.currency-converter-copy:hover {
    background: rgba(0, 184, 148, 0.12);
    border-color: rgba(0, 184, 148, 0.55);
}

.currency-converter-copy:active {
    transform: scale(0.98);
}

.currency-converter-result__meta {
    margin: 14px 0 0;
    padding-top: 14px;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
    font-size: 0.8125rem;
    line-height: 1.55;
    font-weight: 500;
    color: var(--text-secondary);
}

.currency-converter-error {
    margin-top: 18px;
    padding: 12px 14px;
    border-radius: 12px;
    font-size: 0.8125rem;
    font-weight: 600;
    line-height: 1.45;
    color: #b91c1c;
    background: rgba(239, 68, 68, 0.08);
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.currency-converter-error[hidden] {
    display: none !important;
}

@media (max-width: 900px) {
    .currency-converter-fields {
        grid-template-columns: 1fr 1fr;
    }

    .currency-converter-field:first-child {
        grid-column: 1 / -1;
    }
}

@media (max-width: 560px) {
    .currency-converter-fields {
        grid-template-columns: 1fr;
    }

    .currency-converter-card__date {
        align-items: stretch;
        width: 100%;
    }

    .currency-converter-result__row {
        flex-direction: column;
    }

    .currency-converter-copy {
        width: 100%;
    }
}
