/* Index Page Styles */

.year-section {
    /* Ghost div - no visual styling, only functional properties */
    display: none; /* Hidden by default */
    opacity: 0;
    transition: opacity 0.3s ease;
}

.year-section.show {
    display: block;
    opacity: 1;
}

.year-header {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    color: white;
    padding: 1rem;
    border-radius: 10px;
    margin-bottom: 1rem;
    text-align: center;
    font-weight: bold;
    font-size: 1.2rem;
}

.month-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.month-card {
    background: white;
    border-radius: 10px;
    padding: 1rem;
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    cursor: pointer;
}

.month-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,123,255,0.3);
    border-color: #007bff;
    text-decoration: none;
    color: inherit;
}

.month-card:active {
    transform: translateY(-2px);
}

.month-name {
    font-size: 1.1rem;
    font-weight: bold;
    color: #007bff;
    margin-bottom: 0.5rem;
}

.month-consumption {
    font-size: 0.9rem;
    color: #007bff;
    margin-bottom: 0.3rem;
    font-weight: 600;
}

.month-filename {
    font-size: 0.8rem;
    color: #28a745;
    font-family: monospace;
    background: #f8f9fa;
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
}

.stats-overview {
    background: white;
    border-radius: 15px;
    padding: 2rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
}

.stats-overview h3 {
    color: #2c3e50;
    margin-bottom: 1.5rem;
    font-weight: 600;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.stat-item {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: 2px solid #dee2e6;
    border-radius: 12px;
    padding: 1.5rem 1rem;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 120px;
}

.stat-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    border-color: #007bff;
}

.stat-number {
    font-size: 2rem;
    font-weight: bold;
    display: block;
    color: #495057;
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 0.9rem;
    font-weight: 500;
    color: #495057;
    line-height: 1.3;
    margin-bottom: 0.25rem;
}

.stat-unit {
    font-size: 0.8rem;
    color: #6c757d;
    font-weight: 400;
}

/* Different colors for each stat item */
.stat-item:nth-child(1):hover {
    border-color: #28a745;
}

.stat-item:nth-child(1):hover .stat-number {
    color: #28a745;
}

.stat-item:nth-child(2):hover {
    border-color: #17a2b8;
}

.stat-item:nth-child(2):hover .stat-number {
    color: #17a2b8;
}

.stat-item:nth-child(3):hover {
    border-color: #ffc107;
}

.stat-item:nth-child(3):hover .stat-number {
    color: #ffc107;
}

.stat-item:nth-child(4):hover {
    border-color: #007bff;
}

.stat-item:nth-child(4):hover .stat-number {
    color: #007bff;
}

.stat-item:nth-child(5):hover {
    border-color: #6f42c1;
}

.stat-item:nth-child(5):hover .stat-number {
    color: #6f42c1;
}

.quick-actions {
    background: white;
    border-radius: 15px;
    padding: 2rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
    overflow: hidden; /* Prevent any content overflow */
}

.quick-actions h3 {
    color: #2c3e50;
    margin-bottom: 1.5rem;
    font-weight: 600;
}

.actions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    width: 100%; /* Ensure full width usage */
    margin: 0 auto; /* Center the grid */
}

