/* keyBSTrends.css - Professional Financial SaaS Version */

/* ===== MAIN CONTAINER ===== */
.key-bs-trends-container {
    padding: 1.5rem;
    background: #FFFFFF;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border: 1px solid #e5e7eb;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
}

/* ===== TREND METRICS SECTION ===== */
.key-bs-trend-metrics {
    margin-bottom: 1.5rem;
}

/* ===== CHARTS AREA ===== */
.key-bs-charts-area {
    margin-top: 1.5rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(420px, 1fr));
    gap: 1.5rem;
}

/* ===== CHART WRAPPER ===== */
.key-bs-chart-wrapper {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    padding: 1.5rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    min-height: 500px;
    transition: box-shadow 0.2s ease;

    max-width: 1200px; /* Maximum width for readability */
    margin: 0 auto; /* Center the content */}

.key-bs-chart-wrapper:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

/* ===== CHART TITLE ===== */
.key-bs-chart-title {
    text-align: center;
    font-size: 1.0625rem;
    font-weight: 600;
    color: #1f2937;
    margin: 0 0 1rem 0;
    flex-shrink: 0;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid #e5e7eb;
}

/* ===== CHART CANVAS ===== */
.key-bs-chart-wrapper canvas {
    flex-grow: 1;
    min-height: 0;
    max-height: 450px;
}

/* ===== MESSAGE NOTE ===== */
.chart-message-note {
    width: 100%;
    text-align: center;
    font-style: italic;
    color: #6b7280;
    background-color: #f9fafb;
    padding: 0.75rem;
    border-radius: 6px;
    margin-bottom: 1rem;
    font-size: 0.875rem;
    border: 1px solid #e5e7eb;
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 1024px) {
    .key-bs-charts-area {
        grid-template-columns: 1fr;
    }

    .key-bs-chart-wrapper {
        min-height: 450px;
    }
}

@media (max-width: 768px) {
    .key-bs-trends-container {
        padding: 1.25rem;
    }

    .key-bs-charts-area {
        gap: 1.25rem;
        margin-top: 1.25rem;
    }

    .key-bs-chart-wrapper {
        padding: 1.25rem;
        min-height: 400px;
    }

    .key-bs-chart-wrapper canvas {
        max-height: 350px;
    }

    .key-bs-chart-title {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .key-bs-trends-container {
        padding: 1rem;
    }

    .key-bs-charts-area {
        gap: 1rem;
        margin-top: 1rem;
    }

    .key-bs-chart-wrapper {
        padding: 1rem;
        min-height: 350px;
    }

    .key-bs-chart-wrapper canvas {
        max-height: 300px;
    }

    .key-bs-chart-title {
        font-size: 0.9375rem;
        padding-bottom: 0.5rem;
    }

    .chart-message-note {
        padding: 0.625rem;
        font-size: 0.8125rem;
    }
}

/* ===== PRINT STYLES ===== */
@media print {
    .key-bs-trends-container {
        background: white;
        box-shadow: none;
        border: 1px solid #d1d5db;
        padding: 1rem;
    }

    .key-bs-charts-area {
        display: block;
    }

    .key-bs-chart-wrapper {
        page-break-inside: avoid;
        margin-bottom: 1rem;
        min-height: 350px;
        box-shadow: none;
        border: 1px solid #d1d5db;
    }

    .key-bs-chart-wrapper:hover {
        box-shadow: none;
    }

    .key-bs-chart-wrapper canvas {
        max-height: 320px;
    }

    .chart-message-note {
        page-break-inside: avoid;
        border: 1px solid #d1d5db;
    }
}

/* ===== ACCESSIBILITY ===== */
.key-bs-chart-wrapper:focus-within {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}
