/* ====================================
   HeatENE Calculator - Simplified Styles
   ==================================== */

/* CSS Variables */
:root {
    --primary: #f15a29;
    --primary-dark: #d94d23;
    --primary-light: #ff8c5a;
    --secondary: #1d3557;
    --secondary-light: #457b9d;
    --success: #2a9d8f;
    
    --white: #ffffff;
    --gray-50: #f8fafc;
    --gray-100: #f1f5f9;
    --gray-200: #e2e8f0;
    --gray-300: #cbd5e1;
    --gray-400: #94a3b8;
    --gray-500: #64748b;
    --gray-600: #475569;
    --gray-700: #334155;
    --gray-800: #1e293b;
    --gray-900: #0f172a;
    
    --font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -2px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -4px rgba(0,0,0,0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0,0,0,0.1), 0 8px 10px -6px rgba(0,0,0,0.1);
    
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --radius-2xl: 1.5rem;
}

/* Reset */
*, *::before, *::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    padding: 0;
    font-family: var(--font-family);
    font-size: 16px;
    line-height: 1.6;
    color: var(--gray-800);
    background: linear-gradient(135deg, var(--gray-50) 0%, var(--gray-100) 100%);
    min-height: 100vh;
}

/* Layout */
.app-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header */
.header {
    background: var(--white);
    box-shadow: var(--shadow-md);
    padding: 1rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 100;
}

.logo {
    display: flex;
    align-items: center;
}

.logo-img {
    height: 40px;
    width: auto;
}

@media (min-width: 640px) {
    .logo-img {
        height: 48px;
    }
}

.header-subtitle {
    font-size: 0.875rem;
    color: var(--gray-500);
    display: none;
}

@media (min-width: 640px) {
    .header-subtitle {
        display: block;
    }
}

/* Main Content */
.main-content {
    flex: 1;
    padding: 2rem 1rem;
    max-width: 720px;
    margin: 0 auto;
    width: 100%;
}

/* Calculator Section */
.calculator {
    background: var(--white);
    border-radius: var(--radius-2xl);
    box-shadow: var(--shadow-lg);
    padding: 2rem;
    animation: fadeIn 0.4s ease;
}

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

.calculator-intro {
    text-align: center;
    margin-bottom: 2rem;
}

.calculator-intro h1 {
    font-size: 1.75rem;
    color: var(--secondary);
    margin: 0 0 0.5rem;
}

.calculator-intro p {
    color: var(--gray-500);
    margin: 0;
}

/* Questions */
.question {
    margin-bottom: 2rem;
}

.question-label {
    display: block;
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: 0.75rem;
    font-size: 1rem;
}

/* Housing Type Cards */
.housing-cards {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
}

@media (min-width: 540px) {
    .housing-cards {
        grid-template-columns: repeat(4, 1fr);
    }
}

.housing-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 1rem 0.5rem;
    background: var(--white);
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: all 0.2s ease;
}

.housing-card:hover {
    border-color: var(--primary-light);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.housing-card.selected {
    border-color: var(--primary);
    background: linear-gradient(135deg, rgba(241, 90, 41, 0.05) 0%, rgba(241, 90, 41, 0.1) 100%);
}

.housing-card .card-icon {
    font-size: 2rem;
    margin-bottom: 0.25rem;
}

.housing-card .card-title {
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--gray-800);
}

.housing-card .card-desc {
    font-size: 0.7rem;
    color: var(--gray-500);
    margin-top: 0.125rem;
}

/* Climate Zone Cards */
.climate-cards {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
}

@media (min-width: 540px) {
    .climate-cards {
        grid-template-columns: repeat(4, 1fr);
    }
}

.climate-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 1rem 0.5rem;
    background: var(--white);
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: all 0.2s ease;
}

.climate-card:hover {
    border-color: var(--primary-light);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.climate-card.selected {
    border-color: var(--primary);
    background: linear-gradient(135deg, rgba(241, 90, 41, 0.05) 0%, rgba(241, 90, 41, 0.1) 100%);
}

.climate-card .card-icon {
    font-size: 2rem;
    margin-bottom: 0.25rem;
}

.climate-card .card-title {
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--gray-800);
}

.climate-card .card-desc {
    font-size: 0.7rem;
    color: var(--gray-500);
    margin-top: 0.125rem;
}

/* Heating Type Cards */
.heating-cards {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
}