/* When user has no data (only 2 buttons visible) - expand to fill space */
.actions-grid:has(.action-item:nth-child(2)):not(:has(.action-item:nth-child(3))) {
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

/* Fallback for browsers that don't support :has() selector */
@supports not (selector(:has(*))) {
    .no-data-actions-grid {
        grid-template-columns: 1fr 1fr !important;
        gap: 1.5rem !important;
    }
}

/* Responsive adjustments for actions grid */
@media (min-width: 768px) {
    .actions-grid {
        /* Changed to 4 columns for 768px to 991px range */
        grid-template-columns: repeat(4, 1fr);
        /* Adjusted gap for 4 columns */
        gap: 1rem;
    }
    
    /* No data state: 2 buttons expand on tablet/desktop */
    .actions-grid:has(.action-item:nth-child(2)):not(:has(.action-item:nth-child(3))) {
        grid-template-columns: 1fr 1fr;
        gap: 2rem;
        max-width: 600px;
        margin: 0 auto;
    }
    
    /* Fallback for no :has() support */
    @supports not (selector(:has(*))) {
        .no-data-actions-grid {
            grid-template-columns: 1fr 1fr !important;
            gap: 2rem !important;
            max-width: 600px !important;
            margin: 0 auto !important;
        }
    }
    
    .action-item {
        min-width: 140px;
        padding: 1.25rem 0.75rem;
    }
    
    .action-label {
        font-size: 0.85rem;
    }
}

/* Fix for 992px+ range: Ensure 6 columns and adjust item sizes */
/* Changed from (min-width: 992px) and (max-width: 1299px) to (min-width: 992px) */
@media (min-width: 992px) {
    .actions-grid {
        grid-template-columns: repeat(6, 1fr);
        gap: 0.5rem; 
    }
    
    .action-item {
        min-width: 120px; /* Reduce minimum width */
        padding: 1rem 0.5rem; /* Reduce padding */
    }
    
    .action-icon {
        font-size: 1.75rem; /* Slightly smaller icon */
        margin-bottom: 0.5rem; /* Reduce bottom margin */
    }
    
    .action-label {
        font-size: 0.8rem; /* Smaller text */
        line-height: 1.2;
    }
    
    /* Ensure no data state also works in this range */
    .actions-grid:has(.action-item:nth-child(2)):not(:has(.action-item:nth-child(3))) {
        grid-template-columns: 1fr 1fr;
        gap: 1.5rem;
        max-width: 500px;
        margin: 0 auto;
    }
    
    /* Fallback for no :has() support */
    @supports not (selector(:has(*))) {
        .no-data-actions-grid {
            grid-template-columns: 1fr 1fr !important;
            gap: 1.5rem !important;
            max-width: 500px !important;
            margin: 0 auto !important;
        }
    }
}

/* Additional fine-tuning for tablet landscape (1024px+) */
@media (min-width: 1024px) and (max-width: 1199px) {
    .actions-grid {
        gap: 0.75rem; /* Slightly more space than 992px */
    }
    
    .action-item {
        min-width: 130px; /* Slightly larger than 992px */
        padding: 1.1rem 0.6rem;
    }
    
    .action-icon {
        font-size: 1.85rem;
        margin-bottom: 0.6rem;
    }
    
    .action-label {
        font-size: 0.82rem;
    }
}

@media (min-width: 1200px) {
    .actions-grid {
        gap: 1rem;
    }
    
    /* No data state: even more space on large screens */
    .actions-grid:has(.action-item:nth-child(2)):not(:has(.action-item:nth-child(3))) {
        gap: 3rem;
        max-width: 700px;
    }
    
    /* Fallback for no :has() support */
    @supports not (selector(:has(*))) {
        .no-data-actions-grid {
            gap: 3rem !important;
            max-width: 700px !important;
        }
    }
    
    .action-item {
        min-width: 160px;
        padding: 1.5rem 1rem;
    }
    
    .action-label {
        font-size: 0.9rem;
    }
}

/* Mobile: stack buttons vertically when no data */
@media (max-width: 767px) {
    .actions-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    /* No data state: single column on mobile */
    .actions-grid:has(.action-item:nth-child(2)):not(:has(.action-item:nth-child(3))) {
        grid-template-columns: 1fr;
        gap: 1rem;
        max-width: 400px;
        margin: 0 auto;
    }
    
    /* Fallback for no :has() support */
    @supports not (selector(:has(*))) {
        .no-data-actions-grid {
            grid-template-columns: 1fr !important;
            gap: 1rem !important;
            max-width: 400px !important;
            margin: 0 auto !important;
        }
    }
}

.action-item {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: 2px solid #dee2e6;
    border-radius: 12px;
    padding: 1.5rem 1rem;
    text-align: center;
    text-decoration: none;
    color: #495057;
    transition: all 0.3s ease;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 120px;
    overflow: hidden; /* Prevent content overflow */
    word-wrap: break-word; /* Allow text wrapping */
    hyphens: auto; /* Enable hyphenation for long words */
}

.action-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    border-color: #007bff;
    color: #007bff;
    text-decoration: none;
}

