/* ============================================================
   Braces Payment Calculator — Frontend Styles
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600&family=DM+Serif+Display&display=swap');

/* ── Wrapper ─────────────────────────────────────────────── */
.bpc-wrap {
    font-family: 'DM Sans', sans-serif;
    max-width: 1100px;
    margin: 0 auto;
    padding: 32px 20px 48px;
    color: #1a1a2e;
}

/* ── Header Ranges ───────────────────────────────────────── */
.bpc-header {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 0;
    justify-content: space-between;
    align-items: flex-end;
    border-bottom: 2px solid #e8e8f0;
    padding-bottom: 28px;
    margin-bottom: 44px;
}

.bpc-header-item {
    text-align: center;
    flex: 1 1 200px;
}

.bpc-header-label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: #888;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    line-height: 1.5;
    margin-bottom: 6px;
}

.bpc-header-value {
    display: block;
    font-family: 'DM Serif Display', serif;
    font-size: 22px;
    color: #c0392b;
    letter-spacing: -0.01em;
}

/* ── Main Layout ─────────────────────────────────────────── */
.bpc-main {
    display: flex;
    gap: 40px;
    align-items: stretch;
}

.bpc-sliders {
    flex: 1 1 0;
    display: flex;
    flex-direction: column;
    gap: 32px;
}

/* ── Slider Groups ───────────────────────────────────────── */
.bpc-slider-group {
    position: relative;
}

.bpc-slider-header {
    display: flex;
    align-items: baseline;
    gap: 12px;
    margin-bottom: 10px;
}

.bpc-slider-label {
    font-size: 14px;
    font-weight: 500;
    color: #555;
    min-width: 160px;
}

.bpc-slider-value {
    font-family: 'DM Serif Display', serif;
    font-size: 20px;
    color: #c0392b;
    font-weight: 400;
    min-width: 100px;
}

/* ── Custom Range Track ──────────────────────────────────── */
.bpc-track-wrap {
    position: relative;
    height: 20px;
    display: flex;
    align-items: center;
}

.bpc-range {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 6px;
    border-radius: 3px;
    outline: none;
    cursor: pointer;
    background: linear-gradient(to right, #3fc7a0 0%, #3fc7a0 var(--pct, 0%), #dde2ee var(--pct, 0%), #dde2ee 100%);
    transition: background 0.05s;
}

/* Thumb — WebKit */
.bpc-range::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: radial-gradient(circle at 40% 35%, #5dd4b4, #29a882);
    border: 3px solid #fff;
    box-shadow: 0 2px 8px rgba(47,185,140,.45), 0 0 0 2px rgba(47,185,140,.15);
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.15s;
}
.bpc-range::-webkit-slider-thumb:hover,
.bpc-range:active::-webkit-slider-thumb {
    transform: scale(1.2);
    box-shadow: 0 3px 14px rgba(47,185,140,.6), 0 0 0 4px rgba(47,185,140,.2);
}

/* Thumb — Firefox */
.bpc-range::-moz-range-thumb {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: radial-gradient(circle at 40% 35%, #5dd4b4, #29a882);
    border: 3px solid #fff;
    box-shadow: 0 2px 8px rgba(47,185,140,.45);
    cursor: pointer;
    transition: transform 0.15s;
}
.bpc-range::-moz-range-thumb:hover {
    transform: scale(1.2);
}

/* Firefox track */
.bpc-range::-moz-range-track {
    height: 6px;
    border-radius: 3px;
    background: #dde2ee;
}
.bpc-range::-moz-range-progress {
    height: 6px;
    border-radius: 3px;
    background: #3fc7a0;
}

/* Bounds labels */
.bpc-slider-bounds {
    display: flex;
    justify-content: space-between;
    margin-top: 6px;
    font-size: 12px;
    color: #999;
    font-weight: 500;
}

/* ── Result Panel ────────────────────────────────────────── */
.bpc-result-panel {
    flex: 0 0 300px;
    border: 2px solid #d63031;
    border-radius: 16px;
    background: #fafbff;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px 24px;
    box-shadow: 0 4px 24px rgba(214,48,49,.08);
    position: relative;
    overflow: hidden;
}

.bpc-result-panel::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 50% 0%, rgba(214,48,49,.05) 0%, transparent 70%);
    pointer-events: none;
}

.bpc-result-inner {
    text-align: center;
    position: relative;
    z-index: 1;
    width: 100%;
}

.bpc-result-label {
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.12em;
    color: #3a86a8;
    text-transform: uppercase;
    margin: 0 0 10px;
}

.bpc-result-amount {
    font-family: 'DM Serif Display', serif;
    font-size: 42px;
    color: #3a86a8;
    margin: 0 0 28px;
    line-height: 1.1;
    letter-spacing: -0.02em;
    transition: transform 0.2s, opacity 0.2s;
}

.bpc-result-amount.bpc-pulse {
    transform: scale(1.06);
    opacity: 0.8;
}



/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 760px) {
    .bpc-main {
        flex-direction: column;
    }

    .bpc-result-panel {
        flex: none;
        width: 100%;
        box-sizing: border-box;
    }

    .bpc-header {
        gap: 20px;
        justify-content: center;
    }

    .bpc-header-item {
        flex: 1 1 140px;
    }

    .bpc-slider-label {
        min-width: 130px;
        font-size: 13px;
    }

    .bpc-result-amount {
        font-size: 36px;
    }
}

@media (max-width: 480px) {
    .bpc-wrap {
        padding: 20px 12px 32px;
    }

    .bpc-slider-header {
        flex-direction: column;
        gap: 2px;
        margin-bottom: 8px;
    }

    .bpc-slider-value {
        font-size: 18px;
    }
}
