/* ============================================
   Wealth Nexus — Premium Calculator Styles
   Shared across: Mutual Fund | Bank Interest
   ============================================ */

:root {
    --primary: #032b20;
    --primary-gradient: linear-gradient(135deg, #021f17 0%, #064e3b 50%, #09634b 100%);
    --primary-accent: #059669;
    --gold-accent: #d4af37;
    --gold-light: #fef9ee;
    --gold-border: rgba(212, 175, 55, 0.65);
    --surface: #ffffff;
    --border: #e2e8f0;
    --text-main: #091a14;
    --text-muted: #546560;
    --bank-teal: #064e3b;
    --bank-cyan: #0d9488;
    --bank-emerald: #059669;
    --bank-gold: #d4af37;
    --bank-bg: #f8fafc;
    --bank-text: #0f172a;
    --bank-muted: #64748b;
}

/* CALC PAGE CONTAINER */
.calc-page-container {
    max-width: 1320px;
    margin: 0 auto;
    padding: 16px 20px 60px;
}

/* QUICK LINKS BAR */
.quick-links-bar {
    background: #f8fafc;
    border-bottom: 1px solid var(--border);
    padding: 12px 0;
    overflow-x: auto;
}

.quick-links-container {
    display: flex;
    gap: 12px;
    max-width: 1320px;
    margin: 0 auto;
    padding: 0 20px;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
}

.quick-link {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 6px 16px;
    background: #ffffff;
    border: 1.5px solid var(--gold-border);
    border-radius: 9999px;
    font-size: 12px;
    color: #334155;
    text-decoration: none;
    font-weight: 700;
    transition: all 0.25s ease;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
    white-space: nowrap;
}

.quick-link:hover {
    transform: translateY(-2px);
    border-color: var(--gold-accent);
    box-shadow: 0 6px 16px rgba(212, 175, 55, 0.25);
    color: #032b20;
}

.quick-link.active {
    background: var(--primary-gradient);
    border-color: var(--gold-accent);
    color: #ffffff;
    box-shadow: 0 6px 18px rgba(3, 43, 32, 0.35);
}

/* HEADER BANNER */
.calc-page-header {
    text-align: center;
    margin: 0 0 24px 0;
    width: 100%;
    padding: 32px 24px;
    background: radial-gradient(circle at 50% 20%, #0d5f48 0%, #032b20 60%, #01140e 100%);
    border-radius: 20px;
    color: #fff;
    box-shadow: 0 16px 45px rgba(212, 175, 55, 0.22), 0 8px 24px rgba(2, 36, 27, 0.4);
    border: 2px solid var(--gold-accent);
    position: relative;
    overflow: hidden;
}

.calc-page-header h1 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 28px;
    font-weight: 800;
    margin: 0 0 6px;
    letter-spacing: -0.3px;
    background: linear-gradient(90deg, #ffffff 30%, #f5d77a 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-align: center;
}

.calc-page-header p {
    font-size: 14px;
    color: #cbd5e1;
    margin: 0 0 20px;
    font-weight: 400;
    text-align: center;
}

.calc-page-header .capsule-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    align-items: center;
    max-width: 1150px;
    margin: 0 auto;
}

/* CAPSULE LINKS */
.calc-capsule-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 16px;
    height: 36px;
    border-radius: 9999px;
    background: #ffffff;
    color: #032b20;
    font-weight: 700;
    font-size: 12px;
    cursor: pointer;
    border: 1.5px solid var(--gold-border);
    text-decoration: none;
    white-space: nowrap;
    transition: all 0.25s ease;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.1);
}

.calc-capsule-link:hover {
    transform: translateY(-2px);
    border-color: var(--gold-accent);
    background: #ffffff;
    box-shadow: 0 6px 18px rgba(212, 175, 55, 0.4);
    color: #032b20;
}

