/**
 * SolarTech Calculator V2
 * Premium RTL Interface
 */

.st-calculator {
    --st-green: #74b72e;
    --st-green-dark: #5a9821;
    --st-green-soft: #f3f9ec;
    --st-dark: #17221b;
    --st-text: #354039;
    --st-muted: #748078;
    --st-border: #e3e9e4;
    --st-bg: #f7f9f7;
    --st-white: #ffffff;
    --st-warning: #fff8e8;
    --st-warning-border: #f0d99b;
    --st-danger: #b93d3d;
    --st-radius: 18px;
    --st-shadow: 0 12px 38px rgba(20, 42, 26, .07);

    width: 100%;
    direction: rtl;
    font-family: "Vazirmatn", Tahoma, Arial, sans-serif;
    color: var(--st-text);
    line-height: 1.8;
    box-sizing: border-box;
}

.st-calculator *,
.st-calculator *::before,
.st-calculator *::after {
    box-sizing: border-box;
}

.st-calculator button,
.st-calculator input,
.st-calculator select {
    font-family: inherit;
}

.st-shell {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
}


/* =====================================================
   HEADER
===================================================== */

.st-header {
    position: relative;
    overflow: hidden;
    padding: 42px 42px 38px;
    margin-bottom: 24px;
    border-radius: 24px;
    background:
        radial-gradient(
            circle at 10% 10%,
            rgba(116, 183, 46, .16),
            transparent 32%
        ),
        linear-gradient(
            135deg,
            #17221b 0%,
            #22382a 100%
        );
    color: #fff;
}

.st-header::after {
    content: "";
    position: absolute;
    width: 260px;
    height: 260px;
    left: -80px;
    bottom: -130px;
    border: 1px solid rgba(255, 255, 255, .08);
    border-radius: 50%;
}

.st-kicker {
    display: inline-flex;
    align-items: center;
    padding: 6px 14px;
    margin-bottom: 12px;
    border-radius: 50px;
    background: rgba(116, 183, 46, .16);
    color: #b9e98b;
    font-size: 13px;
    font-weight: 700;
}

.st-header h2 {
    margin: 0 0 10px;
    color: #fff;
    font-size: clamp(26px, 3vw, 38px);
    font-weight: 800;
    line-height: 1.45;
}

.st-header > p {
    max-width: 720px;
    margin: 0;
    color: rgba(255, 255, 255, .78);
    font-size: 15px;
}

.st-privacy {
    display: inline-flex;
    align-items: center;
    margin-top: 20px;
    padding: 8px 13px;
    border: 1px solid rgba(255, 255, 255, .1);
    border-radius: 10px;
    background: rgba(255, 255, 255, .06);
    color: rgba(255, 255, 255, .82);
    font-size: 12px;
}


/* =====================================================
   SECTIONS
===================================================== */

.st-section {
    margin-bottom: 22px;
    padding: 32px;
    border: 1px solid var(--st-border);
    border-radius: var(--st-radius);
    background: var(--st-white);
    box-shadow: var(--st-shadow);
}

.st-section-head {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    margin-bottom: 25px;
}

.st-step {
    display: flex;
    flex: 0 0 38px;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--st-green-soft);
    color: var(--st-green-dark);
    font-size: 15px;
    font-weight: 800;
}

.st-section-head h3 {
    margin: 1px 0 4px;
    color: var(--st-dark);
    font-size: 20px;
    font-weight: 800;
    line-height: 1.55;
}

.st-section-head p {
    margin: 0;
    color: var(--st-muted);
    font-size: 13px;
}


/* =====================================================
   GOAL CARDS
===================================================== */

.st-goal-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
}

.st-goal-card {
    position: relative;
    min-height: 180px;
    padding: 24px 18px;
    border: 1px solid var(--st-border);
    border-radius: 16px;
    background: #fff;
    color: var(--st-text);
    text-align: right;
    cursor: pointer;
    transition:
        border-color .2s ease,
        transform .2s ease,
        box-shadow .2s ease,
        background .2s ease;
}

.st-goal-card:hover {
    transform: translateY(-3px);
    border-color: rgba(116, 183, 46, .55);
    box-shadow: 0 10px 25px rgba(29, 65, 36, .08);
}

.st-goal-card.is-active {
    border: 2px solid var(--st-green);
    background: var(--st-green-soft);
}

