/* ─── Catchy Hero Pulse Button ──────────────────────────────── */
.btn-pulse {
    position: relative;
    background: linear-gradient(135deg, #11a139, #10b981) !important;
    color: white !important;
    border: none !important;
    box-shadow: 0 10px 30px rgba(17, 161, 57, 0.4) !important;
    overflow: visible !important;
}

.btn-pulse-ring {
    position: absolute;
    inset: -5px;
    border: 2px solid #11a139;
    border-radius: 999px;
    animation: btn-pulse-anim 2s infinite;
    opacity: 0;
}

@keyframes btn-pulse-anim {
    0% {
        transform: scale(1);
        opacity: 0.5;
    }

    100% {
        transform: scale(1.15, 1.4);
        opacity: 0;
    }
}

/* ─── Editable Wattage ────────────────────────────────────────── */
.watt-input-wrap {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.8rem;
    color: var(--calc-text-light);
    margin-top: 4px;
    background: rgba(0, 0, 0, 0.03);
    padding: 2px 8px;
    border-radius: 4px;
}

.watt-edit-input {
    width: 45px;
    background: transparent;
    border: none;
    border-bottom: 1px dashed var(--calc-primary);
    color: var(--calc-primary);
    font-weight: 700;
    font-family: inherit;
    font-size: 0.85rem;
    padding: 0;
    text-align: center;
    outline: none;
}

.watt-edit-input::-webkit-inner-spin-button {
    display: none;
}

:root {
    --calc-primary: #11a139;
    --calc-accent: #f59e0b;
    --calc-bg: #ffffff;
    --calc-glass: #f8fafc;
    --calc-border: #e2e8f0;
    --calc-text: #0f172a;
    --calc-text-light: #64748b;
    --calc-shadow: 0 20px 50px rgba(0, 0, 0, 0.1);
}

.container-calc {
    max-width: 1400px;
    margin: 0px auto;
}

.calc-wrapper {
    max-width: 1300px;
    margin: 2rem auto;
    padding: 2rem;
    background: #ffffff;
    border: 1px solid var(--calc-border);
    border-radius: 2rem;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.08);
    font-family: var(--sa-fb, system-ui, sans-serif);
    color: var(--calc-text);
}

.calc-header {
    text-align: center;
    margin-bottom: 2rem;
}

.calc-header h2 {
    font-family: var(--sa-fh, system-ui, sans-serif);
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 0.4rem;
    color: var(--calc-text);
    letter-spacing: -0.02em;
}

.calc-header p {
    color: var(--calc-text-light);
    font-size: 0.9rem;
}

.calc-main {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 2rem;
}

.calc-wrapper {
    max-width: 1400px !important;
    /* Wider for dashboard feel */
    margin: 2rem auto;
    padding: 2rem;
    background: #ffffff;
    border: 1px solid var(--calc-border);
    border-radius: 2rem;
    box-shadow: 0 40px 100px rgba(0, 0, 0, 0.05);
}

/* ─── Top Controls ────────────────────────────────────────── */
.calc-top-controls {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    align-items: center;
    gap: 2rem;
    margin-bottom: 2.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #f1f5f9;
}

.calc-mode-switcher,
.panel-tech-selector {
    display: flex;
    background: #f1f5f9;
    padding: 0.3rem;
    border-radius: 1rem;
}

.mode-btn,
.tech-btn {
    flex: 1;
    padding: 0.8rem 1rem;
    border: none;
    background: transparent;
    border-radius: 0.75rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: #64748b;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
    display: flex;
    flex-direction: column;
    align-items: center;
    line-height: 1.2;
}

.tech-sub {
    font-size: 0.7rem;
    font-weight: 500;
    opacity: 0.8;
    margin-top: 2px;
}

.mode-btn:hover,
.tech-btn:hover {
    color: var(--calc-primary);
    background: rgba(17, 161, 57, 0.05);
}

.mode-btn.active,
.tech-btn.active {
    background: #ffffff;
    color: var(--calc-primary);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05), 0 1px 3px rgba(0, 0, 0, 0.1);
}

.tech-options {
    display: flex;
    gap: 0.2rem;
}

