﻿body {
    font-family: Arial, Helvetica, sans-serif;
}

body, html, form {
    margin: 0;
    padding: 0;
    width: 100%;
    box-sizing: border-box;
    /*overflow-x: hidden;*/
}

:root {
    --bg: #ffffff;
    --card-bg: #fbfdff;
    --accent: #2563eb; /* Blau */
    --muted: #6b7280; /* Grau */
    --row-alt: #f8fafc;
    --radius: 12px;
    --shadow: 0 6px 18px rgba(18,38,63,0.08);
}

div.panel-container {
    box-sizing: border-box;
    width: 100%;
    overflow-x: auto;
}

p.headline {
    color: #801515;
    font-size: 14px;
    padding-left: 25px;
    margin-bottom: -10px;
}

h2.headline {
    color: #801515;
    font-size: 16px;
    font-weight: bold;
    padding-left: 25px;
}

/* Container */
.table-container {
    box-sizing: border-box;
    width: 100%;
    /*overflow-x: hidden;*/
    padding: 1rem;
}

/* Karte um die Tabelle */
.table-card {
    box-sizing: border-box;
    background: var(--card-bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 0.5rem;
    display: inline-block;
    min-width: 100%;
    overflow-x: auto;
}

/* Grundtabelle */
table {
    box-sizing: border-box;
    width: auto; /* nicht erzwingen */
    min-width: 100%; /* aber mindestens Bildschirmbreite */
    border-collapse: separate;
    border-spacing: 0;
    background: var(--bg);
    border-radius: calc(var(--radius) - 2px);
    overflow: visible;
    border: 1px solid #DEDEDF;
}

th {
    text-align: left;
    font-weight: 600;
    padding: 14px 16px;
    font-size: 0.95rem;
    color: black; /* Textfarbe */
    background-color: #F9FAFB; /* Hintergrundfarbe */
    border-bottom: 1px solid rgba(18,38,63,0.06);
}

tbody td {
    padding: 12px 16px;
    font-size: 0.95rem;
    color: #0f172a;
    border-bottom: 1px solid rgba(18,38,63,0.04);
    vertical-align: middle;
}

/* Zebra-Striping */
tbody tr:nth-child(even) td {
    background-color: #FAFAFB;
}

td.flex-cell {
    display: flex;
    align-items: center;
    white-space: nowrap;
}

.icon-right,
.icon-left {
    flex-shrink: 0;
}

/* Bild rechts */
.icon-right {
    margin-left: 8px; /* Abstand zum Text */
}

/* Bild links */
.icon-left {
    margin-right: 8px; /* Abstand zum Text */
}

@media (min-width: 701px) {

    /* Abgerundete Ecken */
    th:first-child {
        border-top-left-radius: calc(var(--radius) - 2px);
    }

    th:last-child {
        border-top-right-radius: calc(var(--radius) - 2px);
    }

    tbody tr:last-child td:first-child {
        border-bottom-left-radius: calc(var(--radius) - 2px);
    }

    tbody tr:last-child td:last-child {
        border-bottom-right-radius: calc(var(--radius) - 2px);
    }

    tbody tr {
        transition: background-color 0.18s ease;
    }

    tbody tr:hover td {
        background-color: #F2F2F2; /* helles Blau */
    }

    .ergebnisse-table {
        overflow-x: auto;
    }    

    .ergebnisse-table th:nth-child(1) {
        text-align: left;
        width: 120px;
        min-width: 120px;
        /*max-width: 120px;*/
    }

    .ergebnisse-table th:nth-child(2) {
        text-align: left;
        width: 120px;
        min-width: 120px;
        /*max-width: 120px;*/
    }

    .ergebnisse-table th:nth-child(3) {
        display: none;
    }

    .ergebnisse-table th:nth-child(4) {
        text-align: right;
        width: 220px;
        min-width: 220px;
        /*max-width: 220px;*/
    }

    .ergebnisse-table th:nth-child(5) {
        width: 20px;
        min-width: 20px;
        /*max-width: 20px;*/
    }

    .ergebnisse-table th:nth-child(6) {
        text-align: left;
        width: 220px;
        min-width: 220px;
        /*max-width: 220px;*/
    }

    .ergebnisse-table th:nth-child(7) {
        text-align: left;
        width: 80px;
        min-width: 80px;
    }

    .ergebnisse-table th:nth-child(8) {
        width: 100%;
        text-align: left;
    }

    .ergebnisse-table td:nth-child(1) {
        text-align: left;
        width: 120px;
        min-width: 120px;
        /*max-width: 120px;*/
    }

    .ergebnisse-table td:nth-child(2) {
        text-align: left;
        width: 120px;
        min-width: 120px;
        /*max-width: 120px;*/
    }

    .ergebnisse-table td:nth-child(3) {
        display: none;
    }

    .ergebnisse-table td:nth-child(4) {
        width: 220px;
        min-width: 220px;
        /*max-width: 220px;*/
        text-align: right;
    }

    .ergebnisse-table td:nth-child(5) {
        width: 20px;
        min-width: 20px;
        /*max-width: 20px;*/
        text-align: center;
        padding-left: 0px;
    }

    .ergebnisse-table td:nth-child(6) {
        min-width: 40px;
        /*max-width: 40px;*/
        width: 40px;
        text-align: center;
    }

    .ergebnisse-table td:nth-child(7) {
        width: 20px;
        min-width: 20px;
        /*max-width: 20px;*/
        text-align: right;
        padding-right: 0px;
    }

    .ergebnisse-table td:nth-child(8) {
        width: 220px;
        min-width: 220px;
        max-/*w*/idth: 220px;
        text-align: left;
    }

    .ergebnisse-table td:nth-child(9) {
        width: 80px;
        min-width: 80px;
        /*max-width: 80px;*/
        text-align: left;
    }

    .ergebnisse-table td:nth-child(10) {
        width: 100%;
        text-align: left ;
    }
}

/* Responsive Ansicht mit Spaltennamen */
@media (max-width: 700px) {

    .ergebnisse-table,
    .ergebnisse-table thead,
    .ergebnisse-table tbody,
    .ergebnisse-table th,
    .ergebnisse-table td,
    .ergebnisse-table tr {
        display: block;
        width: 100%;
    }

    /* Kopf ausblenden */
    .ergebnisse-table thead {
        display: none;
    }

    /* Kopf ausblenden */
    .ergebnisse-table th {
        display: none;
    }

    /* Jede Zeile als Karte */
    .ergebnisse-table tbody tr {
        margin-bottom: 12px;
        background: white;
        border-radius: 10px;
        padding: 12px;
        box-shadow: 0 6px 14px rgba(2,6,23,0.04);
    }

    .ergebnisse-table td {
        display: flex;
        flex-wrap: wrap; /* erlaubt Umbrüche */
        padding: 8px 12px;
        border-bottom: none;
        word-break: break-word; /* lange Wörter umbrechen */
        overflow-wrap: break-word;
        min-width: 0; /* wichtig für flex-shrink */
    }

    .ergebnisse-table td::before {
        content: attr(data-label);
        font-weight: bold;
        color: var(--muted);
        flex: 0 0 35%;
        max-width: 35%;
        white-space: normal; /* Label darf umbrechen */
    }

    .ergebnisse-table {
        overflow-x: hidden; /* Scrollbar komplett verhindern */
    }

    .ergebnisse-table td:nth-child(3) {
        display: flex;
    }

    .ergebnisse-table td:nth-child(4) {
        display: none;
    }

    .ergebnisse-table td:nth-child(5) {
        display: none;
    }

    .ergebnisse-table td:nth-child(7) {
        display: none;
    }

    .ergebnisse-table td:nth-child(8) {
        display: none;
    }

}

.panel-oben {
    flex: 0 0 auto; /* Fixe Höhe oder durch Inhalt */
    height: 60px; /* Falls du eine feste Höhe willst */
    display: flex;
    align-items: center;
    justify-content: center;
}

.drei-spalten {
    flex: 1 0 auto; /* Nimmt den restlichen Platz ein */
    display: flex;
    justify-content: center; /* Zentriert horizontal */
    align-items: center; /* Zentriert vertikal */
    gap: 10px; /* Abstand zwischen Panels */
}
/* Einzelne Bereiche */
.panel-bereich {
    box-sizing: border-box;
    width: 33%;
    max-width: 120px;
    height: 100px;
    display: flex; /* Inhalt zentrieren */
    justify-content: center;
    align-items: center;
    background-color: white;
    flex: 1;
    border: 1px solid #ccc;
}

.panel-bereich-oben-links {
    flex: 0 0 43%;
    display: flex;
    align-items: center;
    justify-content: flex-end; /* ersetzt text-align */
    text-align: right;
    font-size: 16px;
    color: white;
    font-weight: bold;
}

.panel-bereich-oben-mitte {
    flex: 0 0 14%;
    display: flex;
    align-items: center; /* vertikal */
    justify-content: center; /* horizontal */
    text-align: center;
    font-size: 18px;
    color: white;
    font-weight: bold;
}

.panel-bereich-oben-rechts {
    flex: 0 0 43%;
    display: flex;
    align-items: center;
    justify-content: left;
    text-align: left;
    font-size: 16px;
    color: white;
    font-weight: bold;
}

.panel-bereich-ergebnis {
    box-sizing: border-box;
    width: 33%;
    max-width: 120px;
    height: 100px;
    display: flex; /* Inhalt zentrieren */
    justify-content: center;
    align-items: center;
    font-size: 36px; 
    color: white; 
    font-weight:bold;
}

.panel-bereich-image {
    box-sizing: border-box;
    background-color: white;
    width: 90%;
    height: 90%;
    display: flex; /* Inhalt zentrieren */
    justify-content: center;
    align-items: center;
}

.panel-top {
    box-sizing: border-box;
    width: 100%;
    max-width: 700px;
    margin: 0 auto;
    padding: 20px;
    background-image: url('https://sgmwintern.34u.de/Images/rasen.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    border-radius: 10px;
    border: 1px solid #ccc;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    display: flex;
    flex-direction: column; /* Erst oben, dann unten */
    gap: 10px; /* Abstand zwischen Titel und Spalten */
    /* height: 140px;  <-- ENTFERNT, damit Inhalt Platz hat */
}

.panel-bottom {
    box-sizing: border-box;
    width: 100%;
    max-width: 700px;
    margin: 10px auto 0 auto; /* nur kleiner Abstand nach oben */
    padding: 20px;
    background-color: #ffffff;
    border-radius: 15px;
    border: 1px solid #ccc;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    min-height: 150px; /* optional, falls du einen Mindestwert willst */
    overflow-wrap: break-word; /* langer Text wird umgebrochen */
    word-wrap: break-word; /* alte Browserunterstützung */
}

.panel-bottom label {
    display: block; /* Label als Block */
    word-wrap: break-word; /* Lange Wörter umbrechen */
    overflow-wrap: break-word;
}

.panel-text {
    display: block;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

@media (max-width: 700px) {
    .panel-bereich-ergebnis {
        font-size: 28px;
    }
}