﻿/**
 * safe-historical-chart.css
 * Reusable light-theme styles for the SafeHistoricalChart component.
 */

.safe-chart__hidden {
    display: none !important;
}

.safe-chart--boxed {
    border: 1px solid #e4e4e4;
    border-radius: 4px;
    padding: 8px 10px 6px 10px;
    background: #fff;
}

.safe-chart--borderless,
.safe-chart--borderless .safe-chart__canvas {
    border: 0 !important;
    outline: 0 !important;
    box-shadow: none !important;
    background: transparent;
}

.safe-chart {
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    padding: 12px 14px 10px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
    font-family: 'Segoe UI', Arial, sans-serif;
    box-sizing: border-box;
}

.safe-chart__header {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 12px;
    margin-bottom: 6px;
}

.safe-chart__title {
    font-size: 15px;
    font-weight: 700;
    color: #2a5d87;
    white-space: nowrap;
}

.safe-chart__date {
    font-size: 11px;
    color: #9aa3ad;
    font-weight: 400;
    letter-spacing: 0.1px;
    white-space: nowrap;
}

.safe-chart__tabs {
    display: flex;
    justify-content: flex-start;
    gap: 6px;
    flex-wrap: wrap;
}

    .safe-chart__tabs button {
        border: 1px solid #d5d9df;
        background: #f7f8fa;
        color: #4f5d6b;
        padding: 4px 10px;
        font-size: 12px;
        line-height: 1.2;
    }

       

        .safe-chart__tabs button:hover {
            background: #e3eaf7;
            border-color: #1565c0;
            color: #1565c0;
        }

        .safe-chart__tabs button.active {
            background: #2f67c7;
            border-color: #2f67c7;
            color: #fff;
        }

.safe-chart__canvas {
    width: 100%;
    height: 380px;
    min-height: 200px;
    position: relative;
}

.safe-chart__legend {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 18px;
    margin-top: 8px;
    padding-top: 6px;
    border-top: 1px solid #ebebeb;
}

.safe-chart__legend-item {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 11px;
    color: #555555;
    white-space: nowrap;
}

.safe-chart__legend-swatch {
    display: inline-block;
    width: 14px;
    height: 12px;
    border-radius: 2px;
    flex-shrink: 0;
}

.safe-chart__legend-swatch--hvz {
    background: rgba(38, 166, 154, 0.45);
    border: 1px solid rgba(38, 166, 154, 0.7);
}

.safe-chart__legend-swatch--lvz {
    background: rgba(239, 83, 80, 0.35);
    border: 1px solid rgba(239, 83, 80, 0.6);
}

.safe-chart__legend-swatch--vsp {
    background: rgba(75, 0, 130, 0.85);
    border: 1px solid rgba(75, 0, 130, 1.0);
}

.safe-chart__error {
    padding: 12px;
    color: #c62828;
    background: #fff3f3;
    border: 1px solid #ffcdd2;
    border-radius: 3px;
    font-size: 13px;
    margin-top: 8px;
}

.safe-chart__error-detail {
    margin-top: 6px;
    font-size: 11px;
    color: #8b8b8b;
    word-break: break-word;
}

@media (max-width: 600px) {
    .safe-chart__canvas {
        height: 260px;
    }

    .safe-chart__title {
        font-size: 16px;
    }

    .safe-chart__tabs button {
        padding: 4px 10px;
        font-size: 11px;
    }
}
