/*
 * Calculator Styles — EnergySae v2.0 (Brand-aligned)
 * Author: hafidz
 */

/* =========================================
   CALCULATOR PAGE LAYOUT
   ========================================= */
.calc-section-title {
    text-align: center;
    margin-bottom: 48px;
}

.calc-section-title h1 {
    font-size: clamp(28px, 5vw, 44px);
    font-weight: 900;
    letter-spacing: -1px;
    margin-bottom: 12px;
    color: var(--navy);
}

.calc-section-title h1 .accent { color: var(--forest); }

.calc-subtitle {
    color: var(--text-muted);
    font-size: 16px;
    max-width: 560px;
    margin: 0 auto;
    line-height: 1.7;
}

/* =========================================
   GRID LAYOUT
   ========================================= */
.calc-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 28px;
}

@media (max-width: 860px) {
    .calc-grid { grid-template-columns: 1fr; }
}

/* =========================================
   INPUTS
   ========================================= */
.form-group {
    margin-bottom: 24px;
}

.form-label {
    display: block;
    font-family: var(--font-heading);
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--navy);
}

/* Slider value display */
.slider-val-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.slider-display-box {
    font-family: var(--font-heading);
    font-size: 17px;
    font-weight: 800;
    color: var(--solar-dark);
    background: rgba(249, 190, 20, 0.10);
    padding: 5px 14px;
    border-radius: var(--radius-pill);
    border: 1px solid rgba(249, 190, 20, 0.22);
}

.cng-theme-display {
    color: var(--forest);
    background: rgba(30, 94, 44, 0.08);
    border-color: rgba(30, 94, 44, 0.20);
}

/* Range Slider */
.range-slider {
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: #DDE8D5;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
    cursor: pointer;
}

.range-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #fff;
    cursor: pointer;
    border: 3px solid var(--solar);
    box-shadow: 0 2px 8px rgba(249, 190, 20, 0.35);
    transition: transform 0.15s ease;
}

.cng-slider::-webkit-slider-thumb {
    border-color: var(--forest);
    box-shadow: 0 2px 8px rgba(30, 94, 44, 0.25);
}

.range-slider::-webkit-slider-thumb:hover { transform: scale(1.2); }

.slider-hints {
    display: flex;
    justify-content: space-between;
    margin-top: 7px;
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 500;
}

/* Toggle Buttons (fuel type switch) */
.toggle-buttons {
    display: flex;
    background: rgba(30, 94, 44, 0.06);
    border: 1px solid rgba(30, 94, 44, 0.12);
    border-radius: var(--radius-pill);
    padding: 4px;
    gap: 4px;
}

.toggle-btn {
    flex: 1;
    padding: 10px 16px;
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 13px;
    color: var(--text-muted);
    background: none;
    border: none;
    cursor: pointer;
    border-radius: var(--radius-pill);
    transition: all 0.3s ease;
}