.st-goal-card.is-active::after {
    content: "✓";
    position: absolute;
    top: 12px;
    left: 12px;
    display: flex;
    width: 25px;
    height: 25px;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--st-green);
    color: #fff;
    font-size: 12px;
    font-weight: 800;
}

.st-goal-icon {
    display: block;
    margin-bottom: 13px;
    font-size: 29px;
}

.st-goal-card strong {
    display: block;
    margin-bottom: 7px;
    color: var(--st-dark);
    font-size: 16px;
}

.st-goal-card small {
    display: block;
    color: var(--st-muted);
    font-size: 12px;
    line-height: 1.8;
}


/* =====================================================
   FORM
===================================================== */

.st-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.st-field {
    display: flex;
    flex-direction: column;
    gap: 7px;
    margin: 0;
}

.st-field > span {
    color: var(--st-dark);
    font-size: 13px;
    font-weight: 700;
}

.st-field > span small {
    display: block;
    margin-top: 2px;
    color: var(--st-muted);
    font-size: 10px;
    font-weight: 400;
}

.st-field > small {
    color: var(--st-muted);
    font-size: 10px;
    line-height: 1.7;
}

.st-calculator input[type="number"],
.st-calculator input[type="text"],
.st-calculator input[type="tel"],
.st-calculator select {
    width: 100%;
    min-height: 50px;
    padding: 10px 14px;
    border: 1px solid #dce3dd;
    border-radius: 11px;
    outline: none;
    background: #fff;
    color: var(--st-dark);
    font-size: 14px;
    transition:
        border-color .2s ease,
        box-shadow .2s ease;
}

.st-calculator input[type="number"]:focus,
.st-calculator input[type="text"]:focus,
.st-calculator input[type="tel"]:focus,
.st-calculator select:focus {
    border-color: var(--st-green);
    box-shadow: 0 0 0 3px rgba(116, 183, 46, .12);
}

.st-input-unit,
.st-mini-unit {
    position: relative;
}

.st-input-unit input {
    padding-left: 80px !important;
}

.st-input-unit em {
    position: absolute;
    top: 50%;
    left: 13px;
    transform: translateY(-50%);
    color: var(--st-muted);
    font-size: 11px;
    font-style: normal;
}

.st-mini-unit {
    display: flex;
    align-items: center;
    gap: 5px;
}

.st-mini-unit span {
    color: var(--st-muted);
    font-size: 11px;
}


/* =====================================================
   UPLOAD / OCR
===================================================== */

.st-upload-box {
    position: relative;
    padding: 28px;
    border: 2px dashed #d6e3d4;
    border-radius: 16px;
    background: #fbfdf9;
    text-align: center;
}

.st-upload-icon {
    margin-bottom: 6px;
    font-size: 35px;
}

.st-upload-box > strong {
    display: block;
    color: var(--st-dark);
    font-size: 15px;
}

.st-upload-box > span {
    display: block;
    margin: 3px 0 14px;
    color: var(--st-muted);
    font-size: 11px;
}

.st-upload-box > input[type="file"] {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.st-upload-box > small {
    display: block;
    margin-top: 12px;
    color: var(--st-muted);
    font-size: 10px;
}

.st-ocr-progress {
    max-width: 500px;
    margin: 18px auto 0;
}

.st-progress-track {
    overflow: hidden;
    height: 7px;
    margin-bottom: 7px;
    border-radius: 20px;
    background: #e7ece7;
}

.st-progress-bar {
    display: block;
    width: 0;
    height: 100%;
    border-radius: inherit;
    background: var(--st-green);
    transition: width .25s ease;
}

.st-ocr-progress > span {
    color: var(--st-muted);
    font-size: 11px;
}

.st-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 27px 0;
    color: var(--st-muted);
    font-size: 11px;
}

.st-divider::before,
.st-divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--st-border);
}

.st-review-card {
    margin-top: 18px;
    padding: 22px;
    border: 1px solid #d9e7d4;
    border-radius: 14px;
    background: var(--st-green-soft);
}

.st-review-card h4 {
    margin: 0 0 3px;
    color: var(--st-dark);
    font-size: 16px;
}

.st-review-card > p {
    margin: 0 0 18px;
    color: var(--st-muted);
    font-size: 11px;
}

.st-review-card .st-primary-button {
    margin-top: 20px;
}

.st-success {
    margin-top: 15px;
    padding: 12px 15px;
    border: 1px solid #cfe5c4;
    border-radius: 10px;
    background: #f1faed;
    color: #427524;
    font-size: 12px;
    font-weight: 700;
}


