/* assets/css/styles.css */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@300;400;500;600;700&display=swap');

:root {
    --brand-green: #8DC63F;
    --brand-green-dark: #008244;
    --slate-50: #f8fafc;
    --slate-900: #0f172a;
    --solar-yellow: #fde047;
    --solar-orange: #fbbf24;
}

body {
    font-family: 'Inter', sans-serif;
    color: var(--slate-900);
    background-color: #ffffff;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: 'Outfit', sans-serif;
}

.glass-nav {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.glass-card {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(0, 0, 0, 0.05);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.02);
    transition: all 0.4s ease;
}

.glass-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.05);
}

.brand-gradient-bg {
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
}

/* Solar Element - Centered Sun Hero */
.solar-element-centered {
    width: 400px;
    height: 400px;
    background: linear-gradient(135deg, #ffab5c 0%, #ff9a4d 100%);
    border-radius: 50%;
    position: relative;
    z-index: 2;
    box-shadow: 0 0 120px rgba(255, 171, 92, 0.6),
        0 0 200px rgba(251, 191, 36, 0.4);
}

.radiating-glow-centered {
    position: absolute;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(255, 171, 92, 0.4) 0%, rgba(251, 191, 36, 0.2) 40%, rgba(255, 255, 255, 0) 70%);
    border-radius: 50%;
    pointer-events: none;
    z-index: 1;
}

/* Solar Element - Legacy Bottom Anchor (Keep for other pages if used) */
.solar-element {
    position: absolute;
    bottom: -350px;
    left: 50%;
    transform: translateX(-50%);
    width: 1200px;
    height: 1200px;
    background: #ffab5c;
    border-radius: 50%;
    pointer-events: none;
    z-index: 0;
    box-shadow: 0 0 150px rgba(255, 171, 92, 0.4);
}

.radiating-glow {
    position: absolute;
    bottom: -400px;
    left: 50%;
    transform: translateX(-50%);
    width: 1300px;
    height: 1300px;
    background: radial-gradient(circle, rgba(255, 171, 92, 0.4) 0%, rgba(255, 255, 255, 0) 70%);
    border-radius: 50%;
    pointer-events: none;
    z-index: -1;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: #ffffff;
}

::-webkit-scrollbar-thumb {
    background: #e2e8f0;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: #cbd5e1;
}

/* AI Assistant Styling */
.chat-fab {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 100;
    display: flex;
    align-items: center;
    background: var(--brand-green);
    color: white;
    padding: 12px 24px;
    border-radius: 50px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 10px 30px rgba(141, 198, 63, 0.4);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.chat-fab:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 15px 40px rgba(141, 198, 63, 0.5);
}

.chat-panel {
    position: fixed;
    bottom: 100px;
    right: 30px;
    width: 380px;
    height: 550px;
    background: white;
    border-radius: 24px;
    z-index: 99;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(0, 0, 0, 0.05);
    transform: translateY(20px);
    opacity: 0;
    pointer-events: none;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.chat-panel.active {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
}

.chat-header {
    background: var(--brand-green);
    color: white;
    padding: 24px;
    border-radius: 24px 24px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    background: #fcfcfc;
}

.message {
    max-width: 85%;
    padding: 12px 16px;
    border-radius: 16px;
    font-size: 0.95rem;
    line-height: 1.5;
}

.message.user {
    align-self: flex-end;
    background: var(--brand-green);
    color: white;
    border-bottom-right-radius: 4px;
}

.message.ai {
    align-self: flex-start;
    background: #f1f5f9;
    color: var(--slate-900);
    border-bottom-left-radius: 4px;
}

.chat-input-area {
    padding: 20px;
    border-top: 1px solid #efefef;
    display: flex;
    gap: 10px;
}

.chat-input {
    flex: 1;
    border: 1px solid #e2e8f0;
    padding: 12px 16px;
    border-radius: 50px;
    outline: none;
    transition: border-color 0.3s;
}

.chat-input:focus {
    border-color: var(--brand-green);
}

.chat-send {
    background: var(--brand-green);
    color: white;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.3s;
}

.chat-send:active {
    transform: scale(0.9);
}

/* Custom Scrollbar for Chat */
.chat-messages::-webkit-scrollbar {
    width: 4px;
}

.chat-messages::-webkit-scrollbar-thumb {
    background: #e2e8f0;
    border-radius: 10px;
}

/* Animations */
.reveal {
    opacity: 0;
    transform: translateY(15px);
}

/* Energy Model Tabs */
.energy-tab {
    color: #64748b;
    background: transparent;
    cursor: pointer;
    border: none;
}

.energy-tab.active {
    background: white;
    color: #0f172a;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.energy-tab:hover:not(.active) {
    color: #8DC63F;
}

.tab-content {
    display: none;
    opacity: 0;
}

.tab-content.active {
    display: block;
    opacity: 1;
}

/* Savings Calculator */
.calculator-input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.calculator-input:focus {
    outline: none;
    border-color: #8DC63F;
}

.calculator-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 8px;
    border-radius: 5px;
    background: #e2e8f0;
    outline: none;
}

