/* Energy Community Simulator - Main Styles */

/* Page Content Container - Wider, Centered */
.page-content {
    padding: 2rem 3rem;
    max-width: 1600px; /* Increased from 1400px */
    width: 95%; /* Use 95% of available width */
    margin: 0 auto;
    background: white;
    min-height: calc(100vh - 200px);
}

@media (max-width: 1400px) {
    .page-content {
        width: 98%;
        padding: 2rem;
    }
}

@media (max-width: 768px) {
    .page-content {
        width: 100%;
        padding: 1rem;
    }
}

/* Hero Section */
.hero-section {
    text-align: center;
    padding: 3rem 2rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 12px;
    margin-bottom: 2rem;
}

.hero-section h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    font-weight: bold;
}

.hero-section .lead {
    font-size: 1.25rem;
    margin-bottom: 2rem;
}

/* Feature Cards */
.features-section {
    margin-top: 3rem;
}

.feature-card {
    padding: 2rem;
    text-align: center;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 12px rgba(0, 0, 0, 0.15);
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.feature-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: #333;
}

.feature-card p {
    color: #666;
}

/* Setup Container - Full Width */
.setup-container {
    max-width: 100%; /* Use full width of page-content */
    margin: 0 auto;
}

/* Analysis Container - Full Width */
.analysis-container {
    max-width: 100%;
    margin: 0 auto;
}

/* Investment Container - Full Width */
.investment-container {
    max-width: 100%;
    margin: 0 auto;
}

/* Household Components */
.households-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.household-card {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 1.5rem;
    transition: box-shadow 0.3s ease;
}

.household-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.household-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #f0f0f0;
}

.household-header h4 {
    margin: 0;
    color: #333;
}

.household-actions {
    display: flex;
    gap: 0.5rem;
}

.household-details {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.detail-row .label {
    font-weight: 600;
    color: #666;
}

.detail-row .value {
    color: #333;
}

.household-summary {
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 8px;
    text-align: center;
}

/* Location Info */
.location-info {
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 8px;
}

/* Ownership Validation */
.ownership-validation {
    margin-top: 2rem;
    padding: 1rem;
    border-radius: 8px;
    text-align: center;
    font-size: 1.1rem;
}

/* Loading Spinner Container */
.loading-spinner-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 400px;
    width: 100%;
}

/* Loading Spinner */
.loading-spinner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    text-align: center;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid #f3f3f3;
    border-top: 5px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 1rem;
}

.loading-spinner p {
    margin: 0;
    font-size: 1rem;
    color: #666;
}

/* Chart Placeholder */
.chart-placeholder {
    background: #f8f9fa;
    border: 2px dashed #dee2e6;
    border-radius: 8px;
    padding: 2rem;
    text-align: center;
    min-height: 300px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.chart-placeholder p {
    margin-bottom: 1rem;
}

.chart-placeholder ul {
    text-align: left;
    max-width: 500px;
    margin: 1rem auto;
}

.battery-stats, .summary-stats, .projection-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.stat, .stat-card {
    background: white;
    padding: 1rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.stat-card.highlight {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: 2px solid #dee2e6;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.stat label, .stat-card label {
    display: block;
    font-weight: 600;
    color: #666;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat span, .stat-card span {
    display: block;
    font-size: 1.25rem;
    color: #333;
}

.stat-card .value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #333;
}

.stat-card .value.text-success {
    color: #10b981;
}

.stat-card .value.text-danger {
    color: #ef4444;
}

.stat-card .value.text-primary {
    color: #3b82f6;
}

/* ROI Projection Chart Styles */
.roi-projection-chart {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
}

.roi-projection-chart h4 {
    color: #333;
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
    font-weight: 600;
}

.chart-legend {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 8px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.9rem;
    color: #555;
}

.legend-color {
    width: 20px;
    height: 20px;
    border-radius: 4px;
    flex-shrink: 0;
    border: 1px solid #e0e0e0;
}
