/* CommunityScale Chart Styles */
@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;500&display=swap');

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    font-family: 'Roboto', sans-serif;
    background: white;
}

/* Chart container */
.cs-chart {
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 0;
}

/* Chart header */
.cs-chart-header {
    margin-bottom: 8px;
}

.cs-chart-title {
    font-size: 18px;
    font-weight: 500;
    color: #000000;
    margin: 0 0 4px 0;
    line-height: 1.3;
}

.cs-chart-subtitle {
    font-size: 14px;
    font-weight: 400;
    color: #888;
    margin: 0;
    line-height: 1.4;
}

/* Chart body (SVG container) */
#chart-body {
    width: 100%;
    min-height: 200px;
}

#chart-body svg {
    width: 100%;
    height: auto;
    display: block;
}

/* Chart footer */
.cs-chart-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 6px;
    padding-top: 0;
}

.cs-chart-actions {
    display: flex;
    gap: 4px;
    align-items: center;
    font-size: 12px;
}

.cs-chart-actions a {
    color: #333;
    text-decoration: none;
    cursor: pointer;
}

.cs-chart-actions a:hover {
    text-decoration: underline;
}

.cs-chart-actions .separator {
    color: #333;
    margin: 0 2px;
}

.cs-chart-brand {
    font-family: 'Roboto', sans-serif;
    font-size: 12px;
    font-weight: 700;
    color: #1a365d;
    text-decoration: none;
}

.cs-chart-brand:hover {
    text-decoration: underline;
}

/* Tooltip */
#tooltip {
    position: fixed;
    display: none;
    background: rgba(255, 255, 255, 0.85);
    color: #000000;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 12px;
    line-height: 1.5;
    pointer-events: none;
    z-index: 1000;
    max-width: 250px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

#tooltip strong {
    display: block;
    margin-bottom: 4px;
    font-weight: 500;
}

/* Error state */
.cs-error {
    padding: 40px 20px;
    text-align: center;
    color: #666;
    font-size: 14px;
}

/* Embed popup */
.cs-embed-popup {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.cs-embed-popup.visible {
    display: flex;
}

.cs-embed-popup-content {
    background: white;
    border-radius: 8px;
    padding: 20px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.cs-embed-popup-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.cs-embed-popup-title {
    font-size: 16px;
    font-weight: 500;
    color: #000000;
    margin: 0;
}

.cs-embed-popup-close {
    background: none;
    border: none;
    font-size: 24px;
    color: #999;
    cursor: pointer;
    padding: 0;
    line-height: 1;
}

.cs-embed-popup-close:hover {
    color: #333;
}

.cs-embed-code-wrapper {
    display: flex;
    gap: 8px;
}

.cs-embed-code {
    flex: 1;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: monospace;
    font-size: 12px;
    resize: none;
    height: 80px;
}

.cs-embed-copy {
    background: #1a365d;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 12px 16px;
    font-size: 16px;
    cursor: pointer;
    transition: background 0.2s ease;
}

.cs-embed-copy:hover {
    background: #2d4a7c;
}

.cs-embed-copy.copied {
    background: #2e7d32;
}

/* Noscript fallback */
.cs-noscript {
    padding: 40px 20px;
    text-align: center;
    color: #666;
    font-size: 14px;
    background: #f5f5f5;
    border-radius: 4px;
}