.calculator-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #8DC63F;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(141, 198, 63, 0.3);
}

.calculator-slider::-moz-range-thumb {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #8DC63F;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(141, 198, 63, 0.3);
}

/* Type Toggle Buttons */
.type-toggle {
    background: white;
    color: #64748b;
    border: 1px solid #e2e8f0;
    cursor: pointer;
}

.type-toggle.active {
    background: #8DC63F;
    color: white;
    border-color: #8DC63F;
}

.type-toggle:hover:not(.active) {
    border-color: #8DC63F;
    color: #8DC63F;
}

/* Financing Slider Styles */
.financing-slider-group {
    background: white;
    padding: 24px;
    border-radius: 20px;
    border: 1px solid #f1f5f9;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

/* Financial Breakdown Styling */
.breakdown-item {
    border-left: 2px solid rgba(255, 255, 255, 0.1);
    padding-left: 16px;
}

.breakdown-item p:first-child {
    letter-spacing: 0.1em;
}

/* Number Input Arrows Removal */
input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

input[type=number] {
    -moz-appearance: textfield;
}

/* Select Styling Refinement */
select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23334155' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 1.25rem;
}

/* FAQ Accordion */
.faq-item {
    border-bottom: 1px solid #f1f5f9;
}

.faq-question {
    width: 100%;
    text-align: left;
    padding: 24px 0;
    font-size: 1.125rem;
    font-weight: 600;
    color: #0f172a;
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: color 0.3s;
}

.faq-question:hover {
    color: #8DC63F;
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease;
}

.faq-answer.active {
    max-height: 500px;
    padding-bottom: 24px;
}

.faq-icon {
    transition: transform 0.3s;
}

.faq-icon.active {
    transform: rotate(180deg);
}

/* Data Visualization */
.progress-bar {
    height: 12px;
    background: #e2e8f0;
    border-radius: 6px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #8DC63F, #fbbf24);
    transition: width 1s ease;
}

/* Lazy Loading */
img[loading="lazy"] {
    opacity: 0;
    transition: opacity 0.3s;
}

img[loading="lazy"].loaded {
    opacity: 1;
}

/* ========================================
   APPLICATION MODAL STYLES
   ======================================== */

/* Modal Overlay */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

/* Modal Container */
.modal-container {
    background: white;
    border-radius: 24px;
    max-width: 700px;
    width: 100%;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.2);
    transform: scale(0.9) translateY(20px);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.modal-overlay.active .modal-container {
    transform: scale(1) translateY(0);
}

/* Modal Header */
.modal-header {
    padding: 32px 32px 24px;
    border-bottom: 1px solid #f1f5f9;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.modal-close-btn {
    background: #f1f5f9;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s;
    color: #64748b;
}

.modal-close-btn:hover {
    background: #e2e8f0;
    color: #0f172a;
    transform: rotate(90deg);
}

/* Progress Indicator */
.modal-progress {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px 32px;
    gap: 12px;
}

.progress-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.progress-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #f1f5f9;
    color: #94a3b8;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.875rem;
    transition: all 0.3s;
}

.progress-step.active .progress-circle {
    background: #8DC63F;
    color: white;
    box-shadow: 0 4px 12px rgba(141, 198, 63, 0.3);
}

.progress-step.completed .progress-circle {
    background: #008244;
    color: white;
}

.progress-label {
    font-size: 0.75rem;
    color: #94a3b8;
    font-weight: 600;
    transition: color 0.3s;
}

.progress-step.active .progress-label {
    color: #8DC63F;
}

.progress-line {
    flex: 1;
    height: 2px;
    background: #e2e8f0;
    max-width: 60px;
    transition: background 0.3s;
}

.progress-step.completed~.progress-line {
    background: #8DC63F;
}

/* Modal Body */
.modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 32px;
}

.modal-body::-webkit-scrollbar {
    width: 6px;
}

.modal-body::-webkit-scrollbar-thumb {
    background: #e2e8f0;
    border-radius: 10px;
}

