/* DATEI: standardmobil.css
   Responsives Basis-Layout fuer die Skatfuechse-Seiten
   Verwendung: <link rel="stylesheet" href="styles/standardmobil.css">
*/

@import url('https://fonts.googleapis.com/css2?family=Inter:ital,wght@0,400;0,700;1,400;1,700&display=swap');

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html, body {
    height: 100%;
    font-family: 'Inter', Verdana, Arial, sans-serif;
    background-color: #F2FFF7;
    font-size: 12px;
}

/* ---- Etwas Luft zwischen Absätzen/Trennlinien (durch den Reset oben sonst 0) ---- */
p { margin: 0 0 10px 0; }
hr { margin: 14px 0; }

/* ---- Seitenlayout (Spalten + Header) ---- */
.layout {
    display: flex;
    flex-direction: column;
    height: 100vh;
}

/* ---- Header ---- */
.header {
    flex-shrink: 0;
    background: #E0E0E0;
    display: flex;
    align-items: center;
    padding: 4px 8px;
    gap: 8px;
}

.header-logo {
    flex: 1;
    text-align: center;
}

.header-logo img {
    max-height: 83px;
    width: auto;
}

/* ---- Hamburger-Schaltfläche (nur Mobil sichtbar) ---- */
.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    background: none;
    border: none;
    padding: 6px;
    border-radius: 4px;
}

.hamburger:hover {
    background: rgba(0, 102, 102, 0.1);
}

.hamburger span {
    display: block;
    width: 26px;
    height: 3px;
    background: #006666;
    border-radius: 2px;
    transition: transform 0.3s, opacity 0.3s;
}

.hamburger.open span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* ---- Hauptbereich ---- */
.main {
    display: flex;
    flex: 1;
    overflow: hidden;
    position: relative;
}

/* ---- Navigations-Sidebar ---- */
.sidebar {
    width: 153px;
    flex-shrink: 0;
    overflow: hidden;
    background: #BFFFC2;
}

.sidebar iframe {
    width: 153px;
    height: 100%;
    border: none;
    display: block;
}

/* ---- Inhaltsbereich ---- */
.content {
    flex: 1;
    overflow: hidden;
}

.content iframe {
    width: 100%;
    height: 100%;
    border: none;
    display: block;
}

/* ---- Overlay hinter geöffneter Sidebar (Mobil) ---- */
.overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 99;
}

.overlay.active {
    display: block;
}

/* ---- Responsive: Mobil (< 768 px) ---- */
@media (max-width: 767px) {

    .hamburger {
        display: flex;
    }

    .sidebar {
        position: fixed;
        top: 0;
        left: 0;
        height: 100%;
        z-index: 100;
        width: 0;
        box-shadow: 3px 0 10px rgba(0, 0, 0, 0.3);
        transition: width 0.3s ease;
    }

    .sidebar.open {
        width: 153px;
    }

    /* Mindestbreite damit Inhalt nicht abgeschnitten wird */
    .sidebar iframe {
        min-width: 153px;
    }
}