.action-button {
    background: none;
    border: 2px solid #dee2e6;
}

.action-button:hover {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

.action-icon {
    font-size: 2rem;
    margin-bottom: 0.75rem;
    color: #6c757d;
    transition: color 0.3s ease;
}

.action-item:hover .action-icon {
    color: #007bff;
}

.action-label {
    font-size: 0.9rem;
    font-weight: 500;
    line-height: 1.3;
    word-wrap: break-word; /* Allow text wrapping */
    overflow-wrap: break-word; /* Modern alternative to word-wrap */
    hyphens: auto; /* Enable hyphenation */
    text-align: center;
    width: 100%; /* Ensure full width usage */
    max-width: 100%; /* Prevent exceeding container */
}

/* Different colors for each action */
.action-item:nth-child(1):hover {
    border-color: #28a745;
    color: #28a745;
}

.action-item:nth-child(1):hover .action-icon {
    color: #28a745;
}

.action-item:nth-child(2):hover {
    border-color: #17a2b8;
    color: #17a2b8;
}

.action-item:nth-child(2):hover .action-icon {
    color: #17a2b8;
}

.action-item:nth-child(3):hover {
    border-color: #ffc107;
    color: #ffc107;
}

.action-item:nth-child(3):hover .action-icon {
    color: #ffc107;
}

.action-item:nth-child(4):hover {
    border-color: #007bff;
    color: #007bff;
}

.action-item:nth-child(4):hover .action-icon {
    color: #007bff;
}

.action-item:nth-child(5):hover {
    border-color: #6f42c1;
    color: #6f42c1;
}

.action-item:nth-child(5):hover .action-icon {
    color: #6f42c1;
}

.loading-spinner {
    display: none;
    text-align: center;
    padding: 2rem;
}

.chart-preview {
    background: white;
    border-radius: 15px;
    padding: 1.5rem;
    margin-top: 2rem;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.no-data {
    text-align: center;
    color: #6c757d;
    font-style: italic;
    padding: 2rem;
}

/* Upload Modal Styles */
.upload-area {
    border: 2px dashed #dee2e6;
    border-radius: 10px;
    padding: 3rem 2rem;
    text-align: center;
    background-color: #f8f9fa;
    transition: all 0.3s ease;
    cursor: pointer;
}

.upload-area:hover {
    border-color: #007bff;
    background-color: #e3f2fd;
}

.upload-area.dragover {
    border-color: #007bff;
    background-color: #e3f2fd;
    transform: scale(1.02);
}

.upload-content {
    pointer-events: none;
}

.file-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem;
    margin-bottom: 0.5rem;
    background-color: #f8f9fa;
    border-radius: 5px;
    border: 1px solid #dee2e6;
}

.file-info {
    display: flex;
    align-items: center;
}

.file-size {
    font-size: 0.8rem;
    color: #6c757d;
    margin-left: 0.5rem;
}

.file-remove {
    color: #dc3545;
    cursor: pointer;
    padding: 0.25rem;
}

.file-remove:hover {
    color: #c82333;
}

.upload-result-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem;
    margin-bottom: 0.5rem;
    border-radius: 5px;
    border: 1px solid #dee2e6;
}

.upload-result-success {
    background-color: #d4edda;
    border-color: #c3e6cb;
    color: #155724;
}

.upload-result-error {
    background-color: #f8d7da;
    border-color: #f5c6cb;
    color: #721c24;
}

/* Yearly Consumption Styles */
.yearly-consumption-section {
    background: white;
    border-radius: 15px;
    padding: 1.5rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
}

.yearly-consumption-section h5 {
    color: #2c3e50;
    margin-bottom: 1rem;
    font-weight: 600;
}

