.customer-sales-chart-card {
    --sales-current-color: var(--bs-primary);
    --sales-previous-color: var(--bs-secondary);
}

.customer-sales-chart-legend {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem 1rem;
    font-size: 0.875rem;
    color: var(--bs-secondary-color);
}

.customer-sales-chart-legend span {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.legend-swatch {
    flex: 0 0 auto;
    width: 0.9rem;
    height: 0.9rem;
    border-radius: 0.15rem;
}

.legend-swatch.current-year {
    background: var(--sales-current-color);
}

.legend-swatch.previous-year {
    background: var(--sales-previous-color);
}

.legend-line {
    flex: 0 0 auto;
    width: 1.4rem;
    border-top: 2px solid var(--bs-chartline-color);
}

.customer-sales-chart-scroll {
    width: 100%;
    max-width: 100%;
    overflow: hidden;
}

.customer-sales-chart {
    display: block;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    height: auto;
    font-family: inherit;
}

.chart-grid-line {
    stroke: var(--bs-border-color);
    stroke-width: 1;
    stroke-dasharray: 4 5;
}

.chart-zero-line {
    stroke: var(--bs-chartzero-color);
    stroke-width: 1.5px;
}

.chart-bar-current {
    fill: var(--sales-current-color);
    opacity: 0.82;
}

.chart-bar-previous {
    fill: var(--sales-previous-color);
    opacity: 0.82;
}

.chart-trend-line {
    fill: none;
    stroke: var(--bs-chartline-color);
    stroke-width: 1.5px;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.chart-trend-point {
    fill: var(--bs-chartline-color);
}

.chart-value-label,
.chart-month-label,
.chart-axis-label,
.chart-axis-caption {
    fill: var(--bs-body-color);
}

.chart-value-label {
    font-size: 10px;
    font-weight: 600;
}

.chart-month-label,
.chart-axis-label {
    font-size: 11px;
}

.chart-axis-caption {
    font-size: 11px;
    font-weight: 600;
    fill: var(--bs-secondary-color);
}

@media (max-width: 767.98px) {
    .customer-sales-chart-card .card-header {
        align-items: flex-start !important;
    }

    .customer-sales-chart-card .card-body {
        padding: 0.75rem 0.5rem 1rem;
    }

    .customer-sales-chart-legend {
        width: 100%;
        gap: 0.4rem 0.75rem;
        font-size: 0.78rem;
    }

    .customer-sales-chart {
        width: 100%;
        min-width: 0;
    }

    .chart-month-label,
    .chart-axis-label {
        font-size: 14px;
        font-weight: 500;
    }

    .chart-axis-caption {
        font-size: 13px;
    }

    .chart-value-label {
        font-size: 13px;
    }

    .chart-trend-line {
        stroke-width: 3;
    }

    .chart-trend-point {
        r: 4px;
    }
}

@media (max-width: 420px) {
    .customer-sales-chart-card .card-header {
        padding: 0.8rem;
    }

    .customer-sales-chart-card .card-header .small {
        font-size: 0.78rem;
        line-height: 1.3;
    }

    .customer-sales-chart-legend {
        font-size: 0.72rem;
        gap: 0.35rem 0.6rem;
    }

    .legend-swatch {
        width: 0.72rem;
        height: 0.72rem;
    }

    .legend-line {
        width: 1rem;
    }

    .chart-month-label,
    .chart-axis-label {
        font-size: 15px;
    }

    .chart-axis-caption,
    .chart-value-label {
        font-size: 14px;
    }
}