/* Form Steps */
.form-step {
    display: none;
    animation: fadeInUp 0.4s ease;
}

.form-step.active {
    display: block;
}

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

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

/* Form Elements */
.form-group {
    margin-bottom: 24px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: #334155;
    margin-bottom: 8px;
}

.form-input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 1rem;
    color: #0f172a;
    transition: all 0.3s;
    font-family: 'Inter', sans-serif;
}

.form-input:focus {
    outline: none;
    border-color: #8DC63F;
    box-shadow: 0 0 0 3px rgba(141, 198, 63, 0.1);
}

.form-input.error {
    border-color: #ef4444;
}

.form-input::placeholder {
    color: #94a3b8;
}

textarea.form-input {
    resize: vertical;
    min-height: 80px;
}

/* Radio Groups */
.radio-group {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 12px;
}

.radio-option {
    position: relative;
    cursor: pointer;
}

.radio-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.radio-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 16px 12px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    transition: all 0.3s;
    background: white;
    font-weight: 600;
    color: #64748b;
}

.radio-option input[type="radio"]:checked+.radio-label {
    border-color: #8DC63F;
    background: rgba(141, 198, 63, 0.05);
    color: #008244;
}

.radio-option:hover .radio-label {
    border-color: #8DC63F;
}

/* Vertical Radio Groups */
.radio-group-vertical {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.radio-option-vertical {
    position: relative;
    cursor: pointer;
    display: block;
}

.radio-option-vertical input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.radio-label-vertical {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 16px 20px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    transition: all 0.3s;
    background: white;
}

.radio-option-vertical input[type="radio"]:checked+.radio-label-vertical {
    border-color: #8DC63F;
    background: rgba(141, 198, 63, 0.05);
}

.radio-option-vertical:hover .radio-label-vertical {
    border-color: #8DC63F;
}

/* Vendor Input Container */
.vendor-input-container {
    margin-top: 12px;
    margin-left: 20px;
    padding-left: 20px;
    border-left: 3px solid #8DC63F;
    transition: all 0.3s;
}

.vendor-input-container.hidden {
    display: none;
}

/* Consent Checkbox */
.consent-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    cursor: pointer;
}

.consent-checkbox input[type="checkbox"] {
    margin-top: 4px;
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: #8DC63F;
}

.consent-text {
    flex: 1;
    font-size: 0.875rem;
    color: #475569;
    line-height: 1.6;
}

/* Error Messages */
.error-message {
    display: block;
    color: #ef4444;
    font-size: 0.75rem;
    margin-top: 6px;
    min-height: 18px;
    font-weight: 500;
}

/* Success State */
.success-state {
    text-align: center;
    padding: 40px 20px;
}

.success-icon {
    margin-bottom: 24px;
    animation: scaleIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes scaleIn {
    from {
        transform: scale(0);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

/* Modal Footer */
.modal-footer {
    padding: 24px 32px;
    border-top: 1px solid #f1f5f9;
    display: flex;
    justify-content: space-between;
    gap: 12px;
}

.modal-footer.hidden {
    display: none;
}

/* Buttons */
.btn-primary {
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    color: white;
    border: none;
    padding: 14px 28px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s;
    box-shadow: 0 4px 12px rgba(251, 191, 36, 0.3);
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(251, 191, 36, 0.4);
}

.btn-primary:active:not(:disabled) {
    transform: translateY(0);
}

.btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-secondary {
    background: white;
    color: #64748b;
    border: 2px solid #e2e8f0;
    padding: 14px 28px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s;
}

.btn-secondary:hover:not(:disabled) {
    border-color: #8DC63F;
    color: #8DC63F;
}

.btn-secondary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Responsive Design */
@media (max-width: 768px) {
    .modal-container {
        max-height: 95vh;
        border-radius: 20px;
    }

    .modal-header {
        padding: 24px 20px 20px;
    }

    .modal-body {
        padding: 24px 20px;
    }

    .modal-footer {
        padding: 20px;
    }

    .modal-progress {
        padding: 20px;
    }

    .progress-label {
        font-size: 0.65rem;
    }

    .progress-circle {
        width: 36px;
        height: 36px;
        font-size: 0.8rem;
    }

    .progress-line {
        max-width: 30px;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .radio-group {
        grid-template-columns: 1fr;
    }

    .btn-primary,
    .btn-secondary {
        padding: 12px 20px;
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .modal-overlay {
        padding: 10px;
    }

    .modal-header h3 {
        font-size: 1.25rem;
    }

    .form-step h4 {
        font-size: 1.125rem;
    }
}