.yearly-consumption-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.yearly-consumption-item {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    padding: 1.5rem;
    color: white;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

.yearly-consumption-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.yearly-consumption-item.active {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.3);
    border: 3px solid #fff;
}

.yearly-consumption-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0) 100%);
    pointer-events: none;
}

.year-label {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    opacity: 0.9;
}

.consumption-value {
    margin: 0.75rem 0;
}

.consumption-number {
    font-size: 2rem;
    font-weight: 700;
    display: block;
    line-height: 1;
}

.consumption-unit {
    font-size: 0.9rem;
    opacity: 0.8;
    font-weight: 500;
}

.months-count {
    font-size: 0.85rem;
    opacity: 0.8;
    margin-top: 0.5rem;
}

/* Different gradient colors for each year */
.yearly-consumption-item:nth-child(1) {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.yearly-consumption-item:nth-child(2) {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.yearly-consumption-item:nth-child(3) {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

.yearly-consumption-item:nth-child(4) {
    background: linear-gradient(135deg, #07e651 0%, #38f9d7 100%);
}

/* Loading indicator for year sections */
.year-section-loading {
    text-align: center;
    padding: 2rem;
    color: #6c757d;
}

.year-section-loading .spinner-border {
    width: 2rem;
    height: 2rem;
}

/* Seasonal Consumption Styles */
.seasonal-section {
    margin-top: 2rem;
    padding: 1.5rem;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 12px;
    border: 1px solid #dee2e6;
}

.seasonal-header h6 {
    color: #2c3e50;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.seasonal-header p {
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.seasonal-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.seasonal-card {
    background: white;
    border-radius: 10px;
    padding: 1.5rem;
    text-align: center;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.seasonal-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
    border-color: rgba(0,0,0,0.1);
}

.seasonal-icon {
    margin-bottom: 1rem;
}

.seasonal-info {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.seasonal-name {
    font-weight: 600;
    font-size: 1.1rem;
    text-transform: capitalize;
    color: #2c3e50;
}

.seasonal-consumption {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 0.25rem;
}

.consumption-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #2c3e50;
}

.consumption-unit {
    font-size: 0.9rem;
    color: #6c757d;
    font-weight: 500;
}

.seasonal-percentage {
    font-size: 0.9rem;
    font-weight: 600;
}

/* Shared Chart Section Styles */
.chart-section {
    margin-top: 2rem;
    padding: 1.5rem;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border-radius: 12px;
    border: 1px solid #dee2e6;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.chart-header h6 {
    color: #2c3e50;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.chart-header p {
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
}

.monthly-chart-container {
    position: relative;
    height: 400px;
    margin-bottom: 1.5rem;
    background: white;
    border-radius: 8px;
    padding: 1rem;
    box-shadow: 0 1px 4px rgba(0,0,0,0.1);
}

.monthly-chart-canvas {
    width: 100%;
    height: 400px;
    cursor: pointer; /* Indicate clickable chart */
}

.monthly-chart-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.chart-stat {
    background: white;
    border-radius: 8px;
    padding: 1rem;
    text-align: center;
    border: 1px solid #e9ecef;
    transition: all 0.3s ease;
}

.chart-stat:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.chart-stat .stat-value {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 0.25rem;
}

.chart-stat .stat-label {
    display: block;
    font-size: 0.85rem;
    color: #6c757d;
    font-weight: 500;
    margin-bottom: 0.25rem;
}

.chart-stat .stat-unit {
    font-size: 0.8rem;
    color: #6c757d;
    font-weight: 400;
}

/* Injection stats card styling */
.chart-stat.injection-stat {
    background: rgba(220, 53, 69, 0.5); /* Transparent red background - same as injection bars */
    border-color: rgba(220, 53, 69, 0.7);
    color: white;
}

.chart-stat.injection-stat:hover {
    background: rgba(220, 53, 69, 0.7); /* Slightly more opaque on hover */
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(220, 53, 69, 0.3);
}

.chart-stat.injection-stat .stat-value {
    color: white;
}

.chart-stat.injection-stat .stat-label {
    color: rgba(255, 255, 255, 0.9);
}

.chart-stat.injection-stat .stat-unit {
    color: rgba(255, 255, 255, 0.8);
}

.chart-stat.expenses-stat {
    background: rgba(122, 17, 235, 0.7);
    border-color: rgba(122, 17, 235, 0.85);
    color: #fff;
}

.chart-stat.expenses-stat:hover {
    background: rgba(122, 17, 235, 0.85);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(122, 17, 235, 0.3);
}

.chart-stat.expenses-stat .stat-value,
.chart-stat.expenses-stat .stat-label,
.chart-stat.expenses-stat .stat-unit {
    color: rgba(255, 255, 255, 0.95);
}

/* Injection toggle button styling */
.btn-injection-outline {
    color: rgba(220, 53, 69, 1);
    border-color: rgba(220, 53, 69, 0.7);
    background-color: transparent;
}

.btn-injection-outline:hover,
.btn-injection-outline:focus {
    color: white;
    background-color: rgba(220, 53, 69, 0.5);
    border-color: rgba(220, 53, 69, 0.7);
}

.btn-injection {
    color: white;
    background-color: rgba(220, 53, 69, 0.5);
    border-color: rgba(220, 53, 69, 0.7);
}

.btn-injection:hover,
.btn-injection:focus {
    color: white;
    background-color: rgba(220, 53, 69, 0.7);
    border-color: rgba(220, 53, 69, 0.8);
}

/* Expenses toggle button styling */
.btn-expense-outline {
    color: #7a11eb;
    border-color: rgba(122, 17, 235, 0.6);
    background-color: transparent;
}

.btn-expense-outline:hover,
.btn-expense-outline:focus {
    color: white;
    background-color: rgba(122, 17, 235, 0.5);
    border-color: rgba(122, 17, 235, 0.8);
}

.btn-expense {
    color: white;
    background-color: rgba(122, 17, 235, 0.65);
    border-color: rgba(122, 17, 235, 0.85);
}

.btn-expense:hover,
.btn-expense:focus {
    color: white;
    background-color: rgba(122, 17, 235, 0.8);
    border-color: rgba(122, 17, 235, 1);
}

/* Responsive adjustments for monthly chart */
@media (max-width: 768px) {
    .monthly-chart-container {
        height: 300px;
        padding: 0.5rem;
    }
    
    .monthly-chart-stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.5rem;
    }
    
    .chart-stat {
        padding: 0.75rem;
    }
    
    .chart-stat .stat-value {
        font-size: 1.25rem;
    }
}

@media (max-width: 480px) {
    .monthly-chart-stats {
        grid-template-columns: 1fr;
    }
    
    .monthly-chart-container {
        height: 250px;
    }
}

/* Energy Provider Modal Styles have been moved to energy_provider_modal.css */

.stat-item:hover {
    transform: translateY(-2px);
    transition: transform 0.3s ease;
}

/* Contract Power Selection styles moved to energy_provider_modal.css */

/* Editable Rate Styles moved to energy_provider_modal.css */

/* Hours Information styles moved to energy_provider_modal.css */

/* Schedule Selection styles moved to energy_provider_modal.css */

/* Ripple effect for action buttons */
.action-btn {
    position: relative;
    overflow: hidden;
}

.ripple {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.6);
    transform: scale(0);
    animation: ripple-animation 0.6s linear;
    pointer-events: none;
}

@keyframes ripple-animation {
    to {
        transform: scale(4);
        opacity: 0;
    }
}

/* Chart Loading Indicator */
.chart-loading-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 400px;
    background: rgba(248, 249, 250, 0.8);
    border-radius: 8px;
    border: 2px dashed #dee2e6;
}

.chart-loading-indicator .spinner-border {
    width: 3rem;
    height: 3rem;
}

.chart-loading-indicator p {
    margin: 0;
    font-size: 0.9rem;
    color: #6c757d;
}

/* File Conflict Modal Styles */
.conflict-item {
    background-color: #fefefe;
    border: 1px solid #dee2e6 !important;
    transition: all 0.2s ease;
}

.conflict-item:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.conflict-item h6 {
    border-bottom: 1px solid #dee2e6;
    padding-bottom: 8px;
    margin-bottom: 16px;
}

.file-option {
    position: relative;
}

.file-option .form-check {
    margin-bottom: 8px;
}

.file-option .form-check-label {
    cursor: pointer;
    user-select: none;
    font-size: 0.95rem;
}

.file-option .form-check-input {
    margin-top: 0.2em;
}

.existing-file-info,
.new-file-info {
    border: 1px solid #e9ecef;
    transition: all 0.2s ease;
}

.file-option input[type="radio"]:checked ~ .existing-file-info {
    border-color: #28a745;
    background-color: #f8fff8 !important;
}

.file-option input[type="radio"]:checked ~ .new-file-info {
    border-color: #007bff;
    background-color: #f8fbff !important;
}

.file-name {
    font-weight: 500;
    color: #333;
    margin-bottom: 4px;
    word-break: break-word;
}

.file-details {
    color: #6c757d;
    font-size: 0.85rem;
}

.conflicts-list {
    max-height: 400px;
    overflow-y: auto;
    padding-right: 4px;
}

.conflicts-list::-webkit-scrollbar {
    width: 4px;
}

.conflicts-list::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 2px;
}

.conflicts-list::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 2px;
}

