/* dashboard-styles.css */

/* Allgemeine Container */
.dashboard-main-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    box-sizing: border-box;
    font-family: Arial, sans-serif;
    color: #333;
}


.dashboard-card {
    padding: 25px;
    border: 1px solid #dcdcdc;
    border-radius: 12px;
    background-color: #ffffff;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    margin-bottom: 30px; /* Oder 40px, je nach Bedarf */
}

/* Letzte 10 Prüfungen Liste */
.last-exams-list {
    list-style: none;
    padding: 0;
}

.last-exams-list li {
    padding: 8px 0;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Buttons */
.button-primary {
    display: inline-block;
    padding: 10px 20px;
    background-color: #3498db;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    font-weight: bold;
    transition: background-color 0.3s ease;
    border: none; /* Für Button-Elemente */
    cursor: pointer;
}

.button-secondary {
    display: inline-block;
    padding: 10px 15px;
    background-color: #6c757d;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    font-weight: bold;
    margin-right: 10px;
    transition: background-color 0.3s ease;
    border: none;
    cursor: pointer;
}

/* Statistik-Karten */
.stats-cards-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-around;
    gap: 20px;
}

.stat-card {
    flex: 1;
    min-width: 200px;
    padding: 20px;
    border: 1px solid #dcdcdc;
    border-radius: 12px;
    background-color: #ffffff;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    text-align: center;
}

.stat-card h3 {
    margin-top: 0;
    font-size: 1.3em;
}

.stat-card p {
    font-size: 2.5em;
    font-weight: bold;
}

/* Farben für Statistik-Karten */
.stat-card.exams-count h3, .stat-card.exams-count p { color: #3498db; }
.stat-card.average-score h3, .stat-card.average-score p { color: #27ae60; }
.stat-card.min-score h3, .stat-card.min-score p { color: #e67e22; }
.stat-card.max-score h3, .stat-card.max-score p { color: #c0392b; }

#pruefungsVerlaufChart {
    width: 100%; /* Das Diagramm füllt die Breite seines Containers aus */
    max-width: 800px; /* Optional: Eine maximale Breite, damit es auf großen Bildschirmen nicht riesig wird */
    height: 400px; /* Eine feste Höhe für das Diagramm */
    display: block; /* Wichtig für Canvas-Elemente */
}

/* Optional: Wenn du das Diagramm zentrieren möchtest */
.chart-container { /* Annahme, dass der Container des Canvas diese Klasse hat */
    display: flex;
    justify-content: center;
    margin-bottom: 20px; /* Abstand zum nächsten Element */
}

/* Akkordeon */
.accordion-item {
    margin-bottom: 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
}

.accordion-header {
    width: 100%;
    text-align: left;
    padding: 15px 20px;
    background-color: #f2f2f2;
    border: none;
    border-bottom: 1px solid #ddd;
    cursor: pointer;
    font-size: 1.2em;
    font-weight: bold;
    color: #2c3e50;
    border-radius: 8px 8px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.accordion-icon {
    font-size: 1.5em;
}

.accordion-content {
    padding: 20px;
    display: none; /* Standardmäßig versteckt */
}

/* Tabellen-Styling */
.dashboard-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}

.dashboard-table th,
.dashboard-table td {
    padding: 12px;
    border: 1px solid #ddd;
    text-align: left;
}

.dashboard-table th {
    background-color: #f8f8f8;
}

.dashboard-table tbody tr:nth-child(even) {
    background-color: #f9f9f9;
}

.dashboard-table tbody tr:nth-child(odd) {
    background-color: #fefefe;
}

/* Responsive Anpassungen */
@media (max-width: 768px) {
    .stats-cards-grid,
    .dashboard-main-container > div:first-of-type { /* Für Filter-Dropdown und Buttons */
        flex-direction: column;
        align-items: stretch;
    }
    .stat-card, .dashboard-card {
        min-width: unset; /* Entfernt min-width für kleinere Bildschirme */
        width: 100%;
    }
    .accordion-header {
        font-size: 1em;
    }
    .dashboard-table th,
    .dashboard-table td {
        padding: 8px;
        font-size: 0.9em;
    }
}

/* Anpassungen für kleinere Bildschirme (Media Queries) */
@media (max-width: 768px) {
    #pruefungsVerlaufChart {
        height: 300px; /* Kleinere Höhe auf Mobilgeräten */
    }
}

@media (max-width: 480px) {
    #pruefungsVerlaufChart {
        height: 250px; /* Noch kleinere Höhe auf sehr kleinen Mobilgeräten */
    }
}