/*
 * Modernes Styling für das Football‑Projekt
 *
 * Diese Datei verleiht der Website ein freundliches, aufgeräumtes Aussehen. Es
 * werden weiche Farben, Schatten und abgerundete Kanten verwendet. Tabellen
 * erhalten abwechselnde Zeilenfarben. Formulare und Suchfelder sind klar
 * gestaltet. Die Navigationsleiste hebt sich deutlich ab und bleibt klar
 * strukturiert.
 */

/* Grundlegende Farben und Abstände */
body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #042b5f; /* dunkles Blau als Grundfarbe */
    color: #f8f9fa; /* fast weißer Text */
    line-height: 1.5;
}

/* ------------------------------------------------------------------ */
/* Kalenderansicht Styles                                             */
/* Diese Klassen gestalten die Monatsansicht auf calendar_matches.php */
/* ------------------------------------------------------------------ */
.calendar {
    margin-bottom: 20px;
}
.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}
.calendar-title {
    font-weight: bold;
    font-size: 1.2em;
    color: #f8f9fa;
}
.calendar-nav {
    background-color: #00a676;
    color: #ffffff;
    padding: 4px 8px;
    border-radius: 4px;
    text-decoration: none;
    transition: background-color 0.2s ease;
}
.calendar-nav:hover {
    background-color: #008e61;
    text-decoration: none;
}
.calendar-table {
    width: 100%;
    border-collapse: collapse;
}
.calendar-table th,
.calendar-table td {
    text-align: center;
    padding: 10px 0;
    border: 1px solid #0a326a;
    width: 14.28%;
}
.calendar-table th {
    background-color: #042b5f;
    color: #00a6ff;
}
.calendar-table td.empty {
    background-color: #031f4e;
}
.calendar-table td.has-match a {
    position: relative;
}
.calendar-table td .match-dot {
    display: block;
    width: 6px;
    height: 6px;
    margin: 3px auto 0;
    border-radius: 50%;
    background-color: #ffffff;
}
.calendar-table td.selected-date {
    background-color: #0b447e;
    border: 2px solid #00a676;
}
.calendar-table td a {
    color: inherit;
    text-decoration: none;
    display: block;
    width: 100%;
    height: 100%;
}
.calendar-table td a:hover {
    background-color: #0b447e;
}

/* Links in der Analyse‑Übersichtstabelle immer weiß darstellen */
#analysisTable a {
    color: #ffffff;
    text-decoration: none;
}
#analysisTable a:hover {
    color: #00a6ff;
    text-decoration: underline;
}

/* Header und Navigation */
header {
    background-color: #031f4e;
    color: #fff;
    padding: 12px 20px;
    position: relative;
    z-index: 100;
}

/* Navigation */
/*
 * Die Navigationsleiste unterstützt verschachtelte Menüs. Die Top‑Level
 * Einträge werden horizontal angeordnet, während Untermenüs zunächst
 * verborgen sind und bei Hover sichtbar werden. Auf mobilen Geräten
 * werden alle Menüs vertikal dargestellt.
 */
.navbar .nav-list,
.navbar .nav-list ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

/* Top‑Level Navigation: horizontale Anordnung mit Abstand */
.navbar .nav-list {
    display: flex;
    gap: 20px;
    align-items: center;
    transition: max-height 0.3s ease, visibility 0.3s ease;
}

/* Positionierungsgrundlage für Untermenüs */
.navbar .nav-list li {
    position: relative;
    margin: 0;
    padding: 0;
}