/* =====================================================
   CHOICE CARDS
===================================================== */

.st-choice-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 13px;
}

.st-choice-card {
    min-height: 135px;
    padding: 20px;
    border: 1px solid var(--st-border);
    border-radius: 14px;
    background: #fff;
    color: var(--st-text);
    text-align: right;
    cursor: pointer;
    transition: .2s ease;
}

.st-choice-card:hover {
    border-color: #b9d99d;
}

.st-choice-card.is-active {
    border: 2px solid var(--st-green);
    background: var(--st-green-soft);
}

.st-choice-card strong,
.st-choice-card b,
.st-choice-card small {
    display: block;
}

.st-choice-card strong {
    margin-bottom: 4px;
    color: var(--st-dark);
    font-size: 15px;
}

.st-choice-card b {
    margin-bottom: 7px;
    color: var(--st-green-dark);
    font-size: 13px;
}

.st-choice-card small {
    color: var(--st-muted);
    font-size: 10px;
    line-height: 1.7;
}


/* =====================================================
   DEVICES
===================================================== */

.st-device-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.st-device-card {
    overflow: hidden;
    border: 1px solid var(--st-border);
    border-radius: 15px;
    background: #fff;
    transition: .2s ease;
}

.st-device-card.is-active {
    border-color: var(--st-green);
    box-shadow: 0 0 0 1px var(--st-green);
}

.st-device-toggle {
    display: flex;
    width: 100%;
    min-height: 76px;
    align-items: center;
    gap: 10px;
    padding: 15px;
    border: 0;
    background: transparent;
    color: var(--st-dark);
    text-align: right;
    cursor: pointer;
}

.st-device-toggle span {
    font-size: 25px;
}

.st-device-toggle strong {
    font-size: 13px;
}

.st-device-card:not(.is-active) .st-device-details {
    display: none;
}

.st-device-details {
    padding: 0 15px 16px;
    border-top: 1px solid #edf0ed;
}

.st-device-details > label {
    display: block;
    margin-top: 12px;
    color: var(--st-muted);
    font-size: 10px;
}

.st-device-details input[type="number"] {
    min-height: 42px;
    margin-top: 4px;
    font-size: 12px;
}

.st-nameplate-button {
    width: 100%;
    margin-top: 14px;
    padding: 9px 10px;
    border: 1px solid #d8e4d5;
    border-radius: 9px;
    background: var(--st-green-soft);
    color: var(--st-green-dark);
    font-size: 10px;
    font-weight: 700;
    cursor: pointer;
}

.st-device-ocr {
    margin-top: 8px;
    color: var(--st-muted);
    font-size: 10px;
}

.st-nameplate-result {
    padding: 10px;
    border-radius: 8px;
    background: #f5f8f4;
}

.st-nameplate-result strong,
.st-nameplate-result small {
    display: block;
}

.st-nameplate-result button {
    margin-top: 7px;
    padding: 6px 10px;
    border: 0;
    border-radius: 7px;
    background: var(--st-green);
    color: #fff;
    font-size: 10px;
    cursor: pointer;
}

.st-engineering-note,
.st-assumption-hint {
    margin-top: 18px;
    padding: 12px 15px;
    border-radius: 10px;
    background: #f7f8f6;
    color: var(--st-muted);
    font-size: 11px;
}


/* =====================================================
   LOCATION
===================================================== */

.st-location-button {
    min-height: 50px;
    padding: 10px 15px;
    border: 1px solid #dbe5d8;
    border-radius: 11px;
    background: var(--st-green-soft);
    color: var(--st-green-dark);
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
}

.st-location-status {
    color: var(--st-muted);
    font-size: 10px;
}

.st-advanced-location {
    margin-top: 18px;
    padding-top: 15px;
    border-top: 1px solid var(--st-border);
}

.st-advanced-location summary {
    color: var(--st-muted);
    font-size: 11px;
    cursor: pointer;
}

.st-advanced-location .st-form-grid {
    margin-top: 14px;
}


/* =====================================================
   BUTTONS
===================================================== */

.st-primary-button,
.st-secondary-button {
    display: inline-flex;
    min-height: 48px;
    align-items: center;
    justify-content: center;
    padding: 11px 22px;
    border-radius: 10px;
    text-decoration: none !important;
    font-size: 12px;
    font-weight: 800;
    cursor: pointer;
    transition: .2s ease;
}