.calc-capsule-link.active {
    background: linear-gradient(135deg, #d4af37 0%, #f5d77a 100%);
    border-color: var(--gold-accent);
    color: #011d15;
    box-shadow: 0 6px 20px rgba(212, 175, 55, 0.5);
}

/* SMART COMPARE BAR */
.smart-compare-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
    border: 1.5px solid var(--gold-accent);
    border-radius: 14px;
    padding: 14px 22px;
    margin-bottom: 24px;
    box-shadow: 0 4px 18px rgba(212, 175, 55, 0.2);
    gap: 16px;
}

@media (max-width: 768px) {
    .smart-compare-bar {
        flex-direction: column;
        align-items: stretch;
    }
}

/* CALCULATOR CARD */
.calculator-card {
    display: none;
    background: #ffffff;
    border-radius: 20px;
    box-shadow: 0 12px 35px rgba(2, 31, 23, 0.05);
    overflow: hidden;
    border: 1px solid var(--border);
    animation: fadeIn 0.3s ease;
    margin-bottom: 24px;
    padding: 24px;
}

.calculator-card.active {
    display: block;
}

/* SUB CATEGORY */
.sub-category-section {
    display: none;
    animation: fadeIn 0.3s ease;
    margin-bottom: 20px;
}

.sub-category-section.active {
    display: block;
}

.sub-category-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    padding: 14px 18px;
    background: #ffffff;
    border-radius: 14px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
    border: 1px solid var(--border);
    width: 100%;
}

.sub-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 6px 18px;
    height: 34px;
    border-radius: 9999px;
    background: #f8fafc;
    border: 1px solid #cbd5e1;
    color: #334155;
    font-weight: 700;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.sub-pill:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: #ecfdf5;
}

.sub-pill.active {
    background: var(--primary);
    color: #ffffff;
    border-color: var(--primary);
    box-shadow: 0 4px 12px rgba(6, 78, 59, 0.25);
}

/* GRID LAYOUT */
.sip-main-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}

@media (min-width: 1024px) {
    .sip-main-grid {
        grid-template-columns: 5fr 7fr;
    }
}

.sip-glass {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 22px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.02);
}

.client-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

/* SLIDER */
.sip-input-range {
    -webkit-appearance: none;
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: #e2e8f0;
    outline: none;
    cursor: pointer;
}

.sip-input-range::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #fff;
    border: 3.5px solid var(--primary-accent);
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(5, 150, 105, 0.35);
    transition: all 0.2s;
}

.sip-input-range::-webkit-slider-thumb:hover {
    transform: scale(1.15);
    box-shadow: 0 3px 12px rgba(5, 150, 105, 0.5);
}

.sip-input-range::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #fff;
    border: 3.5px solid var(--primary-accent);
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(5, 150, 105, 0.35);
}

/* FORM INPUTS */
.sip-form-input {
    width: 100%;
    padding: 8px 12px;
    border: 1.5px solid #cbd5e1;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    background: #fff;
    color: #091a14;
    outline: none;
    height: 36px;
    transition: all 0.2s ease;
}

select.sip-form-input {
    height: 34px;
    padding-right: 28px;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23059669' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 8px center;
    background-size: 14px;
}

.sip-form-input:focus {
    border-color: var(--primary-accent);
    box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.15);
}

