/**
 * XSP Charts - Custom Styles
 * Matches wpDataTables chart styling
 */

/* Chart container - matches their structure */
.xsp-chart-wrapper {
    margin: 0;
    width: 100%;
}

.xsp-chart-container {
    position: relative;
    width: 100%;
    height: 400px;
}

.xsp-chart-container canvas {
    display: block;
    box-sizing: border-box;
    border: 0;
    border-radius: 0;
}

/* Chart title */
.xsp-chart-title {
    margin-bottom: 15px;
    font-size: 18px;
    font-weight: 600;
    color: #333;
}

/* Error state */
.xsp-chart-error {
    color: #dc2626;
    padding: 15px;
    background-color: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 4px;
    margin: 10px 0;
    text-align: center;
}

/* Loading state */
.xsp-chart-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #666;
    font-size: 14px;
}

.xsp-chart-loading::after {
    content: '';
    width: 20px;
    height: 20px;
    margin-left: 10px;
    border: 2px solid #e0e0e0;
    border-top-color: #00254A;
    border-radius: 50%;
    animation: xsp-chart-spin 1s linear infinite;
}

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

/* Responsive adjustments */
@media screen and (max-width: 768px) {
    .xsp-chart-container {
        height: 300px;
    }
}

@media screen and (max-width: 480px) {
    .xsp-chart-container {
        height: 250px;
    }
}

/* Legend Table Styles */
.xsp-legend-table-wrapper {
    margin-top: 20px;
}

/* Chart legend circle - colored dot before label */
.chart-legend-circle {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin-right: 8px;
    vertical-align: middle;
}
