/**
 * Dataprovider News Generator - Chart Styles
 */

/* Chart container */
.dpng-chart {
    position: relative;
    width: 100%;
    min-height: 300px;
    max-height: 450px;
    margin: 2rem 0;
    padding: 1.5rem;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.dpng-chart canvas {
    max-height: 350px !important;
}

/* Chart caption */
.dpng-chart-caption {
    margin-top: 1rem;
    padding-top: 0.75rem;
    border-top: 1px solid #e5e7eb;
    font-size: 0.875rem;
    color: #6b7280;
    text-align: center;
    font-style: italic;
}

/* Error state */
.dpng-chart-error {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 200px;
    color: #9ca3af;
    font-size: 0.875rem;
}

/* Loading state */
.dpng-chart-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 200px;
}

.dpng-chart-loading::after {
    content: '';
    width: 32px;
    height: 32px;
    border: 3px solid #e5e7eb;
    border-top-color: #0066cc;
    border-radius: 50%;
    animation: dpng-spin 0.8s linear infinite;
}

@keyframes dpng-spin {
    to {
        transform: rotate(360deg);
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .dpng-chart {
        background: #1f2937;
        border-color: #374151;
    }

    .dpng-chart-caption {
        color: #9ca3af;
        border-top-color: #374151;
    }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .dpng-chart {
        padding: 1rem;
        min-height: 250px;
    }

    .dpng-chart canvas {
        max-height: 280px !important;
    }
}

/* Print styles */
@media print {
    .dpng-chart {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ccc;
    }
}

/* Executive Summary Box */
.executive-summary {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 1.75rem;
    margin-bottom: 2rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04), 0 1px 2px rgba(0, 0, 0, 0.06);
}

.executive-summary h3 {
    color: #2563eb;
    font-size: 0.75rem;
    font-weight: 700;
    margin: 0 0 1.25rem 0;
    padding: 0;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.executive-summary h3::before {
    content: "";
    display: inline-block;
    width: 4px;
    height: 1rem;
    background: linear-gradient(135deg, #2563eb 0%, #3b82f6 100%);
    border-radius: 2px;
}

.executive-summary ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 1rem;
}

.executive-summary li {
    padding: 0;
    border-bottom: none;
    font-size: 0.9375rem;
    line-height: 1.6;
    color: #334155;
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0.75rem;
    align-items: baseline;
}

.executive-summary li:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.executive-summary li strong {
    color: #0f172a;
    font-weight: 600;
    font-size: 0.8125rem;
    text-transform: uppercase;
    letter-spacing: 0.025em;
    background: #f1f5f9;
    padding: 0.25rem 0.625rem;
    border-radius: 4px;
    white-space: nowrap;
}

/* Dark mode support for executive summary */
@media (prefers-color-scheme: dark) {
    .executive-summary {
        background: #1e293b;
        border-color: #334155;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
    }

    .executive-summary h3 {
        color: #60a5fa;
    }

    .executive-summary li {
        color: #cbd5e1;
    }

    .executive-summary li strong {
        color: #f1f5f9;
        background: #334155;
    }
}

/* Print styles for executive summary */
@media print {
    .executive-summary {
        background: #f8fafc;
        border: 1px solid #94a3b8;
        box-shadow: none;
        break-inside: avoid;
    }

    .executive-summary h3::before {
        background: #1e40af;
    }
}
