/**
 * Collection Analytics Dashboard Styles
 * V21 Navy/Gold Design
 * 
 * NOTE: CSS variables defined in css/variables.css
 */

/* ========================================
   ANALYTICS DASHBOARD
   ======================================== */

.analytics-dashboard {
    padding: 0;
}

.analytics-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

/* ========================================
   ANALYTICS CARDS
   ======================================== */

.analytics-card {
    background: linear-gradient(135deg, var(--navy), var(--dark-navy));
    border: 1px solid var(--gold);
    border-radius: 12px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    transition: all 0.3s ease;
}

.analytics-card:hover {
    border-color: var(--bright-gold);
    box-shadow: 0 4px 12px rgba(244, 196, 48, 0.2);
}

.analytics-card-wide {
    grid-column: span 2;
}

.analytics-card-title {
    font-size: 1.1em;
    font-weight: 600;
    color: var(--bright-gold);
    margin: 0 0 20px 0;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(212, 165, 116, 0.2);
}

/* ========================================
   CHART CONTAINERS
   ======================================== */

.chart-container {
    position: relative;
    flex: 1;
    min-height: 280px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.chart-container canvas {
    max-height: 100%;
}

/* ========================================
   INSIGHTS GRID
   ======================================== */

.insights-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.insight-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px;
    background: rgba(212, 165, 116, 0.05);
    border: 1px solid rgba(212, 165, 116, 0.2);
    border-radius: 8px;
    transition: all 0.3s ease;
}

.insight-item:hover {
    background: rgba(212, 165, 116, 0.1);
    border-color: var(--gold);
    transform: translateY(-2px);
}

.insight-icon {
    font-size: 32px;
    line-height: 1;
    flex-shrink: 0;
}

.insight-content {
    flex: 1;
    min-width: 0;
}

.insight-label {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--gold);
    margin-bottom: 6px;
}

.insight-value {
    font-size: 16px;
    font-weight: 600;
    color: var(--cream);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ========================================
   EMPTY STATE
   ======================================== */

.analytics-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 400px;
    padding: 40px 20px;
    text-align: center;
}

.analytics-empty-icon {
    font-size: 80px;
    margin-bottom: 24px;
    opacity: 0.5;
}

.analytics-empty-title {
    font-size: 1.75em;
    font-weight: 700;
    color: var(--bright-gold);
    margin: 0 0 12px 0;
}

.analytics-empty-text {
    font-size: 16px;
    color: var(--cream);
    opacity: 0.8;
    margin: 0 0 32px 0;
    max-width: 500px;
}

.analytics-empty-btn {
    padding: 14px 32px;
    background: var(--gold);
    border: none;
    border-radius: 8px;
    color: var(--dark-navy);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.analytics-empty-btn:hover {
    background: var(--bright-gold);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(244, 196, 48, 0.4);
}

/* ========================================
   ERROR STATE
   ======================================== */

.analytics-error {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 400px;
    padding: 40px 20px;
    text-align: center;
}

.analytics-error-icon {
    font-size: 80px;
    margin-bottom: 24px;
}

.analytics-error-title {
    font-size: 1.5em;
    font-weight: 600;
    color: #ef4444;
    margin: 0 0 12px 0;
}

.analytics-error-text {
    font-size: 14px;
    color: var(--cream);
    opacity: 0.8;
    margin: 0;
}

/* ========================================
   RESPONSIVE DESIGN
   ======================================== */

@media (max-width: 1200px) {
    .analytics-grid {
        grid-template-columns: 1fr;
    }

    .analytics-card-wide {
        grid-column: span 1;
    }
}

@media (max-width: 768px) {
    .analytics-dashboard {
        padding: 0;
    }

    .analytics-grid {
        gap: 16px;
    }

    .analytics-card {
        padding: 16px;
    }

    .analytics-card-title {
        font-size: 1em;
        margin-bottom: 16px;
    }

    .chart-container {
        min-height: 240px;
    }

    .insights-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .insight-item {
        padding: 16px;
    }

    .insight-icon {
        font-size: 24px;
    }

    .insight-value {
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .analytics-card {
        padding: 12px;
    }

    .chart-container {
        min-height: 200px;
    }

    .analytics-empty-icon {
        font-size: 60px;
    }

    .analytics-empty-title {
        font-size: 1.5em;
    }

    .analytics-empty-text {
        font-size: 14px;
    }
}

/* ========================================
   CHART.JS OVERRIDES
   ======================================== */

/* Ensure charts are visible on dark background */
canvas {
    background: transparent !important;
}

/* Custom tooltip styles (if needed) */
.chartjs-tooltip {
    background: rgba(15, 30, 46, 0.95) !important;
    border: 1px solid var(--gold) !important;
    border-radius: 8px !important;
    color: var(--cream) !important;
    padding: 12px !important;
    font-family: 'Inter', system-ui, sans-serif !important;
}