/* BUTTONS */
.sip-btn-primary {
    background: var(--primary-gradient);
    color: white;
    border: none;
    padding: 9px 16px;
    border-radius: 8px;
    font-size: 12.5px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.25s ease;
    box-shadow: 0 4px 14px rgba(3, 43, 32, 0.25);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.sip-btn-primary:hover {
    background: linear-gradient(135deg, #011a13, #043f30);
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(3, 43, 32, 0.35);
}

.sip-btn-secondary {
    background: #fff;
    color: #334155;
    border: 1px solid #cbd5e1;
    padding: 9px 16px;
    border-radius: 8px;
    font-size: 12.5px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.25s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.sip-btn-secondary:hover {
    background: #f8fafc;
    border-color: #94a3b8;
}

/* RESULT CARDS */
.sip-result-card {
    background: #ffffff;
    border-radius: 12px;
    padding: 14px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
}

/* CHARTS */
.sip-chart-container {
    position: relative;
    height: 185px;
    background: #ffffff;
    border-radius: 10px;
    padding: 8px;
    border: 1px solid #e2e8f0;
}

/* TOGGLE SWITCH */
.sip-toggle-label {
    display: inline-flex;
    align-items: center;
    cursor: pointer;
    position: relative;
}

.sip-toggle-input {
    display: none;
}

.sip-toggle-track {
    width: 36px;
    height: 20px;
    background: #cbd5e1;
    border-radius: 9999px;
    position: relative;
    transition: all 0.25s ease;
}

.sip-toggle-dot {
    width: 16px;
    height: 16px;
    background: #fff;
    border-radius: 50%;
    position: absolute;
    top: 2px;
    left: 2px;
    transition: all 0.25s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}

.sip-toggle-input:checked + .sip-toggle-track {
    background: var(--primary-accent);
}

.sip-toggle-input:checked + .sip-toggle-track .sip-toggle-dot {
    left: 18px;
}

/* MODALS */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(1, 23, 17, 0.78);
    backdrop-filter: blur(5px);
    z-index: 5000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-overlay.show {
    display: flex;
}

.modal-box {
    background: #ffffff;
    border-radius: 18px;
    max-width: 920px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 25px 70px rgba(0, 0, 0, 0.5);
    border: 1.5px solid var(--gold-border);
    animation: modalPop 0.25s ease;
}

.modal-header {
    padding: 18px 22px;
    background: radial-gradient(circle at 90% 10%, #0d5f48 0%, #02241b 60%, #01140e 100%);
    color: #fff;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid var(--gold-accent);
}

.modal-header h3 {
    font-size: 16px;
    font-weight: 800;
    color: #ffffff;
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
}

.modal-close {
    background: rgba(255, 255, 255, 0.12);
    border: none;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    font-size: 16px;
    cursor: pointer;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.25);
}

.modal-body {
    padding: 22px;
}

/* BANK-SPECIFIC MODAL */
.sip-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(5px);
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.sip-modal-overlay.active {
    display: flex;
}

.sip-modal-box {
    background: white;
    border-radius: 18px;
    max-width: 880px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.25);
}

/* SUMMARY HIGHLIGHT */
.summary-highlight {
    background: linear-gradient(135deg, #fef9ee 0%, #fff 50%, #fef3c7 100%);
    border: 1.5px solid var(--gold-accent);
    color: #1e293b;
    border-radius: 14px;
    padding: 18px;
    text-align: center;
    margin-bottom: 16px;
    box-shadow: 0 6px 20px rgba(212, 175, 55, 0.15);
}

.summary-highlight .lbl {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 4px;
    color: #854d0e;
    font-weight: 800;
}

.summary-highlight .val {
    font-size: 26px;
    font-weight: 800;
    font-family: 'Space Grotesk', sans-serif;
    color: #064e3b;
}

/* TABLES */
.sip-summary-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
}

.sip-summary-table th {
    background: #032b20;
    color: white;
    padding: 10px 12px;
    text-align: left;
    font-weight: 700;
    font-size: 11px;
    text-transform: uppercase;
}

.sip-summary-table td {
    padding: 10px 12px;
    border-bottom: 1px solid #F1F5F9;
    font-weight: 500;
}

.sip-summary-table tr:hover td {
    background: #ECFDF5;
}

.sip-summary-table .corpus-col {
    color: #064e3b;
    font-weight: 700;
}

.sip-summary-table .invest-col {
    color: var(--primary-accent);
    font-weight: 600;
}

/* ANIMATIONS */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes modalPop {
    from {
        opacity: 0;
        transform: scale(0.96);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* RESPONSIVE */
@media (max-width: 1023px) {
    .sip-main-grid {
        grid-template-columns: 1fr;
    }

    .client-row {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .quick-links-container {
        flex-wrap: wrap;
    }

    .calc-page-header .capsule-row {
        gap: 8px;
    }

    .calculator-card {
        padding: 16px;
        border-radius: 16px;
    }

    .sip-glass {
        padding: 16px;
    }
}
