/* 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; }

/* ---- 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;
    }
}

/* ---- 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;
    }
}
