/**
 * SAC Plotly Embeds Styles
 *
 * @package SAC_Plotly_Embeds
 */

/* Chart wrapper */
.sac-plotly-chart-wrapper {
    margin: 0;
    clear: both;
}

/* Chart container */
.sac-plotly-chart {
    width: 100%;
}

/* Error display */
.sac-plotly-error {
    padding: 15px;
    margin: 1rem 0;
    background: #fee;
    border: 1px solid #c33;
    border-radius: 4px;
    color: #c33;
}

.sac-plotly-error strong {
    display: block;
    margin-bottom: 0.5rem;
}

/* Loading state */
.sac-plotly-chart.loading {
    background: #f0f0f1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sac-plotly-chart.loading::after {
    content: 'Loading chart...';
    color: #666;
    font-size: 14px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .sac-plotly-chart-wrapper {
        margin: 1rem 0;
    }
}

/* Ensure charts don't overflow their containers */
.sac-plotly-chart svg {
    max-width: 100%;
    height: auto;
}

/* Caption styling */
.sac-plotly-caption {
    margin-top: 10px;
    padding: 8px 0;
    font-size: 14px;
    line-height: 1.6;
    color: #666;
}

.sac-plotly-caption-title {
    display: inline;
    font-weight: bold;
    color: #333;
}

.sac-plotly-caption-title::after {
    content: ' ';
}

.sac-plotly-caption-content {
    display: inline;
}
