/* ================================================================
   Bainsun Solar Calculator – Front-end Styles  v2.0
   ================================================================ */

/* ── CSS Custom Properties ─────────────────────────────────── */
.bsc-wrap {
    --bsc-navy:      #1a1a6e;
    --bsc-blue:      #2f38cf;
    --bsc-bg:        #eef0fb;
    --bsc-white:     #ffffff;
    --bsc-border:    #e2e4f3;
    --bsc-text:      #111827;
    --bsc-muted:     #6b7280;
    --bsc-gold:      #f59e0b;
    --bsc-green:     #16a34a;
    --bsc-r-lg:      16px;
    --bsc-r-md:      12px;
    --bsc-r-sm:      8px;
    --bsc-shadow:    0 2px 18px rgba(26,26,110,0.08);
}

/* ── Reset ─────────────────────────────────────────────────── */
.bsc-wrap *,
.bsc-wrap *::before,
.bsc-wrap *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

.bsc-wrap {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 15px;
    line-height: 1.5;
    color: var(--bsc-text);
    max-width: 1060px;
    margin: 0 auto;
    -webkit-font-smoothing: antialiased;
}

/* ── Hero ──────────────────────────────────────────────────── */
.bsc-hero {
    background: linear-gradient(145deg, #0c0c52 0%, #161690 35%, #2530c8 68%, #4a7cf7 100%);
    border-radius: var(--bsc-r-lg) var(--bsc-r-lg) 0 0;
    padding: 48px 32px 44px;
    color: #fff;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.bsc-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 70% 40%, rgba(74,124,247,0.3) 0%, transparent 65%);
    pointer-events: none;
}

.bsc-hero-inner {
    position: relative;
    z-index: 1;
    max-width: 520px;
    margin: 0 auto;
}

.bsc-hero-icon {
    font-size: 40px;
    margin-bottom: 12px;
    display: block;
    filter: drop-shadow(0 2px 10px rgba(255,193,7,0.55));
}

.bsc-hero-title {
    font-size: 30px;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 10px;
    letter-spacing: -0.4px;
    color: #ffffff !important;
}

.bsc-hero-sub {
    font-size: 15px;
    opacity: 0.84;
    line-height: 1.55;
    color: #ffffff !important;
}

/* ── Main layout – always stacked ─────────────────────────── */
.bsc-layout {
    display: flex;
    flex-direction: column;
    gap: 20px;
    background: var(--bsc-bg);
    border-radius: 0 0 var(--bsc-r-lg) var(--bsc-r-lg);
    padding: 24px 20px 28px;
}

/* ── Input panel – full width ──────────────────────────────── */
.bsc-input-panel {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* ── Form card ─────────────────────────────────────────────── */
.bsc-form-card {
    background: var(--bsc-white);
    border-radius: var(--bsc-r-md);
    padding: 22px 20px 20px;
    box-shadow: var(--bsc-shadow);
    display: flex;
    flex-direction: column;
    gap: 18px;
}

/* ── Field ─────────────────────────────────────────────────── */
.bsc-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.bsc-label-row {
    display: flex;
    align-items: center;
    gap: 7px;
}

.bsc-label {
    font-weight: 700;
    font-size: 15px;
    color: var(--bsc-text);
}

.bsc-info-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 17px;
    height: 17px;
    border: 1.5px solid #9ca3af;
    border-radius: 50%;
    font-size: 10px;
    font-style: normal;
    font-weight: 700;
    color: #9ca3af;
    cursor: help;
    flex-shrink: 0;
    line-height: 1;
    user-select: none;
}

/* ── Slider limits ─────────────────────────────────────────── */
.bsc-slider-limits {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: var(--bsc-muted);
    font-weight: 500;
}

/* ── Slider container ──────────────────────────────────────── */
.bsc-slider-wrap {
    position: relative;
    padding-bottom: 42px;
    padding-top: 4px;
}

/* ── Range input ───────────────────────────────────────────── */
.bsc-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 6px;
    border-radius: 3px;
    outline: none;
    cursor: pointer;
    background: #e5e7eb;
}

.bsc-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: #fff;
    border: 3px solid var(--bsc-blue);
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(47,56,207,0.28);
    transition: transform 0.12s, box-shadow 0.12s;
}

.bsc-slider::-webkit-slider-thumb:hover {
    transform: scale(1.12);
    box-shadow: 0 3px 16px rgba(47,56,207,0.42);
}

.bsc-slider::-moz-range-thumb {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: #fff;
    border: 3px solid var(--bsc-blue);
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(47,56,207,0.28);
}

