/* Energy Prices Dashboard - Custom Styles */

:root {
    --primary-color: #0d6efd;
    --success-color: #198754;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
    --light-bg: #f8f9fa;
    --card-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
}

/* General */
body {
    background-color: var(--light-bg);
    min-height: 100vh;
}

/* Navbar */
.navbar-brand {
    font-weight: 600;
}

/* Stats Cards */
.stat-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.stat-card .stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    line-height: 1.2;
}

.stat-card .stat-label {
    font-size: 0.875rem;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-card .stat-icon {
    font-size: 2.5rem;
    opacity: 0.3;
}

/* Filter Section */
.filter-section {
    background: white;
    border-radius: 0.5rem;
    box-shadow: var(--card-shadow);
}

/* Charts */
.chart-container {
    position: relative;
    height: 350px;
    width: 100%;
}

@media (max-width: 768px) {
    .chart-container {
        height: 280px;
    }
}

/* Provider Badges */
.provider-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.35rem 0.65rem;
    border-radius: 0.375rem;
    font-size: 0.8125rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s ease;
    border: 1px solid transparent;
}

.provider-badge:hover {
    opacity: 0.85;
}

.provider-badge.active {
    box-shadow: 0 0 0 2px rgba(13, 110, 253, 0.5);
}

/* Data Table */
.table-responsive {
    max-height: 400px;
    overflow-y: auto;
}

.data-table th {
    position: sticky;
    top: 0;
    background: white;
    z-index: 10;
    border-bottom: 2px solid #dee2e6;
}

.data-table tbody tr:hover {
    background-color: rgba(13, 110, 253, 0.05);
}

/* Loading States */
.loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    border-radius: inherit;
}

.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
    border-radius: 0.25rem;
}

@keyframes skeleton-loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Provider Select */
.provider-select-container {
    max-height: 200px;
    overflow-y: auto;
    border: 1px solid #dee2e6;
    border-radius: 0.375rem;
    padding: 0.5rem;
}

.provider-select-item {
    display: flex;
    align-items: center;
    padding: 0.375rem 0.5rem;
    border-radius: 0.25rem;
    cursor: pointer;
    transition: background-color 0.15s ease;
}

.provider-select-item:hover {
    background-color: var(--light-bg);
}

.provider-select-item input {
    margin-right: 0.5rem;
}

/* Price indicators */
.price-positive {
    color: var(--danger-color);
}

.price-negative {
    color: var(--success-color);
}

.price-neutral {
    color: #6c757d;
}

/* Flatpickr customization */
.flatpickr-input {
    background-color: white !important;
}

/* Mobile optimizations */
@media (max-width: 576px) {
    .stat-card .stat-value {
        font-size: 1.5rem;
    }

    .stat-card .stat-icon {
        font-size: 2rem;
    }

    .filter-section .row > div {
        margin-bottom: 0.75rem;
    }

    .btn-group-mobile {
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
    }

    .btn-group-mobile .btn {
        width: 100%;
    }
}

/* Toast notifications */
.toast-container {
    z-index: 1100;
}

/* Export dropdown */
.export-dropdown .dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Empty state */
.empty-state {
    padding: 3rem;
    text-align: center;
    color: #6c757d;
}

.empty-state i {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

/* Price color scale */
.price-low { background-color: rgba(25, 135, 84, 0.2); }
.price-medium { background-color: rgba(255, 193, 7, 0.2); }
.price-high { background-color: rgba(220, 53, 69, 0.2); }

/* Scrollbar styling */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

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

/* Print styles */
@media print {
    .no-print {
        display: none !important;
    }

    .chart-container {
        height: auto !important;
        page-break-inside: avoid;
    }
}
