/* 
 * Main Stylesheet
 * Author: EcoCalc Team
 * Last updated: 2024
 */

/* CSS Variables */
:root {
    --primary-color: #4CAF50;
    --primary-dark: #3b8c3f;
    --secondary-color: #2196F3;
    --background-color: #f9f9f9;
    --white: #fff;
    --shadow-color: rgba(0, 0, 0, 0.1);
    --text-color: #333;
    --light-text: #666;
    --error-color: #f44336;
    --success-color: #4CAF50;
    --spacing-unit: 20px;
    --border-radius-sm: 5px;
    --border-radius-md: 8px;
    --border-radius-lg: 10px;
    --transition-duration: 0.2s;
    --min-touch-target: 44px;
}

/* Reset Styles */
body {
    font-family: 'Inter', Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.6;
}

/* Layout Components */
.container {
    max-width: 800px;
    margin: 100px auto 50px;
    width: 95%;
    background: var(--white);
    border-radius: var(--border-radius-lg);
    box-shadow: 0 4px 15px var(--shadow-color);
    overflow: hidden;
}

/* Header Styles */
.page-header {
    padding: var(--spacing-unit);
    border-bottom: 1px solid #eee;
    background-color: #f5f5f5;
}

.page-header h1 {
    margin: 0;
    font-size: 28px;
    text-align: center;
    color: var(--primary-color);
}

.subtitle {
    text-align: center;
    color: var(--light-text);
    margin-top: 10px;
    font-size: 16px;
}

/* Progress Navigation */
.progress-navigation {
    padding: 15px var(--spacing-unit);
}

.progress-bar {
    width: 100%;
    background: #e0e0e0;
    height: 10px;
    position: relative;
    border-radius: var(--border-radius-sm);
    overflow: hidden;
}

.progress {
    height: 100%;
    background: var(--primary-color);
    width: 0%;
    transition: width 0.3s ease-in-out;
    border-radius: var(--border-radius-sm);
}

/* Calculator Section */
.calculator-section {
    padding: var(--spacing-unit);
}

#calculator-form {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-unit);
}

/* Question Styles */
.question-item {
    padding: var(--spacing-unit);
    border-radius: var(--border-radius-md);
    background-color: #f9f9f9;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.question-category {
    color: var(--primary-color);
    font-size: 0.9em;
    text-transform: uppercase;
    margin-bottom: 10px;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.question-text {
    font-size: 1.1rem;
    margin-bottom: 20px;
    font-weight: 500;
}

.question-hint {
    font-size: 0.9rem;
    color: var(--light-text);
    margin-bottom: 15px;
    padding: 10px;
    background-color: #f0f0f0;
    border-radius: var(--border-radius-sm);
}

/* Loading indicator */
.loading-indicator {
    text-align: center;
    padding: 30px;
}

.loading-indicator p {
    color: var(--light-text);
    font-size: 1rem;
}

/* Error message */
.error-message {
    color: var(--error-color);
    text-align: center;
    padding: 20px;
    background-color: rgba(244, 67, 54, 0.1);
    border-radius: var(--border-radius-md);
}

/* Navigation Controls */
.navigation-controls {
    display: flex;
    justify-content: space-between;
    margin-top: 20px;
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: var(--border-radius-md);
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 120px;
}

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

.btn-primary:hover {
    background-color: var(--primary-dark);
}

.btn-secondary {
    background-color: #e0e0e0;
    color: var(--text-color);
}

.btn-secondary:hover {
    background-color: #d0d0d0;
}

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

/* Options Styling */
.options {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.option-label {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    background-color: white;
    border: 1px solid #e0e0e0;
    border-radius: var(--border-radius-md);
    cursor: pointer;
    transition: all 0.2s ease;
}

.option-label:hover {
    border-color: var(--primary-color);
    background-color: rgba(76, 175, 80, 0.05);
}

.option-label input[type="radio"] {
    margin-right: 15px;
}

/* Responsive Styles */
@media (max-width: 768px) {
    .container {
        width: 100%;
        margin: 80px auto 30px;
        border-radius: 0;
    }
    
    .btn {
        padding: 10px 20px;
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .page-header h1 {
        font-size: 24px;
    }
    
    .subtitle {
        font-size: 14px;
    }
    
    .question-text {
        font-size: 1rem;
    }
    
    .option-label {
        padding: 10px 12px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}