.bsc-slider::-moz-range-track {
    height: 6px;
    border-radius: 3px;
    background: #e5e7eb;
}

/* ── Value bubble ──────────────────────────────────────────── */
.bsc-slider-thumb-value {
    position: absolute;
    bottom: 0;
    background: var(--bsc-navy);
    color: #fff;
    padding: 5px 14px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 700;
    transform: translateX(-50%);
    white-space: nowrap;
    pointer-events: none;
    transition: left 0.04s linear;
    letter-spacing: 0.02em;
}

/* Arrow pointing UP toward thumb */
.bsc-slider-thumb-value::before {
    content: '';
    position: absolute;
    top: -8px;
    left: 50%;
    transform: translateX(-50%);
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-bottom: 8px solid var(--bsc-navy);
}

/* ── Calculate button ──────────────────────────────────────── */
.bsc-btn-primary {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: var(--bsc-navy);
    color: #fff;
    border: none;
    border-radius: var(--bsc-r-sm);
    padding: 15px 24px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    cursor: pointer;
    width: 100%;
    transition: background 0.2s, box-shadow 0.2s, transform 0.1s;
    text-decoration: none;
    font-family: inherit;
    line-height: 1;
}

.bsc-btn-primary:hover {
    background: var(--bsc-blue);
    box-shadow: 0 6px 22px rgba(47,56,207,0.35);
    transform: translateY(-1px);
    color: #fff;
    text-decoration: none;
}

.bsc-btn-primary:active { transform: translateY(0); }

.bsc-btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: #fff;
    color: var(--bsc-blue);
    border: 2px solid var(--bsc-blue);
    border-radius: var(--bsc-r-sm);
    padding: 13px 24px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.2s;
    font-family: inherit;
}

.bsc-btn-secondary:hover { background: #f0f2ff; text-decoration: none; }
.bsc-btn-cta { max-width: 260px; }

/* ── Spinner ───────────────────────────────────────────────── */
.bsc-spinner {
    width: 18px;
    height: 18px;
    border: 3px solid rgba(255,255,255,0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: bsc-spin 0.7s linear infinite;
    display: inline-block;
    flex-shrink: 0;
}

@keyframes bsc-spin {
    to { transform: rotate(360deg); }
}

/* ── Results panel – full width ────────────────────────────── */
.bsc-results-panel {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 16px;
    animation: bsc-fade-in 0.4s ease both;
}

@keyframes bsc-fade-in {
    from { opacity: 0; transform: translateY(14px); }
    to   { opacity: 1; transform: translateY(0); }
}

.bsc-result-section {
    background: var(--bsc-white);
    border-radius: var(--bsc-r-md);
    padding: 18px 18px 16px;
    box-shadow: var(--bsc-shadow);
}

.bsc-section-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--bsc-navy);
    text-align: center;
    margin-bottom: 14px;
    letter-spacing: 0.01em;
}

/* ── 2/3-col data cards ────────────────────────────────────── */
.bsc-2col-card,
.bsc-3col-card {
    display: flex;
    align-items: stretch;
    border: 1.5px solid var(--bsc-border);
    border-radius: 10px;
    overflow: hidden;
}

.bsc-col {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 14px 8px;
    text-align: center;
    min-width: 0;
}

.bsc-divider-v {
    width: 1px;
    background: var(--bsc-border);
    flex-shrink: 0;
    align-self: stretch;
}

.bsc-col-icon { font-size: 20px; line-height: 1; margin-bottom: 2px; }