@media (min-width: 540px) {
    .heating-cards {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 768px) {
    .heating-cards {
        grid-template-columns: repeat(6, 1fr);
    }
}

.heating-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 0.875rem 0.5rem;
    background: var(--white);
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: all 0.2s ease;
}

.heating-card:hover {
    border-color: var(--primary-light);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.heating-card.selected {
    border-color: var(--primary);
    background: linear-gradient(135deg, rgba(241, 90, 41, 0.05) 0%, rgba(241, 90, 41, 0.1) 100%);
}

.heating-card .card-icon {
    font-size: 1.75rem;
    margin-bottom: 0.25rem;
}

.heating-card .card-title {
    font-weight: 500;
    font-size: 0.75rem;
    color: var(--gray-700);
}

/* Form Inputs */
.input-wrapper {
    position: relative;
}

.form-input {
    width: 100%;
    padding: 0.875rem 1rem;
    font-size: 1rem;
    font-family: inherit;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-lg);
    transition: all 0.2s ease;
    background: var(--white);
}

.form-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(241, 90, 41, 0.1);
}

.form-input::placeholder {
    color: var(--gray-400);
}

.input-hint {
    display: block;
    font-size: 0.75rem;
    color: var(--gray-400);
    margin-top: 0.5rem;
}

/* Era Selector */
.era-selector {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 0.5rem;
}

@media (max-width: 600px) {
    .era-selector {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 400px) {
    .era-selector {
        grid-template-columns: repeat(2, 1fr);
    }
}

.era-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0.75rem 0.5rem;
    background: var(--white);
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
}

.era-btn:hover {
    border-color: var(--primary-light);
}

.era-btn.selected {
    background: var(--primary);
    border-color: var(--primary);
    color: var(--white);
}

.era-years {
    font-weight: 600;
    font-size: 0.875rem;
}

.era-label {
    font-size: 0.7rem;
    opacity: 0.7;
    margin-top: 0.125rem;
}

/* Number Selector */
.number-selector {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.num-btn {
    flex: 1;
    min-width: 48px;
    padding: 0.75rem 0.5rem;
    font-size: 1rem;
    font-weight: 600;
    font-family: inherit;
    background: var(--white);
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s ease;
}

.num-btn:hover {
    border-color: var(--primary-light);
}

.num-btn.selected {
    background: var(--primary);
    border-color: var(--primary);
    color: var(--white);
}

/* Calculate Button */
.calculate-section {
    margin-top: 2.5rem;
    text-align: center;
}

.btn-calculate {
    width: 100%;
    max-width: 320px;
    padding: 1rem 2rem;
    font-size: 1.125rem;
    font-weight: 600;
    font-family: inherit;
    color: var(--white);
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    border: none;
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: var(--shadow-md);
}

.btn-calculate:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-calculate:active {
    transform: translateY(0);
}

.disclaimer {
    font-size: 0.75rem;
    color: var(--gray-400);
    margin-top: 0.75rem;
}

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

.results {
    animation: fadeIn 0.4s ease;
}

.results-header {
    text-align: center;
    margin-bottom: 1.5rem;
}

.results-header h2 {
    font-size: 1.5rem;
    color: var(--secondary);
    margin: 0 0 0.25rem;
}

.results-subtitle {
    color: var(--gray-500);
    margin: 0;
}

/* Result Hero */
.result-hero {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    border-radius: var(--radius-xl);
    padding: 2rem;
    text-align: center;
    color: var(--white);
    margin-bottom: 1.5rem;
}

.result-main {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 0.5rem;
}

.result-number {
    font-size: 4rem;
    font-weight: 700;
    line-height: 1;
}

.result-unit {
    font-size: 1.25rem;
    opacity: 0.9;
}

.result-label {
    font-size: 0.9rem;
    opacity: 0.85;
    margin-top: 0.5rem;
}

/* Result Cards */
.result-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
    margin-bottom: 2rem;
}

.result-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 1rem;
    text-align: center;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--gray-100);
}

.result-card.highlight {
    background: linear-gradient(135deg, rgba(241, 90, 41, 0.05) 0%, rgba(241, 90, 41, 0.1) 100%);
    border-color: rgba(241, 90, 41, 0.2);
}

.result-card .card-value {
    display: block;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--gray-800);
}

.result-card.highlight .card-value {
    color: var(--primary);
}

.result-card .card-label {
    display: block;
    font-size: 0.7rem;
    color: var(--gray-500);
    margin-top: 0.25rem;
}