/* ---- Gemeinsame Kopfzeilen-Klassen (cli/creo) ---- */
td.cli  { font-size: 10px; background-color: #E0E0E0; color: #006666; text-align: left; }
td.creo { font-size: 16px; background-color: #E0E0E0; color: #006666; font-weight: bold; text-align: center; }

/* ---- Hervorgehobene Zeilen (z. B. E-Mail-Verweise), aus standard_1024_ie.css portiert ---- */
/* width/height dort stammten aus dem 3-spaltigen Grandouvert-Layout (gowl/gowm/gowr) und
   wurden hier bewusst weggelassen, da td.goa meist als volle COLSPAN-Überschriftszeile dient. */
td.goa { font-size: 12px; color: #FFFFFF; text-align: left; background-color: #006666; font-weight: bold; padding: 5px; }
a.goa  { color: #FFFFFF; font-weight: bold; background-color: #006666; }

/* ---- Weitere gemeinsame Tabellenklassen (aus standard.css portiert) ---- */
th {
    font-size: 12px;
    background-color: #E0E0E0;
    color: #006666;
    font-weight: bold;
    text-align: center;
}
td.Samstag, td.Sonntag {
    font-size: 11px;
    background-color: #CCFFFF;
    text-align: center;
    color: #006666;
    font-weight: bold;
}
td.Montag, td.Dienstag, td.Mittwoch, td.Donnerstag, td.Freitag {
    font-size: 11px;
    text-align: center;
}
td.Admin { display: none; }
td.cre {
    font-size: 10px;
    background-color: #E0E0E0;
    color: #006666;
    text-align: right;
}
td.cregr {
    font-size: 12px;
    background-color: #E0E0E0;
    color: #006666;
    text-align: right;
    font-weight: bold;
}
td.tur {
    font-size: 12px;
    background-color: #E0E0E0;
    color: #006666;
    font-weight: bold;
    text-align: center;
}
td.kreuz {
    font-size: 14px;
    background-color: #E0E0E0;
    color: #000000;
    font-weight: bold;
    text-align: center;
}
td.highlight {
    font-size: 18px;
    background-color: #006666;
    color: #E0E0E0;
    font-weight: bold;
    text-align: center;
}
td.clinkli, td.clinkre {
    font-size: 12px;
    background-color: #E0E0E0;
    text-align: center;
}
td.k, th.k {
    text-align: center;
    margin-left: 2px;
    margin-right: 2px;
}
th.k { font-size: 12px; }
td.frage {
    text-align: center;
    margin-left: 2px;
    margin-right: 2px;
    background-color: #8D8D94;
    color: #CCFFCC;
    font-weight: bold;
}
td.ant { background-color: #E0E0E0; }
td.kopf {
    font-size: 14pt;
    color: #000080;
    font-weight: bold;
    text-align: center;
}
td.aus {
    background-color: #E0E0E0;
    text-align: center;
}

/* ---- Anmelde-/Turnierbilder (aus standard.css portiert) ---- */
table.bild {
    border-collapse: collapse;
    border: 1px solid #000080;
}
img.bild {
    width: 60px;
    height: 90px;
    border: 0px;
}

/* ---- Generische Formularfarbe (aus standard.css portiert) ---- */
select, input, textarea, button {
    color: #006666;
    font-weight: bold;
}

/* ---- Links wie überall sonst auf der Homepage (aus standard.css) ---- */
a { color: #006666; font-weight: bold; font-size: 12px; font-family: 'Inter', Verdana, Arial, sans-serif; }
a:hover { color: #FF0000; }

/* ---- Bilder nie breiter als ihr Container ---- */
img { max-width: 100%; height: auto; }

/* ---- Formular: einheitlicher, knapper Zeilenabstand + gleiche Schriftgröße wie die Controls ---- */
.stform tr { height: 30px; }
.stform td { padding: 2px 8px; vertical-align: middle; font-size: 12px; }
.stform td b { font-size: 12px; }

/* ---- Radio-/Checkbox-Buttons auf normale Größe fixieren (nicht an font-size koppeln) ---- */
input[type="radio"],
input[type="checkbox"] {
    width: 14px;
    height: 14px;
    margin: 0 4px 0 0;
    vertical-align: middle;
}

/* ---- Link-Leiste oben (ST ändern, E-Mail an ..., Admin) mit moderatem Abstand ---- */
.navlinks td { padding: 6px 14px; }

/* ---- "Bisherige Termine"-Text: aus dem Tabellenfluss genommen, damit er die Zeilenhöhe nicht beeinflusst ---- */
.termine-zelle { position: relative; }
.termine-text { position: absolute; top: 0; left: 0; width: 420px; max-width: 45vw; }

/* ---- Bild-Vorschau neben der Bild-Auswahl: ebenfalls aus dem Tabellenfluss genommen ---- */
.bild-vorschau-zelle { position: relative; }
.bild-vorschau { position: absolute; top: 0; left: 20px; width: 120px; max-width: 120px; height: auto; }

/* ---- Auf Mobil: beides zurück in den normalen Fluss (kein Platz für ein zweispaltiges Layout) ---- */
@media (max-width: 767px) {
    .termine-zelle, .bild-vorschau-zelle { position: static; }
    .termine-text {
        position: static;
        width: auto;
        max-width: 100%;
    }
    .bild-vorschau {
        position: static;
        left: auto;
        margin-top: 8px;
    }
}

/* ---- Zusammenfassung nach dem Anlegen einer Serie: einheitliche Schriftgröße für Text und Tabelle ---- */
.zusammenfassung {
    max-width: 520px;
    margin: 12px auto;
    padding: 12px 20px;
    border: 1px solid #006666;
    border-radius: 6px;
    background-color: #fff;
    text-align: center;
}
.zusammenfassung p, .zusammenfassung td { font-size: 14px; }
.zusammenfassung p { margin: 6px 0; }
.zusammenfassung .zusammenfassung-titel { font-weight: bold; color: #006666; }
.zusammenfassung table { margin: 8px auto; border-collapse: collapse; text-align: left; }
.zusammenfassung td { padding: 3px 10px; vertical-align: top; }
.zusammenfassung td:first-child { font-weight: bold; color: #006666; white-space: nowrap; }
/* Variante für Fehlermeldungen (z. B. Terminkonflikt, falsches Kennwort) */
.zusammenfassung.fehler { border-color: #cc0000; background-color: #fff5f5; }
.zusammenfassung.fehler .zusammenfassung-titel { color: #cc0000; }

@media (max-width: 767px) {
    .zusammenfassung { padding: 10px 12px; }
    .zusammenfassung td:first-child { white-space: normal; }
}

/* ---- Horizontal scrollbarer Container für breite Tabellen ---- */
.scroll-x { overflow-x: auto; -webkit-overflow-scrolling: touch; }

/* ---- Auf Mobil ausblenden (z. B. Drucken-Button) ---- */
@media (max-width: 767px) {
    .no-mobile { display: none; }
}

/* ---- Formular-Basis ---- */
input[type="text"],
input[type="email"],
textarea,
select {
    font-size: 12px;
    padding: 4px 6px;
    border: 1px solid #999;
    border-radius: 4px;
}

/* ---- Einzeilige Felder auf gleiche Höhe fixieren (select/button rendern sonst höher) ---- */
input[type="text"],
input[type="email"],
select,
#calendar-trigger {
    height: 30px;
}

#calendar-trigger {
    padding: 4px 6px;
    border: 1px solid #999;
    border-radius: 4px;
    background: #fff;
    vertical-align: middle;
    cursor: pointer;
}

#calendar-trigger img {
    height: 18px;
    width: auto;
    vertical-align: middle;
}

input[type="submit"],
input[type="reset"] {
    font-size: 12px     ;
    padding: 8px 20px;
    background-color: #006666;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    margin-right: 12px;
}

input[type="submit"]:hover,
input[type="reset"]:hover { background-color: #004444; }

/* ---- Fehlerseiten (401/403/404/500) ---- */
.error-page {
    max-width: 480px;
    margin: 60px auto;
    padding: 24px;
    text-align: center;
}

.error-page h1 {
    color: #006666;
    font-size: 22px;
    margin-bottom: 14px;
}

.error-page p {
    font-size: 15px;
    line-height: 1.5;
}

.error-page .button {
    display: inline-block;
    margin-top: 10px;
    padding: 10px 24px;
    background-color: #006666;
    color: #fff;
    border-radius: 4px;
    text-decoration: none;
    font-weight: bold;
}

.error-page .button:hover {
    background-color: #004444;
    color: #fff;
}

/* ---- Formular-Layout auf Mobil ---- */
@media (max-width: 767px) {
    form table, form table tbody, form table tr, form table td {
        display: block;
        width: 100%;
    }

    /* Label + Feld stapeln sich jetzt übereinander und brauchen mehr als die 30px-Desktop-Zeilenhöhe */
    .stform tr {
        height: auto;
    }

    input[type="text"],
    input[type="email"],
    textarea,
    select,
    input[type="submit"],
    input[type="reset"] {
        width: 100%;
        box-sizing: border-box;
    }
}

/* ---- Textseiten mit Tabellen (z. B. Spieltermine) ----
   Ohne DOCTYPE (Quirks-Modus) erben Tabellen die Schriftgröße nicht vom body,
   daher hier explizit vererben, damit Fließtext und Tabellentext gleich groß sind. */
body.textseite { padding: 12px 10px; }
.textseite table { font-size: inherit; }
.textseite > p { line-height: 1.5; }
.textseite table.legende { margin: 0 0 14px 0; border-collapse: collapse; }
.textseite table.legende td { padding: 2px 6px 2px 0; vertical-align: middle; }
.textseite table.turnierarten td { font-size: 12px; vertical-align: bottom; }
.textseite table.turnierarten b { font-size: 13px; }

@media (max-width: 767px) {
    body.textseite { padding: 10px 6px; }
    .textseite table.turnierarten td { font-size: 10px; }
    .textseite table.turnierarten b { font-size: 11px; }
    .textseite table.turnierarten img { max-width: 48px; height: auto; }

    /* Aktionsbilder etwas größer für Touch */
    .textseite img[src*="anmelden"], .textseite img[src*="abmelden"], .textseite img[src*="anzeigen"] {
        width: 36px; height: auto;
    }
}
