/* ===============================
   Allgemeiner Container
================================ */

.vhs-umfrage-auswertung {
    margin: 2em 0;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: #222;
}

/* ===============================
   Lehrer-Auswahl
================================ */

.vhs-umfrage-auswahl {
    margin-bottom: 2em;
    padding: 1em;
    background: #f7f7f9;
    border: 1px solid #ddd;
    border-radius: 6px;
}

.vhs-umfrage-auswahl label {
    font-weight: 600;
    margin-right: 0.5em;
}

.vhs-umfrage-auswahl select {
    padding: 0.4em 0.6em;
    margin-right: 0.5em;
}

.vhs-umfrage-auswahl button {
    padding: 0.45em 1em;
    border: none;
    background: #2271b1;
    color: #fff;
    border-radius: 4px;
    cursor: pointer;
}

.vhs-umfrage-auswahl button:hover {
    background: #135e96;
}

/* ===============================
   Tabelle
================================ */

.vhs-umfrage-tabelle {
    margin-bottom: 3em;
    overflow-x: auto;
}

.vhs-umfrage-tabelle table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95em;
}

.vhs-umfrage-tabelle th,
.vhs-umfrage-tabelle td {
    border: 1px solid #ccc;
    padding: 0.5em 0.6em;
    text-align: center;
    vertical-align: middle;
}

.vhs-umfrage-tabelle thead th {
    background: #efefef;
    font-weight: 600;
}

.vhs-umfrage-tabelle td:first-child {
    text-align: left;
    width: 35%;
}

/* Prozent-Zeile */
.vhs-umfrage-tabelle tr.vhs-prozent {
    background: #ffffff;
}

/* Absolute Zahlen */
.vhs-umfrage-tabelle tr.vhs-anzahl {
    background: #f9f9f9;
    font-size: 0.9em;
    color: #555;
}

/* Durchschnitt hervorheben */
.vhs-umfrage-tabelle td:last-child {
    font-weight: 600;
}

/* ===============================
   Diagramm
================================ */

.vhs-umfrage-diagramm {
    padding: 1.5em;
    background: #f7f7f9;
    border: 1px solid #ddd;
    border-radius: 6px;
}

.vhs-umfrage-diagramm h3 {
    margin-top: 0;
    margin-bottom: 1em;
    font-size: 1.1em;
}

/* ===============================
   Responsive Anpassungen
================================ */

@media (max-width: 768px) {
    .vhs-umfrage-tabelle td:first-child {
        width: auto;
    }

    .vhs-umfrage-tabelle table {
        font-size: 0.85em;
    }
}

/* ===============================
   Ladeanimation
================================ */

#vhs-auswertung-wrapper {
    position: relative;
    min-height: 150px;
}

.vhs-loader {
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.85);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 10;
    font-size: 1.1em;
    font-weight: 600;
    color: #333;
}

.vhs-spinner {
    width: 48px;
    height: 48px;
    border: 5px solid #ddd;
    border-top-color: #2271b1;
    border-radius: 50%;
    animation: vhs-spin 1s linear infinite;
    margin-bottom: 0.8em;
}

@keyframes vhs-spin {
    to {
        transform: rotate(360deg);
    }
}

.vhs-loader-text {
    text-align: center;
}

.vhs-auswertung-kopf {
    margin-bottom: 1.5em;
}

.vhs-kopf-label {
    font-size: 0.85em;
    color: #666;
    text-transform: uppercase;
}

.vhs-kopf-wert {
    font-size: 1.4em;
    font-weight: 600;
    margin-bottom: 0.6em;
}

.vhs-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1em;
    margin-bottom: 2em;
}

.vhs-summary-item {
    background: #f7f7f9;
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 0.8em;
    text-align: center;
}

.vhs-summary-item .label {
    font-size: 0.85em;
    color: #555;
}

.vhs-summary-item .wert {
    font-size: 1.4em;
    font-weight: 600;
}

.vhs-summary-item .prozent {
    font-size: 0.85em;
    color: #2271b1;
}

.vhs-gesamt-durchschnitt {
    margin: 2em 0;
    padding: 1em;
    border-top: 2px solid #ddd;
    border-bottom: 2px solid #ddd;
    text-align: center;
}

.vhs-durchschnitt-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2em;
    margin-top: 0.8em;
}

.vhs-gesamt-durchschnitt .label {
    font-size: 0.9em;
    color: #555;
}

.vhs-gesamt-durchschnitt .wert {
    font-size: 2em;
    font-weight: 600;
    color: #2271b1;
}