.tech-btn {
    flex: 1;
    padding: 0.8rem 1rem;
    border: none;
    background: transparent;
    border-radius: 0.75rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: #64748b;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
}

.tech-btn:hover {
    color: var(--calc-primary);
    background: rgba(17, 161, 57, 0.05);
}

.tech-btn.active {
    background: #ffffff;
    color: var(--calc-primary);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05), 0 1px 3px rgba(0, 0, 0, 0.1);
}

.tech-description {
    font-size: 0.75rem;
    color: var(--calc-text-light);
    margin-top: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0 0.5rem;
}

.tech-description i {
    width: 14px;
    height: 14px;
    color: var(--calc-accent);
}

@media (max-width: 768px) {
    .calc-top-controls {
        flex-direction: column;
        align-items: center;
        gap: 1rem;
    }
    .tech-options {
        flex-direction: row; /* Keep buttons side-by-side or stack if needed */
    }
    .mode-btn, .tech-btn {
        padding: 0.6rem 0.8rem;
        font-size: 0.75rem;
    }
}

.calc-view {
    display: none;
    animation: fadeIn 0.4s ease;
}

.calc-view.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ─── Simple View Styling ────────────────────────────────────── */
.simple-input-card {
    background: #f8fafc;
    border: 1px solid var(--calc-border);
    border-radius: 1.5rem;
    padding: 2.5rem;
    max-width: 700px;
}

.simple-header {
    margin-bottom: 2rem;
}

.simple-header h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--calc-text);
}

.simple-header p {
    color: #64748b;
}

.simple-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.simple-field label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: #334155;
}

.input-with-symbol {
    display: flex;
    align-items: center;
    background: #ffffff;
    border: 2px solid #e2e8f0;
    border-radius: 0.75rem;
    padding: 0 1rem;
    transition: all 0.2s;
}

.input-with-symbol:focus-within {
    border-color: var(--calc-primary);
    box-shadow: 0 0 0 4px rgba(17, 161, 57, 0.1);
}

.input-with-symbol input {
    border: none;
    padding: 1rem 0.5rem;
    width: 100%;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--calc-text);
    outline: none;
}

.input-with-symbol.large {
    padding: 0.25rem 1rem;
    border-radius: 0.85rem;
    border-width: 2px;
    background: #ffffff;
}

.input-with-symbol.large input {
    font-size: 1.5rem;
    height: 55px;
    letter-spacing: -0.5px;
}

.input-with-symbol.large .symbol {
    font-size: 1.5rem;
}

.simple-field.prominent label {
    font-size: 1.1rem;
    color: var(--calc-primary);
}

.simple-divider {
    display: flex;
    align-items: center;
    text-align: center;
    color: #94a3b8;
    font-weight: 700;
    font-size: 0.8rem;
    gap: 1rem;
}

.simple-divider::before,
.simple-divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid #e2e8f0;
}

.field-hint {
    display: block;
    font-size: 0.85rem;
    color: #94a3b8;
    margin-top: 0.5rem;
}

.simple-info-box {
    margin-top: 2rem;
    background: rgba(17, 161, 57, 0.05);
    border-radius: 1rem;
    padding: 1.25rem;
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    border-left: 4px solid var(--calc-primary);
}

.simple-info-box i {
    color: var(--calc-primary);
    flex-shrink: 0;
}

.simple-info-box p {
    font-size: 0.9rem;
    color: #0f4c3a;
    line-height: 1.5;
}


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

/* ─── Appliance Grid ────────────────────────────────────────── */
.appliance-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

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

.appliance-row {
    display: grid;
    grid-template-columns: 1fr 90px 1.2fr;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    background: var(--calc-glass);
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 0.8rem;
}

.appliance-row:hover {
    background: white;
    border-color: var(--calc-primary);
}

.appliance-info {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.appliance-icon {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, var(--calc-primary), #10b981);
    border-radius: 0.6rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.appliance-icon i {
    width: 16px;
    height: 16px;
}

.appliance-name {
    font-weight: 700;
    font-size: 0.85rem;
    display: flex;
    flex-direction: column;
}

.appliance-watt {
    display: block;
    font-size: 0.7rem;
    color: var(--calc-text-light);
    font-weight: 500;
    margin-top: 1px;
}

.watt-input-wrap {
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--calc-text-light);
    margin-top: 0.2rem;
}

.watt-edit-input {
    width: 45px;
    border: 1px solid #e2e8f0;
    background: #ffffff;
    border-radius: 0.4rem;
    padding: 0.2rem 0.3rem;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--calc-primary);
    text-align: center;
    outline: none;
}