.st-primary-button {
    border: 1px solid var(--st-green);
    background: var(--st-green);
    color: #fff !important;
}

.st-primary-button:hover {
    border-color: var(--st-green-dark);
    background: var(--st-green-dark);
    color: #fff;
}

.st-secondary-button {
    border: 1px solid #d8e2d6;
    background: #fff;
    color: var(--st-dark) !important;
}

.st-secondary-button:hover {
    border-color: var(--st-green);
    color: var(--st-green-dark) !important;
}

.st-calculate-wrap {
    padding: 12px 0 30px;
    text-align: center;
}

.st-calculate-wrap .st-primary-button {
    min-width: 260px;
    min-height: 55px;
    font-size: 14px;
}

.st-calculate-wrap p {
    margin: 9px 0 0;
    color: var(--st-muted);
    font-size: 10px;
}


/* =====================================================
   RESULTS
===================================================== */

.st-result-section {
    border-color: #d7e7ce;
    background:
        linear-gradient(
            180deg,
            #fbfef9 0%,
            #fff 30%
        );
}

.st-result-heading {
    margin-bottom: 25px;
}

.st-result-heading > span {
    color: var(--st-green-dark);
    font-size: 11px;
    font-weight: 800;
}

.st-result-heading h3 {
    margin: 4px 0;
    color: var(--st-dark);
    font-size: 24px;
    font-weight: 800;
}

.st-result-heading p {
    margin: 0;
    color: var(--st-muted);
    font-size: 12px;
}

.st-result-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.st-result-card {
    min-height: 130px;
    padding: 18px;
    border: 1px solid var(--st-border);
    border-radius: 14px;
    background: #fff;
}

.st-result-card > span {
    display: block;
    margin-bottom: 10px;
    font-size: 22px;
}

.st-result-card small {
    display: block;
    margin-bottom: 3px;
    color: var(--st-muted);
    font-size: 10px;
}

.st-result-card strong {
    display: block;
    color: var(--st-dark);
    font-size: 17px;
    line-height: 1.5;
}

.st-confidence {
    margin-top: 20px;
    padding: 17px;
    border-radius: 12px;
    background: var(--st-green-soft);
}

.st-confidence strong {
    color: var(--st-dark);
    font-size: 13px;
}

.st-confidence p {
    margin: 3px 0 0;
    color: var(--st-muted);
    font-size: 10px;
}

.st-warning-list {
    margin-top: 18px;
}

.st-warning {
    margin-top: 7px;
    padding: 10px 13px;
    border: 1px solid var(--st-warning-border);
    border-radius: 9px;
    background: var(--st-warning);
    color: #745d23;
    font-size: 10px;
}

.st-savings-note {
    margin-top: 15px;
    color: var(--st-muted);
    font-size: 10px;
}

.st-result-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 24px;
}

.st-final-disclaimer {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid var(--st-border);
    color: var(--st-muted);
    font-size: 10px;
}


/* =====================================================
   MESSAGES
===================================================== */

.st-global-error {
    position: relative;
    z-index: 10;
    margin-bottom: 15px;
    padding: 13px 16px;
    border: 1px solid #e8bcbc;
    border-radius: 10px;
    background: #fff1f1;
    color: var(--st-danger);
    font-size: 12px;
    font-weight: 700;
}

.st-start-hint {
    margin: 15px 0 25px;
    padding: 20px;
    border: 1px dashed #d9e1d8;
    border-radius: 13px;
    background: #fafcfa;
    color: var(--st-muted);
    text-align: center;
    font-size: 12px;
}

.st-noscript {
    padding: 15px;
    border-radius: 10px;
    background: #fff1f1;
    color: #a43131;
}


/* =====================================================
   TABLET
===================================================== */

@media (max-width: 1024px) {

    .st-goal-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .st-result-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .st-device-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}


/* =====================================================
   MOBILE
===================================================== */