/* Links und Oberpunkte innerhalb der Navigation */
.navbar .nav-list a,
.navbar .nav-list .nav-parent {
    color: #ffffff;
    text-decoration: none;
    font-weight: bold;
    padding: 6px 10px;
    display: inline-block;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

/* Hover‑Effekt für Links und Oberpunkte */
.navbar .nav-list a:hover,
.navbar .nav-list .nav-parent:hover {
    background-color: rgba(0, 166, 118, 0.2);
    text-decoration: none;
}

/* Untermenüs verstecken und positionieren */
.navbar .nav-list li ul {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background-color: #031f4e;
    border: 1px solid #0a326a;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
    min-width: 200px;
    z-index: 1000;
}

/* Untermenüs beim Hover einblenden */
.navbar .nav-list li:hover > ul {
    display: block;
}

/* Einträge innerhalb von Untermenüs sollen sich untereinander stapeln */
.navbar .nav-list li ul li {
    display: block;
}

/* Stil für Links innerhalb von Untermenüs */
.navbar .nav-list li ul a,
.navbar .nav-list li ul .nav-parent {
    padding: 8px 12px;
    white-space: nowrap;
    color: #ffffff;
    display: block;
}
.navbar .nav-list li ul a:hover,
.navbar .nav-list li ul .nav-parent:hover {
    background-color: #0b447e;
    color: #ffffff;
}

/* Hauptbereich */
main {
    padding: 20px;
    max-width: 1200px;
    margin: 0 auto;
    min-height: calc(100vh - 160px);
    color: #f8f9fa;
}

/* Kartencontainer */
/* Kartencontainer */
.card {
    background-color: #0c396d; /* dunkles Card-Panel */
    padding: 20px;
    margin: 20px 0;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    color: #f8f9fa;
}

/* Tabellenstil */
table {
    width: 100%;
    border-collapse: collapse;
    background-color: #0c396d;
    border-radius: 8px;
    overflow: hidden;
    margin-top: 15px;
    color: #f8f9fa;
}
table thead th {
    background-color: #042b5f;
    font-weight: 600;
    padding: 12px 10px;
    border-bottom: 1px solid #0a326a;
    text-align: left;
    color: #00a6ff; /* Blaue Tabellenüberschriften */
}
table tbody td {
    padding: 10px;
    border-bottom: 1px solid #0a326a;
}
table tbody tr:nth-child(even) {
    background-color: #08386e;
}
table tbody tr:hover {
    background-color: #0b447e;
}

/* Aktionsbuttons: weiße Schrift auf grünem Hintergrund */
.btn-action {
    background-color: #00a676;
    color: #ffffff;
    padding: 6px 12px;
    border-radius: 4px;
    text-decoration: none;
    display: inline-block;
    margin: 2px;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.2s ease;
}
.btn-action:hover {
    background-color: #008e61;
    text-decoration: none;
}

/* Links in der Analyse‑Übersicht und Aktionsspalten stets weiß darstellen
   Mit !important, um entgegenwirkenden Browser‑Styles vorzubeugen. */
.analysis-actions a,
#analysisTable a {
    color: #ffffff !important;
    text-decoration: none;
}
.analysis-actions a:hover,
#analysisTable a:hover {
    color: #00a6ff !important;
    text-decoration: underline;
}

/* Hervorhebungen für Heim- und Auswärtsteam in Tabellen */
/* Hervorhebungen für Heim- und Auswärtsteam in Tabellen */
.highlight-home {
    background-color: rgba(0, 166, 118, 0.3) !important;
}
.highlight-away {
    background-color: rgba(255, 140, 0, 0.3) !important;
}

/* Formularelemente */
form label {
    display: block;
    margin-top: 12px;
    margin-bottom: 4px;
    font-weight: bold;
}

form input[type="text"],
form input[type="number"],
form select {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box;
}

form input[type="submit"],
button {
    margin-top: 15px;
    padding: 10px 20px;
    background-color: #00a676;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}
form input[type="submit"]:hover,
button:hover {
    background-color: #008e61;
}

/* Suchfeld für Match-Filterung */
/* Suchfeld für Match-Filterung */
.search-input,
input[type="date"] {
    width: 100%;
    padding: 8px 12px;
    margin-bottom: 10px;
    border: 1px solid #294b8c;
    border-radius: 4px;
    box-sizing: border-box;
    background-color: #06356a;
    color: #f8f9fa;
}

/* Fusszeile */
footer {
    background-color: #031f4e;
    color: #fff;
    text-align: center;
    padding: 12px 0;
    position: relative;
    width: 100%;
    bottom: 0;
}

/* Hinweis- und Fehlermeldungen */
.message {
    padding: 10px;
    background-color: #08386e;
    border: 1px solid #0a326a;
    border-radius: 4px;
    margin-bottom: 15px;
    color: #f8f9fa;
}

/* Mobile Navigation */
.menu-toggle {
    display: none;
    font-size: 24px;
    background: none;
    border: none;
    color: #f8f9fa;
    cursor: pointer;
}

@media (max-width: 768px) {
    .navbar .nav-list {
        flex-direction: column;
        max-height: 0;
        overflow: hidden;
        visibility: hidden;
        width: 100%;
        gap: 0;
        background-color: #031f4e;
        position: absolute;
        top: 100%;
        left: 0;
        border-top: 1px solid #0a326a;
    }
    .navbar .nav-list.open {
        max-height: 1000px; /* ausreichend Platz für alle Unterpunkte */
        visibility: visible;
    }
    /* Top‑Level Einträge untereinander im Mobile‑Menü */
    .navbar .nav-list > li {
        width: 100%;
    }
    /* Links und Oberpunkte im Mobile‑Menü haben volle Breite */
    .navbar .nav-list a,
    .navbar .nav-list .nav-parent {
        display: block;
        padding: 12px 20px;
        width: 100%;
        border-bottom: 1px solid #0a326a;
    }
    /* Untermenüs im Mobile‑Menü sollen statisch angezeigt werden */
    .navbar .nav-list li ul {
        display: block;
        position: static;
        background-color: transparent;
        border: none;
        box-shadow: none;
        margin-left: 20px;
    }
    .navbar .nav-list li ul li {
        width: 100%;
    }
    /* Hamburger Button sichtbar */
    .menu-toggle {
        display: block;
        position: absolute;
        top: 12px;
        right: 20px;
    }
}