/**
 * Grading Graph Styles
 * Styles for animated bar chart with smooth curve line
 */

.grading-graph-container {
    width: 100%;
    margin: 20px auto;
    padding: 20px;
    background: #1a1a1a;
    color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.grading-graph-title {
    text-align: center;
    margin: 0 0 10px 0;
    font-size: 24px;
    font-weight: 600;
    color: #fff;
}

.grading-graph-disclaimer {
    text-align: center;
    margin: 0 0 20px 0;
    font-size: 14px;
    color: #ccc;
    font-style: italic;
}

.grading-graph-wrapper {
    position: relative;
    width: 100%;
}

/* Canvas */
#grading-graph-canvas {
    width: 100% !important;
    height: 400px !important;
    max-height: 400px !important;
    min-height: 400px !important;
    border: 1px solid #444;
    border-radius: 4px;
    background: #2a2a2a;
    display: block !important;
    margin: 0 auto;
    max-width: 100%;
    box-sizing: border-box;
    object-fit: contain;
}

/* Loading State */
.grading-graph-loading {
    text-align: center;
    padding: 60px 20px;
    color: #666;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #007cba;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

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

/* Error State */
.grading-graph-error {
    text-align: center;
    padding: 40px 20px;
    color: #d63638;
}

.retry-button {
    background: #007cba;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    margin-top: 10px;
    transition: background-color 0.3s ease;
}

.retry-button:hover {
    background: #005a87;
}

/* Controls removed - using max smoothness by default */

/* Animate button styles removed - no longer needed */

/* Tooltip */
.grading-graph-tooltip {
    position: absolute;
    background: rgba(0, 0, 0, 0.9);
    color: #fff;
    padding: 12px 16px;
    border-radius: 6px;
    font-size: 14px;
    line-height: 1.4;
    pointer-events: none;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    border: 1px solid #555;
    max-width: 200px;
}

.tooltip-content {
    text-align: left;
}

.tooltip-grade {
    font-weight: 600;
    color: #ffdb03;
    margin-bottom: 4px;
    font-size: 15px;
}

.tooltip-count {
    color: #fff;
    margin-bottom: 2px;
}

.tooltip-percentage {
    color: #ccc;
    font-size: 13px;
}

/* Legend */
.grading-graph-legend {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-top: 15px;
    padding: 15px;
    background: #2a2a2a;
    border-radius: 6px;
    border: 1px solid #444;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #ccc;
}

.legend-color {
    width: 20px;
    height: 4px;
    border-radius: 2px;
}

.legend-color.bar-color {
    background: #c0c0c0;
}

.legend-color.line-color {
    background: #ffdb03;
    height: 3px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .grading-graph-container {
        padding: 15px;
        margin: 15px auto;
    }
    
    .grading-graph-title {
        font-size: 20px;
        margin-bottom: 15px;
    }
    
    #grading-graph-canvas {
        height: 350px !important;
        max-height: 350px !important;
        min-height: 350px !important;
        width: 100% !important;
        max-width: 100% !important;
    }

    .grading-graph-legend {
        flex-direction: column;
        gap: 10px;
        align-items: center;
    }
}

@media (max-width: 480px) {
    .grading-graph-container {
        padding: 10px;
        margin: 10px auto;
    }
    
    .grading-graph-title {
        font-size: 18px;
    }
    
    #grading-graph-canvas {
        height: 300px !important;
        max-height: 300px !important;
        min-height: 300px !important;
        width: 100% !important;
        max-width: 100% !important;
    }
    
    /* Control group styles removed */
}

/* Dark mode is now default - no media query needed */