.watt-edit-input:focus {
    border-color: var(--calc-primary);
    box-shadow: 0 0 0 2px rgba(17, 161, 57, 0.1);
}

/* ─── Qty Controls ────────────────────────────────────────── */
.qty-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: white;
    border-radius: 1rem;
    padding: 6px;
    border: 1px solid var(--calc-border);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.02);
}

.qty-btn {
    width: 28px;
    height: 28px;
    border-radius: 0.6rem;
    background: #f1f5f9;
    color: var(--calc-text);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s;
    user-select: none;
}

.qty-btn:hover {
    background: var(--calc-primary);
    color: white;
}

.qty-val {
    font-weight: 700;
    font-size: 0.9rem;
    width: 25px;
    text-align: center;
}

/* ─── Slider ────────────────────────────────────────── */
.slider-group {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.slider-label {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--calc-text-light);
}

.slider-label span b {
    color: var(--calc-primary);
    font-size: 1rem;
}

.calc-slider {
    -webkit-appearance: none;
    width: 100%;
    height: 8px;
    background: #f1f5f9;
    border-radius: 999px;
    outline: none;
    border: 1px solid #e2e8f0;
}

.calc-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 22px;
    height: 22px;
    background: white;
    border: 2px solid var(--calc-primary);
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.1s;
}

.calc-slider::-webkit-slider-thumb:hover {
    border-color: #059669;
}

/* ─── Result Panel ────────────────────────────────────────── */
.calc-result-panel {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    position: sticky;
    top: 100px;
    height: fit-content;
}

.live-stats {
    background: #1e293b;
    color: white;
    padding: 2rem;
    border-radius: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    box-shadow: 0 10px 30px rgba(30, 41, 59, 0.2);
}

.stat-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.stat-row:last-child {
    border: none;
    padding: 0;
}

.stat-label {
    font-size: 0.8rem;
    opacity: 0.7;
    font-weight: 500;
}

.stat-value {
    font-size: 1.1rem;
    font-weight: 700;
    font-family: var(--sa-fh);
}

.highlight-box {
    background: linear-gradient(135deg, #11a139, #059669);
    color: white;
    padding: 2.5rem 2rem;
    border-radius: 2rem;
    text-align: center;
    box-shadow: 0 20px 40px rgba(17, 161, 57, 0.25);
    position: relative;
    overflow: hidden;
}

.highlight-box::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.15) 0%, transparent 70%);
    pointer-events: none;
}

.highlight-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    margin-bottom: 0.5rem;
    opacity: 0.9;
    font-weight: 600;
}

.highlight-value {
    font-size: 2.2rem;
    font-weight: 800;
    margin-bottom: 1rem;
    display: block;
    line-height: 1;
}

.saving-line {
    font-size: 0.85rem;
    background: rgba(0, 0, 0, 0.2);
    padding: 0.5rem 1rem;
    border-radius: 999px;
    display: inline-block;
    font-weight: 600;
}

.subsidy-note {
    font-size: 0.8rem;
    color: var(--calc-text-light);
    text-align: center;
    margin-top: 1.25rem;
    line-height: 1.5;
}

.subsidy-note b {
    color: var(--calc-primary);
}

.trust-line {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    font-size: 0.75rem;
    color: var(--calc-text-light);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    margin-top: 1.5rem;
    font-weight: 700;
    text-align: center;
}

.calc-cta {
    width: 100%;
    padding: 1.4rem;
    font-size: 1.15rem;
    font-weight: 700;
    border-radius: 999px;
    margin-top: 1rem;
    border: none;
    cursor: pointer;
    background: var(--calc-primary);
    color: white;
    transition: all 0.3s;
}

.calc-cta:hover {
    box-shadow: 0 10px 25px rgba(17, 161, 57, 0.3);
    filter: brightness(1.1);
}

