/* Common styles for all embeddable visualizations */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
    background: white;
    color: #333;
    line-height: 1.5;
    overflow: hidden;
}

.embed-container {
    width: 100%;
    height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
}

.embed-header {
    display: none;  /* Headers hidden by default for cleaner embeds */
}

.embed-title {
    font-size: 16px;
    font-weight: 500;
    margin: 0;
}

.embed-subtitle {
    font-size: 12px;
    opacity: 0.9;
    margin: 0;
}

.embed-controls {
    display: flex;
    gap: 8px;
    align-items: center;
}

.embed-control {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    padding: 4px 8px;
    border-radius: 3px;
    font-size: 12px;
    cursor: pointer;
    transition: background 0.2s;
}

.embed-control:hover {
    background: rgba(255, 255, 255, 0.2);
}

.embed-control select {
    background: transparent;
    border: none;
    color: white;
    font-size: 12px;
    cursor: pointer;
    padding: 2px;
}

.embed-control select option {
    background: #1e3a5f;
    color: white;
}

.chart-container {
    flex: 1;
    width: 100%;
    position: relative;
    min-height: 300px;
}

.loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    font-size: 14px;
    color: #666;
}

.loading-spinner {
    width: 30px;
    height: 30px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #1e3a5f;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 10px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.error-message {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: #dc3545;
    padding: 20px;
    max-width: 80%;
}

.error-message h3 {
    margin-bottom: 10px;
    font-size: 16px;
}

.error-message p {
    font-size: 14px;
    color: #666;
}

.embed-footer {
    padding: 8px 15px;
    background: #f8f9fa;
    border-top: 1px solid #dee2e6;
    font-size: 11px;
    color: #6c757d;
    text-align: center;
    flex-shrink: 0;
}

.embed-footer a {
    color: #1e3a5f;
    text-decoration: none;
}

.embed-footer a:hover {
    text-decoration: underline;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    /* Reduce chart container min-height on mobile */
    .chart-container {
        min-height: 250px;
    }
    
    /* Adjust chart padding for mobile */
    .chart-wrapper {
        padding: 5px;
    }
}

@media (max-width: 480px) {
    /* Further reduce chart container min-height */
    .chart-container {
        min-height: 200px;
    }
}

/* Hide header/footer in minimal mode or when embedded */
/* Hide footers in minimal mode */
body.minimal .embed-footer,
.embedded .embed-footer {
    display: none;
}

/* Chart containers take full height since headers are hidden */
.chart-container {
    height: 100vh;
}

/* Calendar no longer needs special header handling since controls moved inline */

/* Headers are hidden by default - no need for media queries */

/* Chart-specific adjustments */
.chart-wrapper {
    width: 100%;
    height: 100%;
    padding: 10px;
}

/* Privacy Rights color palette */
:root {
    --pr-navy: #1e3a5f;
    --pr-blue: #2c5282;
    --pr-light-blue: #5a9fd4;
    --pr-red: #e74c3c;
    --pr-orange: #f39c12;
    --pr-purple: #9b59b6;
    --pr-teal: #1abc9c;
    --pr-gray: #95a5a6;
    --pr-dark-gray: #34495e;
}