@media (max-width: 767px) {

    .st-header {
        padding: 27px 20px;
        border-radius: 18px;
    }

    .st-header h2 {
        font-size: 25px;
    }

    .st-section {
        padding: 22px 16px;
        border-radius: 15px;
    }

    .st-section-head {
        gap: 10px;
    }

    .st-step {
        flex-basis: 32px;
        width: 32px;
        height: 32px;
        font-size: 12px;
    }

    .st-section-head h3 {
        font-size: 17px;
    }

    .st-goal-grid,
    .st-choice-grid,
    .st-form-grid,
    .st-device-grid,
    .st-result-grid {
        grid-template-columns: 1fr;
    }

    .st-goal-card {
        min-height: auto;
        padding: 18px;
    }

    .st-goal-icon {
        margin-bottom: 8px;
    }

    .st-choice-card {
        min-height: auto;
    }

    .st-upload-box {
        padding: 22px 14px;
    }

    .st-calculate-wrap .st-primary-button {
        width: 100%;
        min-width: 0;
    }

    .st-result-actions {
        flex-direction: column;
    }

    .st-result-actions > * {
        width: 100%;
    }

    .st-result-heading h3 {
        font-size: 20px;
    }
}

/* ==========================================================
 * SolarTech Calculator - Expert Review / Lead Form
 * ========================================================== */

.st-calculator .st-lead-box {
    margin-top: 28px;
    padding: 28px;
    background: #f8fbf4;
    border: 1px solid #dce8d3;
    border-radius: 18px;
}

.st-calculator .st-lead-heading {
    margin-bottom: 22px;
}

.st-calculator .st-lead-heading h4 {
    margin: 0 0 8px;
    padding: 0;
    font-size: 22px;
    line-height: 1.6;
    font-weight: 700;
    color: #1f2d1c;
}

.st-calculator .st-lead-heading p {
    margin: 0;
    font-size: 14px;
    line-height: 2;
    color: #667064;
}


/* Fields */

.st-calculator .st-lead-box .st-form-grid {
    margin-top: 18px;
    margin-bottom: 18px;
}

.st-calculator .st-lead-box .st-field > span {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 600;
    color: #273224;
}

.st-calculator .st-lead-box input[type="text"],
.st-calculator .st-lead-box input[type="tel"] {
    width: 100%;
    height: 52px;
    padding: 0 16px;
    border: 1px solid #d9dfd5;
    border-radius: 10px;
    background: #fff;
    font: inherit;
    font-size: 15px;
    font-weight: 400;
    box-sizing: border-box;
    outline: none;
}

.st-calculator .st-lead-box input[type="text"]:focus,
.st-calculator .st-lead-box input[type="tel"]:focus {
    border-color: #76bd22;
    box-shadow: 0 0 0 3px rgba(118, 189, 34, 0.10);
}


/* Mobile number */

.st-calculator .st-lead-box input[type="tel"] {
    direction: ltr;
    text-align: left;
}


/* Consent */

.st-calculator .st-lead-consent {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 4px 0 20px;
    cursor: pointer;
    font-size: 14px;
    line-height: 1.9;
    color: #3e493b;
}

.st-calculator .st-lead-consent input[type="checkbox"] {
    width: 18px;
    height: 18px;
    min-width: 18px;
    margin: 5px 0 0;
    accent-color: #76bd22;
    cursor: pointer;
}


/* Honeypot - must never be visible */

.st-calculator .st-lead-honeypot {
    position: absolute !important;
    left: -99999px !important;
    width: 1px !important;
    height: 1px !important;
    opacity: 0 !important;
    pointer-events: none !important;
    overflow: hidden !important;
}


/* Submit */

.st-calculator .st-lead-submit {
    min-width: 210px;
}

.st-calculator .st-lead-submit:disabled {
    opacity: 0.65;
    cursor: not-allowed;
}


/* Server response */

.st-calculator .st-lead-status {
    margin-top: 14px;
    font-size: 14px;
    line-height: 1.8;
}

.st-calculator .st-lead-success {
    padding: 12px 16px;
    background: #edf8e5;
    border: 1px solid #cce7b7;
    border-radius: 10px;
    color: #315d16;
}

.st-calculator .st-lead-error {
    padding: 12px 16px;
    background: #fff2f1;
    border: 1px solid #f1c7c3;
    border-radius: 10px;
    color: #a4372e;
}


/* Result buttons */

.st-calculator .st-result-actions {
    margin-top: 24px;
    margin-bottom: 0;
}


/* Mobile */

@media (max-width: 767px) {

    .st-calculator .st-lead-box {
        margin-top: 22px;
        padding: 20px 16px;
        border-radius: 14px;
    }

    .st-calculator .st-lead-heading h4 {
        font-size: 19px;
    }

    .st-calculator .st-lead-heading p {
        font-size: 13px;
    }

    .st-calculator .st-lead-box .st-form-grid {
        grid-template-columns: 1fr;
    }

    .st-calculator .st-lead-submit {
        width: 100%;
    }

}