/* ================================================================
   Solar Savings Form Widget
   ================================================================ */

.stbp-solar-savings-form {
    display: flex;
    flex-direction: column;
    gap: var(--stbp-form-gap, 28px);
    box-sizing: border-box;
}

/* ── Slider wrap ─────────────────────────────────────────────── */
.stbp-solar-slider-wrap {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.stbp-slider-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
}

.stbp-slider-label {
    font-size: 11px;
    letter-spacing: 1.8px;
    text-transform: uppercase;
    font-weight: 500;
    color: var(--stbp-label-color, rgba(255, 255, 255, 0.55));
    line-height: 1.4;
}

.stbp-slider-value {
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0.5px;
    white-space: nowrap;
    color: var(--stbp-value-color, #E8960A);
}

/* ── Range input ─────────────────────────────────────────────── */
.stbp-solar-slider-input {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: var(--stbp-track-height, 3px);
    border-radius: var(--stbp-track-radius, 3px);
    outline: none;
    border: none;
    cursor: pointer;
    background: linear-gradient(
        to right,
        var(--stbp-slider-active, #E8960A) var(--stbp-fill-pct, 30%),
        var(--stbp-slider-track, rgba(255, 255, 255, 0.15)) var(--stbp-fill-pct, 30%)
    );
    padding: 0;
    margin: 0;
}

/* Webkit thumb */
.stbp-solar-slider-input::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: var(--stbp-thumb-size, 22px);
    height: var(--stbp-thumb-size, 22px);
    border-radius: 50%;
    background: var(--stbp-thumb-color, #E8960A);
    cursor: pointer;
    border: var(--stbp-thumb-border-width, 3px) solid var(--stbp-thumb-border-color, rgba(255, 255, 255, 0.45));
    box-shadow: 0 0 0 4px rgba(232, 150, 10, 0.18);
    transition: box-shadow 0.2s ease;
}
.stbp-solar-slider-input::-webkit-slider-thumb:hover,
.stbp-solar-slider-input:active::-webkit-slider-thumb {
    box-shadow: 0 0 0 8px rgba(232, 150, 10, 0.25);
}

/* Firefox thumb */
.stbp-solar-slider-input::-moz-range-thumb {
    width: var(--stbp-thumb-size, 22px);
    height: var(--stbp-thumb-size, 22px);
    border-radius: 50%;
    background: var(--stbp-thumb-color, #E8960A);
    cursor: pointer;
    border: var(--stbp-thumb-border-width, 3px) solid var(--stbp-thumb-border-color, rgba(255, 255, 255, 0.45));
    box-shadow: 0 0 0 4px rgba(232, 150, 10, 0.18);
}
.stbp-solar-slider-input::-moz-range-track {
    background: transparent;
    height: var(--stbp-track-height, 3px);
}

/* ── Select / Dropdown ───────────────────────────────────────── */
.stbp-solar-select-wrap {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.stbp-solar-select {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    padding: var(--stbp-select-padding-top, 12px)
             var(--stbp-select-padding-right, 40px)
             var(--stbp-select-padding-bottom, 12px)
             var(--stbp-select-padding-left, 16px);
    background-color: var(--stbp-select-bg, rgba(255, 255, 255, 0.07));
    color: var(--stbp-select-color, rgba(255, 255, 255, 0.85));
    border: 1px solid var(--stbp-select-border-color, rgba(255, 255, 255, 0.15));
    border-radius: var(--stbp-select-radius, 6px);
    font-size: var(--stbp-select-font-size, 14px);
    outline: none;
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='7' viewBox='0 0 12 7'%3E%3Cpolyline points='1,1 6,6 11,1' fill='none' stroke='%23E8960A' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    transition: border-color 0.2s ease, background-color 0.2s ease;
    box-sizing: border-box;
}
.stbp-solar-select:focus {
    border-color: var(--stbp-select-focus-color, #E8960A);
}
.stbp-solar-select option {
    background: #222;
    color: #fff;
}

/* ── Responsive defaults ─────────────────────────────────────── */
@media (max-width: 1024px) {
    .stbp-solar-savings-form {
        gap: var(--stbp-form-gap-tablet, var(--stbp-form-gap, 22px));
    }
}
@media (max-width: 767px) {
    .stbp-solar-savings-form {
        gap: var(--stbp-form-gap-mobile, var(--stbp-form-gap, 20px));
    }
    .stbp-slider-label {
        font-size: 10px;
        letter-spacing: 1.2px;
    }
    .stbp-slider-value {
        font-size: 13px;
    }
    .stbp-solar-slider-input::-webkit-slider-thumb {
        width: calc(var(--stbp-thumb-size, 22px) - 4px);
        height: calc(var(--stbp-thumb-size, 22px) - 4px);
    }
}
