/* Raumplaner – minimales Grundgerüst-Styling, Schritt S2.
   Erweitert um Tabellen/Admin-Layout in Schritt S3.
   Vollständiges Design folgt mit den Fachmodulen ab S4. */

:root {
    /* D1: alte Variablen zeigen auf die gemeinsamen Verbund-Variablen (verbund.css) */
    --farbe-hintergrund: var(--v-hintergrund);
    --farbe-flaeche: var(--v-flaeche);
    --farbe-text: var(--v-text);
    --farbe-rand: var(--v-linie-feld);
    --farbe-akzent: var(--v-primaer-dunkel);
    --farbe-fehler: var(--v-fehler);
    --farbe-hinweis: var(--v-ok);
}

* { box-sizing: border-box; }

/* D1: body (Schrift, Hintergrund) siehe verbund.css */

/* D1: Navigation (.nav-leiste) siehe verbund.css (.v-kopf) */

.inhalt {
    max-width: 32rem;
    margin: 3rem auto;
    padding: 2rem;
    background: var(--farbe-flaeche);
    border: 1px solid var(--farbe-rand);
    border-radius: 8px;
}

.inhalt--breit {
    max-width: 62rem;
}

h1 { margin-top: 0; font-size: 1.4rem; }

.formular { display: flex; flex-direction: column; gap: 0.35rem; margin-top: 1.25rem; }
.formular label { font-size: 0.9rem; font-weight: 600; }
.formular input, .formular select {
    padding: 0.5rem 0.6rem;
    border: 1px solid var(--farbe-rand);
    border-radius: 4px;
    font-size: 1rem;
    margin-bottom: 0.6rem;
}
.formular button {
    margin-top: 0.5rem;
    padding: 0.6rem 1rem;
    background: var(--farbe-akzent);
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    cursor: pointer;
    align-self: flex-start;
}
.formular button:hover { opacity: 0.9; }

.formular--zeile { flex-direction: row; gap: 1rem; align-items: flex-end; flex-wrap: wrap; }
.formular--zeile > div { display: flex; flex-direction: column; }

.formular__checkbox-zeile { display: flex; align-items: center; gap: 0.5rem; font-weight: 400 !important; }
.formular__checkbox-zeile input { margin: 0; width: auto; }

.fehler { color: var(--farbe-fehler); font-weight: 600; }
.hinweis { color: var(--farbe-hinweis); font-weight: 600; }

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
    font-size: 0.9rem;
}
th, td {
    text-align: left;
    padding: 0.5rem 0.6rem;
    border-bottom: 1px solid var(--farbe-rand);
}
th { background: var(--farbe-hintergrund); font-weight: 600; }
.matrix-zelle { text-align: center; }

code {
    background: var(--farbe-hintergrund);
    padding: 0.05rem 0.35rem;
    border-radius: 3px;
    font-size: 0.85em;
}

.fuss {
    text-align: center;
    color: #8a8f99;
    font-size: 0.8rem;
    padding: 1.5rem 0 2.5rem;
}

/* S4 – Standorte & Räume */
.unterbereich {
    margin-top: 2rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--farbe-rand);
}

.dynamische-zeile {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    margin-bottom: 0.5rem;
}
.dynamische-zeile input { margin-bottom: 0; }
.dynamische-zeile button.entfernen {
    background: none;
    border: 1px solid var(--farbe-rand);
    border-radius: 4px;
    color: var(--farbe-fehler);
    cursor: pointer;
    padding: 0.35rem 0.6rem;
}

.foto-galerie {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin: 0.75rem 0 1.25rem;
}
.foto-kachel {
    width: 9rem;
    text-align: center;
}
.foto-kachel img {
    width: 100%;
    height: 6rem;
    object-fit: cover;
    border-radius: 4px;
    border: 1px solid var(--farbe-rand);
    display: block;
}
.foto-kachel form { margin-top: 0.3rem; }
.foto-kachel button {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
    background: none;
    border: 1px solid var(--farbe-rand);
    color: var(--farbe-fehler);
    border-radius: 4px;
    cursor: pointer;
}

/* S9 - Plantafel */
:root {
    --farbe-frei: #d7f2dc;
    --farbe-teilweise: #fdf0c4;
    --farbe-belegt: #f6d3d0;
    --farbe-gesperrt: #e2e4e9;
}

.plantafel-nav { margin: 1rem 0; }

