/* Buchungsanfrage mit Belegungskalender – ergänzt das Stylesheet der Webseite (vh2026.css).
   Kalender: Tage untereinander, Wohnungen nebeneinander; ein Tag sind zwei Zeilen (Abreise vormittags, Anreise nachmittags).
   Bewußt einfarbig: frei = weiß, belegt = grau, die eigene Auswahl in der Akzentfarbe der Seite. */
:root { --ak-belegt: #8496AB; --ak-belegt-text: #fff; --ak-linie: #E3E8EF; --ak-we: #F5F7FA; --ak-halb: 22px; }

/* Die Seite beschneidet ihren Rahmen ab 1100 px mit „hidden“; „clip“ rundet ebenso, läßt aber Menü und Kalenderkopf beim Rollen stehen */
@media (min-width: 1100px) { #wrapper { overflow: clip; } }

.anf-raster { display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; align-items: start; margin-bottom: 1.25rem; }
@media (min-width: 900px) { .anf-raster { grid-template-columns: minmax(0, 560px) minmax(280px, 1fr); } .anf-seite { position: sticky; top: 64px; } }

.ak-leiste { display: flex; gap: 8px; align-items: center; margin-bottom: 10px; }
.ak-leiste select { flex: 1 1 auto; min-width: 0; width: auto; font: 600 1rem var(--font); padding: 8px 10px; border: 1px solid #c9d2dd; border-radius: var(--radius-sm); background: #fff; }
.ak-leiste .btn { flex: 0 0 auto; min-width: 46px; font-size: 1.2rem; line-height: 1; padding: 8px 12px; }
.ak-leiste .btn[disabled] { opacity: .35; cursor: default; }

.ak { display: grid; grid-template-columns: 52px repeat(var(--spalten, 5), minmax(0, 1fr)); grid-template-rows: 40px; grid-auto-rows: var(--ak-halb);
    background: #fff; border: 1px solid var(--line); border-radius: var(--radius-sm); box-shadow: var(--shadow-sm); user-select: none; -webkit-user-select: none; }
.ak-ecke, .ak-kopf { grid-row: 1; position: sticky; top: var(--nav-h, 49px); z-index: 6; background: #fff; border-bottom: 2px solid var(--line); }
.ak-ecke { grid-column: 1; border-top-left-radius: var(--radius-sm); }
.ak-kopf { display: flex; align-items: center; justify-content: center; text-align: center; font-weight: 700; font-size: .95rem; color: var(--blue-dark); line-height: 1.1; padding: 0 2px; }
.ak-kopf:last-of-type { border-top-right-radius: var(--radius-sm); }
.ak-kopf .lang { display: none; }
@media (min-width: 560px) { .ak-kopf .lang { display: inline; } .ak-kopf .kurz { display: none; } }
.ak-tag { grid-column: 1 / -1; z-index: 0; border-top: 1px solid var(--ak-linie); padding: 4px 0 0 6px; display: flex; flex-direction: column; font-size: .72rem; line-height: 1.2; color: var(--ink-muted); pointer-events: none; }
.ak-tag b { font-size: .84rem; font-weight: 600; color: var(--ink); }
.ak-tag.we { background: var(--ak-we); }
.ak-tag.heute { background: var(--blue-soft); box-shadow: inset 4px 0 0 var(--blue); }
.ak-tag.heute span { color: var(--blue-dark); font-weight: 700; }
.ak-tag.erster { border-top: 2px solid var(--blue); }
.ak-tag.vorbei { background: repeating-linear-gradient(135deg, #f3f5f8 0 6px, #e9edf2 6px 12px); }
.ak-tag.vorbei b, .ak-tag.vorbei span { opacity: .55; }

/* Felder: je Wohnung und Tag eine Schaltfläche (frei wählbar per Maus, Finger oder Tastatur) */
.ak-feld { z-index: 1; appearance: none; -webkit-appearance: none; background: transparent; border: 0; border-left: 1px solid var(--ak-linie); padding: 0; margin: 0; cursor: pointer; min-width: 0; }
@media (hover: hover) { .ak-feld:hover { background: rgba(51, 153, 255, .16); } .ak-feld.moeglich:hover { background: #FFDFC6; } }
.ak-feld:focus-visible { outline: 2px solid var(--blue-deep); outline-offset: -2px; }
.ak-feld[disabled] { cursor: default; background: transparent; }
.ak-feld.moeglich { background: var(--orange-soft); }

.ak-block { z-index: 2; margin: 0 3px; min-width: 0; pointer-events: none; border-radius: 6px; }
.ak-block.belegt { background: var(--ak-belegt); }
.ak-block.gewaehlt { z-index: 3; background: var(--orange); color: #fff; padding: 4px 4px 3px; overflow: hidden; display: flex; flex-direction: column; gap: 1px; font-size: .72rem; line-height: 1.2; font-weight: 600; box-shadow: 0 0 0 2px #fff; }
.ak-block.gewaehlt b { font-size: .8rem; }
.ak-block.offen { z-index: 3; background: var(--orange); box-shadow: 0 0 0 2px #fff; }
.ak-block.oben-offen { border-top-left-radius: 0; border-top-right-radius: 0; }
.ak-block.unten-offen { border-bottom-left-radius: 0; border-bottom-right-radius: 0; }

.ak-legende { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin: 10px 0 0; font-size: .9rem; color: var(--ink-soft); }
.ak-legende .hint { flex-basis: 100%; margin: 2px 0 0; font-size: .85rem; }
.ak-muster { display: inline-block; width: 22px; height: 14px; border-radius: 4px; border: 1px solid var(--line); margin-left: 8px; }
.ak-muster:first-child { margin-left: 0; }
.ak-muster.frei { background: #fff; }
.ak-muster.belegt { background: var(--ak-belegt); border-color: var(--ak-belegt); }
.ak-muster.gewaehlt { background: var(--orange); border-color: var(--orange); }

/* Auswahl, Stellplätze, Preis */
.anf-seite { scroll-margin-top: 64px; }
.anf-seite h2 { font-size: 1.15rem; margin: 0 0 .6rem; color: var(--blue-dark); }
.ak-meldung { margin: 0 0 .6rem; font-size: .95rem; color: var(--ink-soft); min-height: 1.4em; }
.ak-meldung.warnung { color: #B3261E; font-weight: 600; }
.anf-auswahl { list-style: none; margin: 0 0 .8rem; padding: 0; }
.anf-auswahl li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 10px; align-items: center; padding: 8px 0; border-top: 1px solid var(--ak-linie); }
.anf-auswahl li:first-child { border-top: 0; }
.anf-auswahl b { font-size: 1rem; }
.anf-auswahl span { grid-column: 1; font-size: .95rem; color: var(--ink-soft); }
.anf-auswahl li.offen span { color: var(--orange-deep); font-weight: 600; }
.anf-auswahl button { grid-column: 2; grid-row: 1 / span 2; width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--line); background: #fff; color: var(--ink-soft); font-size: 1.2rem; line-height: 1; cursor: pointer; }
.anf-auswahl button:hover { border-color: var(--orange); color: var(--orange-deep); background: var(--orange-soft); }
.anf-hand { padding: 8px 10px; margin: 0 0 1rem; background: var(--bg); border-radius: var(--radius-sm); font-size: .9rem; }
.anf-hand summary { cursor: pointer; font-weight: 600; color: var(--ink-soft); padding: 2px 0; }
.anf-hand-felder { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 8px; }
.anf-hand select { grid-column: 1 / -1; min-width: 0; }
.anf-hand label { display: flex; flex-direction: column; gap: 3px; color: var(--ink-soft); min-width: 0; }
.anf-hand .btn { grid-column: 1 / -1; justify-self: start; }
.anf-zwischen { font-size: 1rem; margin: 1rem 0 .5rem; color: var(--ink); }
.anf-zwischen small { font-weight: 400; color: var(--ink-muted); }
/* je Wohnung höchstens ein Stellplatz: die Wahl steht in der Zeile der Wohnung */
.anf-auswahl .anf-platz { grid-column: 1 / -1; display: flex; flex-direction: column; gap: 3px; margin-top: 6px; font-size: .85rem; color: var(--ink-muted); }
.anf-auswahl .anf-platz select { width: 100%; min-width: 0; }
.anf-platzhinweis { margin: 0 0 .6rem; }
.anf-preis table { width: 100%; border-collapse: collapse; font-size: .95rem; }
.anf-preis td { padding: 4px 0; vertical-align: top; }
.anf-preis td:last-child { text-align: right; white-space: nowrap; padding-left: 12px; font-variant-numeric: tabular-nums; }
.anf-preis tfoot td { border-top: 2px solid var(--line); font-weight: 700; font-size: 1.05rem; padding-top: 7px; }
.anf-hinweise { list-style: none; margin: .5rem 0 0; padding: 0; font-size: .9rem; color: var(--orange-deep); }
.anf-fehler { margin: 0 0 1.25rem; padding: 12px 16px; border: 1px solid #E7B7B3; border-left: 4px solid #B3261E; border-radius: var(--radius-sm); background: #FDF1F0; color: #7A1A14; scroll-margin-top: 70px; }
.anf-fehler ul { margin: .4rem 0 0; padding-left: 1.2rem; }
#dank { scroll-margin-top: 70px; }
.anf-angaben { margin-bottom: 1.25rem; }
.anf-angaben .field textarea { min-height: 110px; }
.anf-angaben .field label small { font-weight: 400; color: var(--ink-muted); }
.anf-preisliste h2 { color: var(--blue-dark); }
input.input[type=date], input.input[type=number] { min-height: 44px; }

/* Schmale Bildschirme: Kalender über die ganze Breite, unten eine feste Zeile mit dem Stand der Auswahl */
.anf-stand { display: none; }
@media (max-width: 899px) {
    .ak { grid-template-columns: 44px repeat(var(--spalten, 5), minmax(0, 1fr)); }
    .ak-tag { padding-left: 4px; }
    .ak-tag b { font-size: .78rem; letter-spacing: -.2px; }
    .ak-block { margin: 0 2px; }
    .anf-stand { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; align-items: center; gap: 10px; padding: 10px 14px calc(10px + env(safe-area-inset-bottom));
        background: #fff; border-top: 1px solid var(--line); box-shadow: 0 -6px 18px rgba(20, 40, 80, .14); font-size: .95rem; line-height: 1.3; }
    .anf-stand[hidden] { display: none; }
    .anf-stand span { flex: 1 1 auto; min-width: 0; }
    .anf-stand .btn { flex: 0 0 auto; }
    .anf-stand .btn[hidden] { display: none; }
    body.mit-stand { padding-bottom: 76px; }
}
@media print { .ak-leiste, .anf-stand, .anf-hand { display: none !important; } }