.conflicts-list::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* Purple-themed File Conflict Modal */
#fileConflictModal .modal-content {
    border: 2px solid #6f42c1;
    box-shadow: 0 10px 30px rgba(111, 66, 193, 0.3);
}

#fileConflictModal .modal-header {
    background: linear-gradient(135deg, #6f42c1 0%, #5a359a 100%);
    border-bottom: 2px solid rgba(111, 66, 193, 0.2);
}

#fileConflictModal .modal-title {
    color: white;
    font-weight: 600;
}

#fileConflictModal .btn-close {
    filter: brightness(0) invert(1);
}

#fileConflictModal .alert-warning {
    background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%);
    border: 1px solid #f1c40f;
    border-radius: 8px;
}

#fileConflictModal .conflict-item {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: 2px solid rgba(111, 66, 193, 0.2) !important;
    border-radius: 12px;
    transition: all 0.3s ease;
}

#fileConflictModal .conflict-item:hover {
    border-color: rgba(111, 66, 193, 0.4) !important;
    box-shadow: 0 4px 15px rgba(111, 66, 193, 0.2);
    transform: translateY(-2px);
}

#fileConflictModal .conflict-year-header {
    background: linear-gradient(135deg, #6f42c1 0%, #5a359a 100%);
    color: white;
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 16px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

#fileConflictModal .conflict-year-badge {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.85rem;
}