@media (max-width: 480px) {
    .result-cards {
        grid-template-columns: 1fr;
    }
    
    .result-card {
        display: flex;
        justify-content: space-between;
        align-items: center;
        text-align: left;
    }
    
    .result-card .card-label {
        margin-top: 0;
    }
}

/* Breakdown Section */
.breakdown-section {
    background: var(--white);
    border-radius: var(--radius-xl);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-sm);
}

.breakdown-section h3 {
    font-size: 1rem;
    color: var(--secondary);
    margin: 0 0 1rem;
}

.room-breakdown {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.room-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    background: var(--gray-50);
    border-radius: var(--radius-md);
}

.room-row .room-name {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.room-row .room-icon {
    font-size: 1.25rem;
}

.room-row .room-label {
    font-weight: 500;
    color: var(--gray-700);
}

.room-row .room-sqft {
    font-size: 0.75rem;
    color: var(--gray-400);
}

.room-row .room-feet {
    font-weight: 600;
    color: var(--primary);
}

/* Savings Section */
.savings-section {
    background: var(--white);
    border-radius: var(--radius-xl);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-sm);
}

.savings-section h3 {
    font-size: 1rem;
    color: var(--secondary);
    margin: 0 0 1rem;
}

.savings-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

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

.savings-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.savings-icon {
    font-size: 1.5rem;
}

.savings-content {
    display: flex;
    flex-direction: column;
}

.savings-value {
    font-weight: 600;
    color: var(--gray-800);
}

.savings-label {
    font-size: 0.75rem;
    color: var(--gray-500);
}

/* Version Options */
.versions-section {
    background: var(--white);
    border-radius: var(--radius-xl);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-sm);
}

.versions-section h3 {
    font-size: 1rem;
    color: var(--secondary);
    margin: 0 0 0.5rem;
}

.versions-note {
    font-size: 0.85rem;
    color: var(--gray-500);
    margin: 0 0 1rem;
}

.diy-note {
    font-size: 0.85rem;
    color: var(--success);
    margin: 1rem 0 0;
    text-align: center;
}

.version-options {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

@media (max-width: 480px) {
    .version-options {
        grid-template-columns: 1fr;
    }
}

.version-card {
    position: relative;
    background: var(--gray-50);
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-lg);
    padding: 1.25rem 1rem;
    text-align: center;
    transition: all 0.2s ease;
    cursor: pointer;
}

.version-card:hover {
    border-color: var(--primary-light);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.version-card.recommended {
    border-color: var(--primary);
}

.version-card.selected {
    border-color: var(--primary);
    background: linear-gradient(135deg, rgba(241, 90, 41, 0.05) 0%, rgba(241, 90, 41, 0.1) 100%);
    box-shadow: 0 0 0 3px rgba(241, 90, 41, 0.2);
}

.version-badge {
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary);
    color: white;
    font-size: 0.65rem;
    font-weight: 600;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    text-transform: uppercase;
}

.version-name {
    font-weight: 600;
    color: var(--gray-800);
    margin-bottom: 0.5rem;
}

.version-feet {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--primary);
}

.version-watts {
    font-size: 0.85rem;
    color: var(--gray-500);
    margin-bottom: 0.25rem;
}

.version-price {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: 0.5rem;
}

.version-desc {
    font-size: 0.75rem;
    color: var(--gray-500);
    line-height: 1.4;
}

/* Cost Comparison Box */
.comparison-box {
    background: var(--gray-50);
    border-radius: var(--radius-lg);
    padding: 1rem;
    margin-bottom: 1rem;
}

.comparison-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    border-radius: var(--radius-md);
    margin-bottom: 0.5rem;
}

.comparison-row.current {
    background: var(--white);
    border: 1px solid var(--gray-200);
}

.comparison-row.heatene {
    background: linear-gradient(135deg, rgba(241, 90, 41, 0.1) 0%, rgba(241, 90, 41, 0.15) 100%);
    border: 2px solid var(--primary);
}

.comparison-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
    color: var(--gray-700);
}

.comparison-icon {
    font-size: 1.25rem;
}

.comparison-value {
    font-weight: 700;
    font-size: 1.125rem;
    color: var(--gray-800);
}

.comparison-row.heatene .comparison-value {
    color: var(--primary);
}

.comparison-savings {
    background: var(--success);
    color: var(--white);
    padding: 0.75rem 1rem;
    border-radius: var(--radius-md);
    text-align: center;
    margin-top: 0.5rem;
}