.plantafel-grid { table-layout: fixed; }
.plantafel-grid th, .plantafel-grid td {
    text-align: center;
    padding: 0.25rem;
    font-size: 0.78rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.plantafel-grid th:first-child, .plantafel-grid td:first-child {
    text-align: left;
    white-space: normal;
    min-width: 9rem;
}

.slot-frei { background: var(--farbe-frei); }
.slot-frei a { display: block; width: 100%; height: 1.2rem; text-decoration: none; }
.slot-teilweise { background: var(--farbe-teilweise); }
.slot-belegt { background: var(--farbe-belegt); }
.slot-gesperrt { background: var(--farbe-gesperrt); color: #5a6072; }
.slot-eigene { box-shadow: inset 0 0 0 2px var(--farbe-akzent); font-weight: 600; }

.warnhinweis-symbol { color: #a6710a; cursor: help; }

/* --- U3: Tool-Umschalter und Startseiten-Kacheln (gleiche Form in Raumplaner und Meeting-Tool) --- */
/* D1: Umschalter-Pills siehe verbund.css */
.verbund-kacheln { display: grid; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); gap: 1rem; margin: 1.5rem 0; }
.verbund-kachel {
    border: 1px solid var(--farbe-rand); border-top: 5px solid var(--pill, #2b5fb0); border-radius: 8px;
    padding: 1rem 1.1rem; background: var(--farbe-flaeche); display: flex; flex-direction: column; gap: 0.5rem;
}
.verbund-kachel h2 { margin: 0; font-size: 1.15rem; }
.verbund-kachel .rolle { font-size: 0.85rem; color: #5a6072; }
.verbund-kachel p { margin: 0; font-size: 0.92rem; flex: 1; }
.verbund-kachel .verbund-pill { align-self: flex-start; padding: 0.4rem 1rem; font-size: 0.95rem; }
.verbund-links { display: flex; gap: 1.25rem; flex-wrap: wrap; font-size: 0.92rem; }
.untertitel { margin: -0.4rem 0 0.5rem; color: #5a6072; font-size: 0.92rem; }
.typ-punkt { display: inline-block; width: 0.7rem; height: 0.7rem; border-radius: 50%; margin-right: 0.35rem; vertical-align: middle; }
.typ-legende { display: flex; gap: 1rem; flex-wrap: wrap; font-size: 0.88rem; color: #5a6072; margin: 0.4rem 0 0.8rem; }

/* --- N1: volle Fensterbreite, Ausstattungsfilter nebeneinander, mehrzeilige Treffer --- */
.inhalt--voll { max-width: none; margin: 1.5rem 1rem; }
.ausstattung-raster { display: grid; grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); gap: 0.6rem 1.5rem; margin: 0.5rem 0 1rem; }
.ausstattung-raster fieldset { border: 1px solid var(--farbe-rand); border-radius: 6px; padding: 0.4rem 0.8rem 0.6rem; margin: 0; }
.ausstattung-raster legend { font-weight: 700; font-size: 0.9rem; padding: 0 0.3rem; }
.ausstattung-raster .attribute { display: flex; flex-wrap: wrap; gap: 0.2rem 1rem; }
.ausstattung-raster label { display: inline-flex; align-items: center; gap: 0.3rem; font-weight: 400; font-size: 0.9rem; white-space: nowrap; }
.treffer-zeile .unterzeile { display: block; font-size: 0.85rem; color: #5a6072; margin-top: 0.15rem; }
.treffer-zeile .unterzeile strong { color: #3d4250; font-weight: 600; }

/* --- Design-Vorgriff (Peter 08.10.2026): Plantafel/Raumsuche arbeitsfähig in voller Breite --- */
.inhalt--voll { max-width: none; margin: 1rem; padding: 1.25rem 1.5rem; }
/* Filterleisten einzeilig nebeneinander, Knopf auf Höhe der Felder */
.formular--zeile { flex-wrap: wrap; align-items: flex-end; gap: 0.75rem 1.25rem; }
.formular--zeile > div { flex: 0 0 auto; }
.formular--zeile input, .formular--zeile select { margin-bottom: 0; }
.formular--zeile button { margin-top: 0; align-self: flex-end; }
.formular--zeile .formular__checkbox-zeile { margin: 0 0 0.55rem; }
/* Plantafel: Raumspalte fest und lesbar, Zeitspalten teilen sich den Rest */
.plantafel-grid { width: 100%; }
.plantafel-grid th:first-child, .plantafel-grid td:first-child { width: 15rem; min-width: 15rem; white-space: normal; }
.plantafel-grid td:first-child .unterzeile { white-space: normal; }
.plantafel-nav { margin: 0.75rem 0; }
.typ-legende { margin: 0.25rem 0 0.75rem; }
/* Filterkästen: lange Bezeichnungen umbrechen statt in den Nachbarkasten zu laufen */
.ausstattung-raster { grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr)); }
.ausstattung-raster fieldset { min-width: 0; }
.ausstattung-raster label { white-space: normal; align-items: flex-start; }
.ausstattung-raster label input { margin-top: 0.2rem; flex: 0 0 auto; }
/* N1b: Kontakte (Liste + Formular nebeneinander) und Schnellanlage im Buchungsformular */
.kontakte-raster { display: grid; grid-template-columns: minmax(0, 1fr) 22rem; gap: 1.5rem; align-items: start; }
.kontakt-formular { border: 1px solid var(--farbe-rand); border-radius: 8px; padding: 1rem 1.2rem; }
@media (max-width: 900px) { .kontakte-raster { grid-template-columns: 1fr; } }
.schnellanlage { border: 1px dashed var(--farbe-rand); border-radius: 6px; padding: 0.4rem 0.8rem; margin: 0 0 0.8rem; }
.schnellanlage summary { cursor: pointer; color: var(--farbe-akzent); font-weight: 600; font-size: 0.92rem; }
.schnellanlage-felder { display: flex; flex-wrap: wrap; gap: 0.5rem 1rem; align-items: flex-end; margin-top: 0.5rem; }
.schnellanlage-felder > div { display: flex; flex-direction: column; }
.schnellanlage-felder input { margin-bottom: 0; }
.schnellanlage-felder button { margin-top: 0; }
/* N1: Termine in der Tagesansicht zweizeilig (Titel / Leitung fett) */
.plantafel-grid td.slot-belegt { white-space: normal; text-align: left; vertical-align: top; line-height: 1.25; overflow: hidden; }
.plantafel-grid .termin-titel, .plantafel-grid .termin-leitung { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.plantafel-grid .termin-leitung { font-weight: 700; }

/* U5: Anmeldeseite – Hinweis und Rücklink zur Website */
.login-hinweis { color: #5a6072; font-size: 0.9rem; margin: 0 0 1rem; }
.login-zurueck { margin-top: 1.5rem; font-size: 0.92rem; }
.fuss a { color: inherit; }

/* ==========================================================================
   D1 – Design (Website-Stil): Bausteine des Raumplaners auf die Verbund-Variablen
   ========================================================================== */
.inhalt { border: 1px solid var(--v-linie); border-radius: var(--v-radius); box-shadow: var(--v-schatten); }
.inhalt--voll { margin: 1.25rem; }
h1 { font-size: 1.5rem; }
.formular input, .formular select, .formular textarea, .formular--zeile input, .formular--zeile select {
    border-radius: var(--v-radius-klein); border-color: var(--v-linie-feld); background: #fff; font-family: inherit; }
.formular button, .formular--zeile button {
    background: var(--v-grad); color: #fff; border: none; border-radius: var(--v-radius-klein);
    font-weight: 600; box-shadow: 0 2px 6px rgba(102,126,234,0.35); cursor: pointer; font-family: inherit; }
.formular button:hover, .formular--zeile button:hover { filter: brightness(1.07); opacity: 1; }
table { background: var(--v-flaeche); }
th { background: var(--v-flaeche-leise); color: var(--v-text-leise); font-size: 0.85rem; border-bottom: 2px solid var(--v-linie); }
td { border-bottom-color: var(--v-linie); }
tbody tr:hover td:not([class^="slot-"]) { background: #fafbff; }
.verbund-kachel h2 { font-size: 1.2rem; }
.verbund-kachel .verbund-pill { align-self: flex-start; padding: 0.45rem 1.1rem; font-size: 0.95rem; }
/* Plantafel: weichere Linien, eigene Buchungen in Akzentfarbe des Tools */
.plantafel-grid td { border-color: #eceef4; }
.slot-eigene { box-shadow: inset 0 0 0 2px var(--v-akzent); }
/* Öffentliche Seiten: Karte über dem Verlaufsband */
body.v-oeffentlich .inhalt { margin-top: 1.25rem; box-shadow: 0 10px 30px rgba(60,40,120,0.18); }

/* ---------- D1.2: Raumplaner-Seiten ---------- */
/* Meldungen: nur Absätze als Kasten mit Farbbalken; Inline-Hinweise (span/a) bleiben Text bzw. Etikett */
p.fehler { background: var(--v-fehler-hg); border-left: 4px solid var(--v-fehler); padding: 0.6rem 0.9rem; border-radius: 6px; }
p.hinweis { background: var(--v-ok-hg); border-left: 4px solid var(--v-ok); padding: 0.6rem 0.9rem; border-radius: 6px; }
span.hinweis { color: var(--v-ok); }
a.hinweis { display: inline-block; padding: 0.05rem 0.5rem; border-radius: 999px; background: var(--v-ok-hg);
    color: var(--v-ok); text-decoration: none; white-space: nowrap; font-weight: 600; }
a.hinweis:hover { background: #d4efdc; }
/* Grundknopf (z. B. Tabellen-Aktionen wie „Stornieren“): Sekundär-Stil; Formular-Knöpfe bleiben Primär (Verlauf) */
button { font-family: inherit; font-size: 0.9rem; padding: 0.35rem 0.8rem; border-radius: var(--v-radius-klein);
    border: 1px solid var(--v-linie-feld); background: #fff; color: var(--v-text); cursor: pointer; }
button:hover { border-color: var(--v-primaer); color: var(--v-primaer-dunkel); background: var(--v-flaeche-leise); }
/* Listen-/Verwaltungsseiten: Fensterbreite besser nutzen */
.inhalt--breit { max-width: 90rem; margin: 1.5rem auto; }
.formular button:hover, .formular--zeile button:hover { background: var(--v-grad); color: #fff; border-color: transparent; }
.formular button, .formular--zeile button { padding: 0.6rem 1.1rem; font-size: 1rem; }
td button, td form button { padding: 0.2rem 0.65rem; font-size: 0.85rem; }
td form { margin: 0; }