#fileConflictModal .month-conflict {
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 12px;
    transition: all 0.2s ease;
}

#fileConflictModal .month-conflict:hover {
    border-color: #6f42c1;
    box-shadow: 0 2px 8px rgba(111, 66, 193, 0.1);
}

#fileConflictModal .month-conflict h6 {
    color: #6f42c1;
    font-weight: 600;
    margin-bottom: 12px;
    border-bottom: 1px solid rgba(111, 66, 193, 0.2);
    padding-bottom: 8px;
}

#fileConflictModal .file-option .form-check-input:checked {
    background-color: #6f42c1;
    border-color: #6f42c1;
}

#fileConflictModal .file-option .form-check-input:focus {
    border-color: #6f42c1;
    outline: 0;
    box-shadow: 0 0 0 0.25rem rgba(111, 66, 193, 0.25);
}

#fileConflictModal .existing-file .form-check-input:checked {
    background-color: #28a745;
    border-color: #28a745;
}

#fileConflictModal .existing-file .form-check-input:focus {
    box-shadow: 0 0 0 0.25rem rgba(40, 167, 69, 0.25);
}

#fileConflictModal .new-file .form-check-input:checked {
    background-color: #007bff;
    border-color: #007bff;
}

#fileConflictModal .new-file .form-check-input:focus {
    box-shadow: 0 0 0 0.25rem rgba(0, 123, 255, 0.25);
}

