/**
 * Market Statistics Graphs Styles
 */

/* Graph Section */


/* Graph Controls - Removed since graphs follow dashboard selections */

/* Graph Cards */
.market-statistics-graphs .card-shadow {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    border-radius: 0.5rem;
}

/* Chart Containers */
.market-statistics-graphs canvas {
    width: 100% !important;
    height: 100% !important;
    transition: opacity 0.3s ease;
}

/* Loading States */
.market-statistics-graphs #units-sold-loading,
.market-statistics-graphs #sales-price-loading {
    display: none;
}

.market-statistics-graphs .animate-spin {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* Legend */
.market-statistics-graphs .legend {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.market-statistics-graphs .legend-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.market-statistics-graphs .legend-color {
    width: 1rem;
    height: 1rem;
    border-radius: 50%;
}

.market-statistics-graphs .legend-color.current {
    background-color: #3A827B;
}

.market-statistics-graphs .legend-color.previous {
    background-color: #04ADB2;
}

.market-statistics-graphs .legend-text {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--color-dark, #1a1a1a);
}

/* Responsive Design */
@media (max-width: 768px) {
    .market-statistics-graphs .space-y-8 {
        width: 100vw;
        left: 50%;
        position: relative;
        transform: translateX(-50%);
        gap: 1.5rem;
    }
    
    .market-statistics-graphs canvas {
        width: 100% !important;
        height: 100% !important;
    }
    
    .market-statistics-graphs h2 {
        font-size: 2rem;
    }
    
    /* Mobile chart container heights */
    .market-statistics-graphs .chart-container {
        height: 300px; /* Mobile height */
        min-height: 300px;
    }
}

/* Chart.js Overrides */
.market-statistics-graphs .chart-container {
    position: relative;
    height: 400px; /* Desktop height */
    min-height: 400px;
    width: 100%;
}

/* Error States */
.market-statistics-graphs .error-message {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 200px;
    color: #EF4444;
    font-weight: 500;
}

/* Hover Effects */
.market-statistics-graphs .card-shadow:hover {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    transition: box-shadow 0.2s ease;
}

/* Focus States for Accessibility */
.market-statistics-graphs select:focus,
.market-statistics-graphs button:focus {
    outline: 2px solid var(--color-primary, #04ADB2);
    outline-offset: 2px;
}

/* Animation for chart updates */
.market-statistics-graphs canvas.updating {
    opacity: 0.7;
}