.comparison-savings.positive {
    background: var(--success);
}

.comparison-savings.negative {
    background: var(--gray-500);
}

.comparison-savings .savings-text {
    font-size: 0.9rem;
}

.comparison-savings strong {
    font-size: 1.1rem;
}

/* Benefits Section */
.benefits-section {
    background: var(--white);
    border-radius: var(--radius-xl);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-sm);
}

.benefits-section h3 {
    font-size: 1rem;
    color: var(--secondary);
    margin: 0 0 1rem;
}

/* Calculation Info */
.calculation-info {
    margin-bottom: 1.5rem;
}

.info-toggle {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: var(--gray-50);
    border: none;
    border-radius: var(--radius-lg);
    font-family: inherit;
    font-size: 0.875rem;
    color: var(--gray-600);
    cursor: pointer;
    transition: background 0.2s ease;
}

.info-toggle:hover {
    background: var(--gray-100);
}

.toggle-icon {
    transition: transform 0.2s ease;
}

.toggle-icon.open {
    transform: rotate(180deg);
}

.calc-details {
    padding: 1rem;
    background: var(--gray-50);
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
    margin-top: -0.5rem;
}

.calc-details ul {
    margin: 0;
    padding-left: 1.25rem;
}

.calc-details li {
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
    color: var(--gray-600);
}

.calc-note {
    margin: 1rem 0 0;
    padding-top: 0.75rem;
    border-top: 1px solid var(--gray-200);
    font-size: 0.75rem;
    color: var(--gray-400);
    font-style: italic;
}

/* CTA Section */
.cta-section {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-primary,
.btn-secondary {
    padding: 0.875rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    font-family: inherit;
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: var(--white);
    border: none;
    box-shadow: var(--shadow-md);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-secondary {
    background: var(--white);
    color: var(--gray-700);
    border: 2px solid var(--gray-200);
}

.btn-secondary:hover {
    border-color: var(--gray-300);
    background: var(--gray-50);
}

/* Footer */
.footer {
    text-align: center;
    padding: 1.5rem;
    color: var(--gray-400);
    font-size: 0.875rem;
}

.footer p {
    margin: 0;
}

/* Error State */
.error {
    border-color: #ef4444 !important;
}

.error-message {
    color: #ef4444;
    font-size: 0.75rem;
    margin-top: 0.25rem;
}

/* Responsive */
@media (max-width: 480px) {
    .main-content {
        padding: 1rem;
    }
    
    .calculator {
        padding: 1.5rem;
    }
    
    .calculator-intro h1 {
        font-size: 1.5rem;
    }
    
    .result-number {
        font-size: 3rem;
    }
    
    .result-hero {
        padding: 1.5rem;
    }
}

/* Quote Actions Section */
.quote-actions {
    background: var(--white);
    border-radius: var(--radius-xl);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-sm);
    text-align: center;
}

.quote-actions h3 {
    font-size: 1rem;
    color: var(--secondary);
    margin: 0 0 1rem;
}

.quote-buttons {
    margin-bottom: 1.5rem;
}

.btn-pdf {
    font-size: 1.1rem;
    padding: 1rem 2rem;
}

.email-quote-section {
    border-top: 1px solid var(--gray-200);
    padding-top: 1.5rem;
}

.email-label {
    font-size: 0.9rem;
    color: var(--gray-500);
    margin: 0 0 0.75rem;
}

.email-form {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
    flex-wrap: wrap;
}

.email-input {
    flex: 1;
    min-width: 200px;
    max-width: 300px;
}

.btn-email {
    white-space: nowrap;
}

.email-success {
    margin-top: 1rem;
    padding: 0.75rem 1rem;
    background: linear-gradient(135deg, rgba(42, 157, 143, 0.1) 0%, rgba(42, 157, 143, 0.2) 100%);
    border: 1px solid var(--success);
    border-radius: var(--radius-md);
    color: var(--success);
    font-weight: 500;
}

@media (max-width: 480px) {
    .email-form {
        flex-direction: column;
        align-items: stretch;
    }
    
    .email-input {
        max-width: none;
    }
}

/* Print Styles */
@media print {
    .header,
    .footer,
    .cta-section,
    .info-toggle {
        display: none !important;
    }
    
    body {
        background: white;
    }
    
    .main-content {
        max-width: none;
    }
}