.bsc-col-label {
    font-size: 12px;
    color: var(--bsc-muted);
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.bsc-col-value {
    font-size: 20px;
    font-weight: 800;
    color: var(--bsc-navy);
    line-height: 1.1;
}

.bsc-col-value small {
    font-size: 12px;
    font-weight: 500;
    color: #9ca3af;
}

/* ── Info box ──────────────────────────────────────────────── */
.bsc-info-box {
    margin-top: 10px;
    background: #f7f8ff;
    border-radius: var(--bsc-r-sm);
    padding: 10px 14px;
    font-size: 12.5px;
    color: var(--bsc-muted);
    text-align: center;
    line-height: 1.55;
}

.bsc-link { color: var(--bsc-blue); font-weight: 600; cursor: pointer; text-decoration: none; }
.bsc-link:hover { text-decoration: underline; }

/* ── Savings section ───────────────────────────────────────── */
.bsc-savings-card { display: flex; flex-direction: column; gap: 12px; }
.bsc-savings-subtitle { font-size: 13px; color: var(--bsc-muted); text-align: center; }

.bsc-money { color: var(--bsc-navy) !important; }
.bsc-green { color: var(--bsc-green) !important; }

/* ── 5yr savings highlight ─────────────────────────────────── */
.bsc-gz-box {
    background: #fefce8;
    border: 1.5px solid #fde68a;
    border-radius: 10px;
    padding: 14px 12px;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.bsc-gz-amount {
    font-size: 24px;
    font-weight: 800;
    color: var(--bsc-navy);
    display: block;
}

.bsc-gz-label {
    font-size: 12.5px;
    color: #78716c;
    display: block;
}

/* ── EMI bar ───────────────────────────────────────────────── */
.bsc-emi-box {
    margin-top: 12px;
    background: #f7f8ff;
    border-radius: var(--bsc-r-sm);
    padding: 10px 14px;
    font-size: 13px;
    color: var(--bsc-muted);
    text-align: center;
    display: flex;
    flex-wrap: wrap;
    gap: 4px 6px;
    align-items: center;
    justify-content: center;
}

.bsc-emi-value { font-size: 16px; font-weight: 800; color: var(--bsc-navy) !important; }

/* ── CTA ───────────────────────────────────────────────────── */
.bsc-cta-section { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; }

/* ── Disclaimer ────────────────────────────────────────────── */
.bsc-disclaimer {
    background: var(--bsc-white);
    border-radius: var(--bsc-r-md);
    padding: 14px 18px;
    font-size: 11.5px;
    color: #9ca3af;
    box-shadow: var(--bsc-shadow);
    line-height: 1.65;
}

.bsc-disclaimer strong {
    color: #6b7280;
    display: block;
    margin-bottom: 6px;
    font-size: 12px;
    font-weight: 600;
}

.bsc-disclaimer ol { padding-left: 18px; display: flex; flex-direction: column; gap: 6px; }

/* ================================================================
   Two-column page wrapper (desktop)
   ================================================================ */
.bsc-page-wrap {
    display: flex;
    gap: 40px;
    align-items: flex-start;
}

/* LEFT – calculator column */
.bsc-calc-col {
    flex: 0 0 500px;
    max-width: 500px;
    min-width: 0;
}

/* RIGHT – info content column */
.bsc-info-col {
    flex: 1;
    min-width: 0;
    padding-top: 4px;
}

/* ── Info section spacing ─────────────────────────────────── */
.bsc-info-section { margin-bottom: 8px; }

.bsc-info-divider {
    border: none;
    border-top: 1.5px solid #e2e4f3;
    margin: 24px 0;
}

/* ── Info headings ────────────────────────────────────────── */
.bsc-info-h2 {
    font-size: 17px;
    font-weight: 800;
    color: var(--bsc-navy);
    margin-bottom: 10px;
    line-height: 1.3;
    letter-spacing: -0.2px;
}

/* ── Info paragraphs ──────────────────────────────────────── */
.bsc-info-p {
    font-size: 13.5px;
    color: #374151;
    line-height: 1.75;
    margin-bottom: 10px;
}
.bsc-info-p--small { font-size: 13px; color: var(--bsc-muted); }

/* ── Journey steps ────────────────────────────────────────── */
.bsc-journey-steps {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-top: 12px;
}

.bsc-step { display: flex; gap: 12px; align-items: flex-start; }

.bsc-step-icon {
    font-size: 20px;
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    background: #eef0fb;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.bsc-step-body { flex: 1; }

.bsc-step-title {
    font-size: 13.5px;
    font-weight: 700;
    color: var(--bsc-navy);
    margin-bottom: 3px;
}

.bsc-step-desc {
    font-size: 12.5px;
    color: #4b5563;
    line-height: 1.6;
    margin: 0;
}

/* ── Feature grid ─────────────────────────────────────────── */
.bsc-feature-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin: 12px 0;
}

.bsc-feature { display: flex; gap: 10px; align-items: flex-start; }
.bsc-feature-icon { font-size: 17px; flex-shrink: 0; margin-top: 1px; }

.bsc-feature strong {
    display: block;
    font-size: 12.5px;
    font-weight: 700;
    color: var(--bsc-navy);
    margin-bottom: 2px;
}

.bsc-feature p {
    font-size: 12px;
    color: #4b5563;
    line-height: 1.5;
    margin: 0;
}

/* ── How it works ─────────────────────────────────────────── */
.bsc-how-steps {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 10px;
}

.bsc-how-step {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 13px;
    color: #374151;
}

.bsc-how-num {
    width: 24px;
    height: 24px;
    background: var(--bsc-navy);
    color: #fff;
    border-radius: 50%;
    font-size: 11px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* ── Bullet list ──────────────────────────────────────────── */
.bsc-info-list {
    padding-left: 18px;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 5px;
}
.bsc-info-list li { font-size: 13px; color: #374151; line-height: 1.6; }

/* ── CTA box ──────────────────────────────────────────────── */
.bsc-info-cta-box {
    background: #f7f8ff;
    border: 1.5px solid var(--bsc-border);
    border-radius: var(--bsc-r-md);
    padding: 20px 18px;
}
.bsc-info-tagline { font-size: 13.5px; color: var(--bsc-navy); margin-top: 8px; }

/* ================================================================
   Responsive
   ================================================================ */

/* ── ≤960px : hide info column, full-width calculator ──────── */
@media (max-width: 960px) {
    .bsc-page-wrap  { display: block; }
    .bsc-calc-col   { width: 100%; max-width: 100%; }
    .bsc-info-col   { display: none; }          /* hidden on tablet/mobile */
}

/* ── ≤768px : hero + layout adjustments ───────────────────── */
@media (max-width: 768px) {
    .bsc-wrap { font-size: 14px; }

    .bsc-hero {
        border-radius: var(--bsc-r-md) var(--bsc-r-md) 0 0;
        padding: 32px 20px 28px;
    }
    .bsc-hero-title { font-size: 22px; }
    .bsc-hero-sub   { font-size: 14px; }
    .bsc-hero-icon  { font-size: 34px; }

    .bsc-layout { padding: 16px 14px 20px; gap: 14px; }

    .bsc-form-card  { padding: 18px 16px; gap: 16px; }

    /* Slider touch target – bigger thumb */
    .bsc-slider::-webkit-slider-thumb { width: 30px; height: 30px; }
    .bsc-slider::-moz-range-thumb     { width: 30px; height: 30px; }

    /* Button – full tap area */
    .bsc-btn-primary  { padding: 16px 20px; font-size: 14px; }
    .bsc-btn-secondary { padding: 14px 20px; }

    /* Result section */
    .bsc-result-section { padding: 14px 14px 12px; }
    .bsc-section-title  { font-size: 14px; margin-bottom: 10px; }

    /* 3-col keeps row layout on tablet */
    .bsc-3col-card .bsc-col-value { font-size: 16px; }
    .bsc-3col-card .bsc-col-label { font-size: 11px; }

    /* Savings gz */
    .bsc-gz-amount { font-size: 20px; }

    /* EMI box wraps neatly */
    .bsc-emi-box { font-size: 12px; gap: 3px 5px; }
    .bsc-emi-value { font-size: 14px; }
}

/* ── ≤480px : small phones ─────────────────────────────────── */
@media (max-width: 480px) {
    .bsc-hero-title { font-size: 18px; }
    .bsc-hero-sub   { font-size: 13px; }
    .bsc-hero        { padding: 26px 16px 22px; }

    .bsc-layout      { padding: 12px 10px 16px; gap: 12px; }
    .bsc-form-card   { padding: 14px 12px; gap: 14px; }

    /* Slider value bubble – slightly smaller */
    .bsc-slider-thumb-value { font-size: 13px; padding: 4px 10px; }

    /* 3-col row on small phones */
    .bsc-3col-card { flex-direction: row; }
    .bsc-3col-card .bsc-divider-v { width: 1px; align-self: stretch; }
    .bsc-3col-card .bsc-col       { padding: 10px 4px; }
    .bsc-3col-card .bsc-col-value { font-size: 14px; }
    .bsc-3col-card .bsc-col-label { font-size: 10px; }

    .bsc-2col-card .bsc-col-value { font-size: 17px; }
    .bsc-2col-card .bsc-col       { padding: 12px 8px; }

    .bsc-gz-amount   { font-size: 18px; }
    .bsc-gz-label    { font-size: 11.5px; }

    .bsc-disclaimer  { font-size: 11px; }
    .bsc-btn-primary { font-size: 13px; padding: 15px 16px; }
}

/* ── ≤360px : very small phones ────────────────────────────── */
@media (max-width: 360px) {
    .bsc-3col-card { flex-direction: column; }
    .bsc-3col-card .bsc-divider-v { width: 100%; height: 1px; }
    .bsc-3col-card .bsc-col       { padding: 10px 8px; }
    .bsc-3col-card .bsc-col-value { font-size: 18px; }
    .bsc-3col-card .bsc-col-label { font-size: 12px; }
}