#fileConflictModal .btn-primary {
    background: linear-gradient(135deg, #6f42c1 0%, #5a359a 100%);
    border: none;
    font-weight: 600;
    padding: 10px 20px;
    transition: all 0.3s ease;
}

#fileConflictModal .btn-primary:hover {
    background: linear-gradient(135deg, #5a359a 0%, #4c2a85 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(111, 66, 193, 0.3);
}

#fileConflictModal .btn-secondary {
    border: 2px solid #6c757d;
    font-weight: 600;
    padding: 8px 18px;
    transition: all 0.3s ease;
}

#fileConflictModal .btn-secondary:hover {
    background-color: #6c757d;
    border-color: #6c757d;
    transform: translateY(-1px);
}

/* Responsive adjustments for conflict modal */
@media (max-width: 768px) {
    #fileConflictModal .conflict-item .row {
        flex-direction: column;
    }
    
    #fileConflictModal .conflict-item .col-md-6 {
        margin-bottom: 16px;
    }
    
    #fileConflictModal .conflict-item .col-md-6:last-child {
        margin-bottom: 0;
    }

    #fileConflictModal .conflict-year-header {
        flex-direction: column;
        text-align: center;
        gap: 8px;
    }
}

/* Styles for Yearly Comparison Chart Seasonal X-Axis Legend */
.seasonal-legend-bar {
    display: flex; /* Arrange season segments in a row */
    width: 100%;   /* Match the width of the chart container if possible */
    margin-top: 0px; /* Adjust as needed for spacing from the chart */
    height: 35px;  /* Height of the seasonal bar - sync with JS afterFit */
    box-sizing: border-box;
    border-radius: 4px; /* Optional: if you want rounded corners for the whole bar */
    overflow: hidden; /* Ensures segments with background colors stay within rounded corners */
}

.season-segment {
    flex-grow: 1; /* Each season segment takes equal width */
    flex-basis: 0;
    display: flex;
    align-items: center; /* Vertically center month names */
    justify-content: space-around; /* Distribute month names within the segment */
    color: white;      /* Month names will be white */
    font-size: 0.7rem; /* Adjust font size for month names */
    font-weight: 500;   /* Slightly bolder month names */
    padding: 0 2px;    /* Minimal padding within each segment */
    text-align: center;
    box-sizing: border-box;
    /* No right border by default, background colors will touch */
}

/* If you want a very thin white line between segments (optional) */
/*
.season-segment + .season-segment {
    border-left: 1px solid rgba(255, 255, 255, 0.5);
}
*/

/* Specific seasonal colors are applied via JavaScript inline style (backgroundColor) */
/* Example classes if you preferred CSS-only for colors:
.season-segment.winter { background-color: #17a2b8; }
.season-segment.spring { background-color: #28a745; }
.season-segment.summer { background-color: #ffc107; }
.season-segment.autumn { background-color: #007bff; }
*/

/* Custom Close Button for Yearly Comparison Chart */
.btn-circle-close {
    width: 32px;
    height: 32px;
    padding: 0;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    overflow: hidden; /* Prevent text from title/attrs from showing if icon fails */
    position: relative; /* For icon positioning if needed */
}

.btn-circle-close .fas.fa-times {
    font-size: 1rem;
    line-height: 1;
    /* Ensure icon is visible */
    position: absolute; /* Position it within the button */
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

/* Custom Screenshot Button (similar to close button) */
.btn-circle-screenshot {
    width: 32px;
    height: 32px;
    padding: 0;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    overflow: hidden; /* Prevent text from title/attrs from showing if icon fails */
    position: relative; /* For icon positioning */
}

.btn-circle-screenshot .fas.fa-camera {
    font-size: 0.9rem;
    line-height: 1;
    /* Ensure icon is visible */
    position: absolute; /* Position it within the button */
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

/* Bootstrap handles the outline button hover/focus states automatically */

/* Energy Provider Modal specific styles moved to energy_provider_modal.css */