.toggle-btn.active { color: #fff; }
.toggle-btn-plts.active { background: var(--solar-dark); box-shadow: 0 2px 8px rgba(249,190,20,0.25); color: #fff; }
.toggle-btn-cng.active  { background: var(--forest); box-shadow: 0 2px 8px rgba(30,94,44,0.25); }

/* Text input + unit */
.input-with-unit {
    position: relative;
    display: flex;
    align-items: center;
}

.text-input {
    width: 100%;
    padding: 12px 18px;
    background: #fff;
    border: 1.5px solid rgba(30, 94, 44, 0.15);
    border-radius: var(--radius-pill);
    color: var(--text-color);
    font-family: var(--font-body);
    font-size: 15px;
    outline: none;
    transition: border-color 0.25s ease, box-shadow 0.25s ease;
    -webkit-appearance: none;
    appearance: none;
}

.text-input:focus {
    border-color: var(--forest);
    box-shadow: 0 0 0 3px rgba(30, 94, 44, 0.10);
}

.cng-input:focus {
    border-color: var(--forest);
    box-shadow: 0 0 0 3px rgba(30, 94, 44, 0.10);
}

.input-unit-label {
    position: absolute;
    right: 18px;
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 600;
    pointer-events: none;
    background: #fff;
    padding-left: 6px;
}

/* =========================================
   OUTPUT PANEL
   ========================================= */
.calc-output-box {
    background: linear-gradient(160deg, #F5FCF0 0%, #fff 100%);
    border: 1.5px solid rgba(141, 198, 63, 0.22);
    box-shadow: 0 8px 32px -8px rgba(30, 94, 44, 0.12);
    border-radius: var(--radius-lg) !important;
}

.calc-output-box-cng {
    background: linear-gradient(160deg, #F0F9F1 0%, #fff 100%);
    border-color: rgba(30, 94, 44, 0.18);
    box-shadow: 0 8px 32px -8px rgba(30, 94, 44, 0.12);
}

.output-header {
    border-bottom: 1px solid rgba(30, 94, 44, 0.08);
    padding-bottom: 16px;
    margin-bottom: 24px;
}

.output-header h3 {
    font-size: 20px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--navy);
}

.output-header i { color: var(--solar-dark); }
.calc-output-box-cng .output-header i { color: var(--forest); }

/* Metric rows */
.output-metrics {
    display: flex;
    flex-direction: column;
    gap: 18px;
    margin-bottom: 28px;
}

.metric-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px dashed rgba(14, 32, 64, 0.06);
    padding-bottom: 14px;
}
.metric-row:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.metric-label {
    color: var(--text-muted);
    font-size: 14px;
    font-weight: 500;
}

.metric-value {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 18px;
    color: var(--navy);
    text-align: right;
}

.metric-highlight {
    font-size: 26px;
    color: var(--solar-dark) !important;
    font-weight: 900;
}

.cng-highlight {
    color: var(--forest) !important;
}

.metric-note {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 3px;
    text-align: right;
}

/* ROI highlight box */
.metric-row-highlight {
    background: rgba(141, 198, 63, 0.08);
    padding: 14px;
    border-radius: 12px;
    border: 1px solid rgba(141, 198, 63, 0.18) !important;
}

/* =========================================
   COST COMPARISON BAR CHART
   ========================================= */
.cost-comparison-container {
    margin-top: 24px;
    padding: 20px;
    background: rgba(14, 32, 64, 0.03);
    border-radius: 16px;
    border: 1px solid rgba(14, 32, 64, 0.06);
}

.comparison-title {
    font-family: var(--font-heading);
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 16px;
    color: var(--navy);
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.comp-bar-group {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.comp-bar-row {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.comp-bar-labels {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 500;
}

.comp-bar-wrapper {
    height: 10px;
    background: #DDE8D5;
    border-radius: var(--radius-pill);
    overflow: hidden;
}

.comp-bar-fill {
    height: 100%;
    border-radius: var(--radius-pill);
    transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.comp-bar-fill.current { background: #D04040; }
.comp-bar-fill.new-cng { background: var(--forest); }

/* =========================================
   WHATSAPP CTA
   ========================================= */
.cta-container { margin-top: 8px; }

.calc-whatsapp-btn {
    width: 100%;
    padding: 15px;
    font-family: var(--font-heading);
    font-size: 15px;
    font-weight: 700;
    border-radius: var(--radius-pill);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: #25D366;
    color: #fff;
    box-shadow: 0 4px 16px rgba(37, 211, 102, 0.25);
    transition: all 0.3s ease;
    text-decoration: none;
}

.calc-whatsapp-btn:hover {
    background: #1EB557;
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(37, 211, 102, 0.38);
    color: #fff;
}

/* PLTS calc note helper */
.calc-note {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 8px;
    padding: 10px 14px;
    background: rgba(249, 190, 20, 0.06);
    border-left: 3px solid var(--solar);
    border-radius: 0 8px 8px 0;
    line-height: 1.6;
}