/* ─── Modal ────────────────────────────────────────── */
.calc-modal {
    position: fixed;
    inset: 0;
    z-index: 2000;
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(12px);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.calc-modal.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: white;
    padding: 3rem;
    border-radius: 2.5rem;
    width: 92%;
    max-width: 480px;
    position: relative;
    transform: scale(0.9) translateY(30px);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 40px 100px rgba(0, 0, 0, 0.25);
}

.calc-modal.active .modal-content {
    transform: scale(1) translateY(0);
}

.modal-close {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    cursor: pointer;
    color: var(--calc-text-light);
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #f1f5f9;
    transition: all 0.2s;
}

.modal-close:hover {
    background: #fee2e2;
    color: #ef4444;
}

.modal-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.modal-header h3 {
    font-size: 1.75rem;
    font-weight: 800;
    margin-bottom: 0.75rem;
    color: var(--calc-text);
}

.calc-form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-label {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--calc-text-light);
    margin-left: 0.5rem;
}

.calc-input {
    width: 100%;
    padding: 1.1rem 1.5rem;
    border: 2px solid #f1f5f9;
    border-radius: 1.25rem;
    font-family: inherit;
    font-size: 1rem;
    outline: none;
    transition: all 0.2s;
}

.calc-input:focus {
    border-color: var(--calc-primary);
    background: white;
}

/* ─── Full Screen Modal (from Hero) ────────────────────────────────── */
.calc-full-modal {
    position: fixed;
    inset: 0;
    z-index: 2500;
    background: rgba(255, 255, 255, 0.4);
    /* Light background for site visibility */
    backdrop-filter: blur(.5px) saturate(180%);
    -webkit-backdrop-filter: blur(25px) saturate(180%);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    overflow-y: auto;
    padding: 2rem;
}

.calc-full-modal.active {
    opacity: 1;
    visibility: visible;
}

.calc-modal-inner {
    width: 100%;
    max-width: 700px;
    /* Much more compact popup width */
    position: relative;
    margin: auto;
    border-radius: 2rem;
}

.calc-modal-close {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    z-index: 100;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #f1f5f9;
    color: var(--calc-text);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
}

.calc-modal-close:hover {
    background: #ef4444;
    color: white;
    transform: rotate(90deg);
}

#solar-calculator-modal-content .calc-wrapper {
    margin: 0;
    padding: 2.5rem;
    background: #ffffff;
    box-shadow: 0 40px 120px rgba(0, 0, 0, 0.15);
    border-radius: 2.5rem;
    border: 1px solid rgba(0, 0, 0, 0.08);
}

#solar-calculator-modal-content .calc-main {
    grid-template-columns: 1fr 320px;
    gap: 2rem;
}

#solar-calculator-modal-content .appliance-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
}

#solar-calculator-modal-content .calc-result-panel {
    position: sticky;
    top: 0;
}

#solar-calculator-modal-content .appliance-row {
    padding: 1.1rem;
    gap: 1.25rem;
}

@media (max-width: 768px) {
    .calc-full-modal {
        padding: 1rem;
    }

    .calc-modal-close {
        top: 1rem;
        right: 1.5rem;
        z-index: 10;
    }
}

@media (max-width: 600px) {
    .calc-wrapper {
        padding: 1.25rem;
        margin: 0.75rem;
        border-radius: 1.25rem;
    }

    .calc-header h1 {
        font-size: 1.5rem;
    }

    .calc-header p {
        font-size: 0.8rem;
    }

    .tech-sub {
        font-size: 0.65rem;
    }

    .highlight-value {
        font-size: 1.8rem;
    }

    .saving-line {
        font-size: 0.75rem;
    }

    .appliance-row {
        grid-template-columns: 1fr;
        gap: 1rem;
        padding: 1rem;
    }

    .appliance-info {
        justify-content: flex-start;
        gap: 0.75rem;
    }

    .qty-controls {
        width: 100%;
        max-width: 160px;
    }

    .calc-header h2 {
        font-size: 1.4rem;
    }
    
    .mode-btn, .tech-btn {
        font-size: 0.7rem;
        padding: 0.5rem 0.75rem;
    }

    .input-with-symbol.large input {
        font-size: 1.25rem;
        height: 45px;
    }

    .simple-input-card {
        padding: 1.5rem;
    }
}