/* --------------------------------------------------------------------------
   Kalenderauswahl im Pensions-Anfrageformular.

   Zwei Monate nebeneinander, Klick auf den Anreisetag, Klick auf den Abreisetag.
   Welche Tage moeglich sind, kommt aus den Bring- und Holzeiten
   (Pension -> Bring- und Holzeiten, Klasse PensionSchedule).

   Bewusst eigenstaendig und ohne Abhaengigkeit vom Design-Stylesheet der Website:
   das Anfrageformular laeuft in fremden Layouts (jede Instanz hat ihr eigenes
   site/css/<design>.css). Farben kommen aus CSS-Variablen und lassen sich dort
   ueberschreiben.
   -------------------------------------------------------------------------- */

.pwcal {
    --pwcal-accent: #2f6f4e;
    --pwcal-accent-soft: #e6f1ec;
    --pwcal-border: #d9dee2;
    --pwcal-muted: #8a949c;
    --pwcal-text: #1f2933;
    --pwcal-surface: #ffffff;

    color: var(--pwcal-text);
    font-size: 15px;
    line-height: 1.4;
}

.pwcal__summary {
    background: var(--pwcal-accent-soft);
    border-radius: 10px;
    padding: 12px 16px;
    margin-bottom: 16px;
    font-size: 14px;
}

.pwcal__summary strong { display: block; margin-bottom: 4px; }

/* Hinweis bei festen Zeiten: abgesetzt, aber ruhig — kein Alarm-Rot. */
.pwcal__fixnote {
    margin-top: 10px;
    padding: 10px 12px;
    border-left: 3px solid var(--pwcal-accent, #A54B42);
    background: var(--pwcal-surface, #fff);
    border-radius: 6px;
    font-size: 13px;
    line-height: 1.45;
}
.pwcal__fixnote p { margin: 0 0 6px; }
.pwcal__fixnote p:last-child { margin-bottom: 0; }

.pwcal__frame {
    border: 1px solid var(--pwcal-border);
    border-radius: 12px;
    background: var(--pwcal-surface);
    padding: 16px;
}

.pwcal__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.pwcal__nav {
    border: 1px solid var(--pwcal-border);
    background: var(--pwcal-surface);
    border-radius: 8px;
    width: 36px;
    height: 36px;
    line-height: 1;
    font-size: 18px;
    cursor: pointer;
    color: var(--pwcal-text);
}

.pwcal__nav:hover:not(:disabled) { border-color: var(--pwcal-accent); color: var(--pwcal-accent); }
.pwcal__nav:disabled { opacity: .35; cursor: default; }

.pwcal__title { font-weight: 600; }

.pwcal__months {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
}

@media (max-width: 720px) {
    .pwcal__months { grid-template-columns: minmax(0, 1fr); }
}

.pwcal__month-name {
    text-align: center;
    font-weight: 600;
    margin-bottom: 8px;
}

.pwcal__grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 2px;
}

.pwcal__dow {
    text-align: center;
    font-size: 12px;
    color: var(--pwcal-muted);
    padding-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.pwcal__day {
    border: 0;
    background: transparent;
    border-radius: 8px;
    padding: 9px 0;
    font: inherit;
    font-size: 14px;
    cursor: pointer;
    color: var(--pwcal-text);
    position: relative;
}

.pwcal__day:hover:not(:disabled) { background: var(--pwcal-accent-soft); }

.pwcal__day:disabled {
    color: #c3c9ce;
    cursor: default;
    text-decoration: line-through;
    text-decoration-thickness: 1px;
}

.pwcal__day--empty { visibility: hidden; }

.pwcal__day--range { background: var(--pwcal-accent-soft); border-radius: 0; }

.pwcal__day--start,
.pwcal__day--end {
    background: var(--pwcal-accent);
    color: #fff;
    font-weight: 600;
}

.pwcal__day--start { border-radius: 8px 0 0 8px; }
.pwcal__day--end { border-radius: 0 8px 8px 0; }
.pwcal__day--start.pwcal__day--end { border-radius: 8px; }

.pwcal__day--start:hover, .pwcal__day--end:hover { background: var(--pwcal-accent); }

/* Belegung (nur wenn eingeschaltet): gruen frei, rot ausgebucht, dunkelrot geschlossen.
   :not(...) haelt die Auswahl (start/end/range) darueber — die faerbt weiterhin im Akzent. */
.pwcal__day--free:not(.pwcal__day--start):not(.pwcal__day--end):not(.pwcal__day--range)   { background: #e4f3e4; }
.pwcal__day--full:not(.pwcal__day--start):not(.pwcal__day--end):not(.pwcal__day--range)   { background: #fbe0e0; }
.pwcal__day--closed:not(.pwcal__day--start):not(.pwcal__day--end):not(.pwcal__day--range) { background: #f3c6c6; }

/* Vergangene Tage: neutral ausgegraut, keine Belegungsfarbe. */
.pwcal__day--past { background: #f4f5f6; color: #c3c9ce; }

/* Schulferien: roter Unterstrich unter der Zahl. Als ::after, damit er neben Hintergrund
   und Durchstreichung (gesperrte Tage) bestehen bleibt. */
.pwcal__day--holiday::after {
    content: '';
    position: absolute;
    left: 28%;
    right: 28%;
    bottom: 4px;
    border-bottom: 2px solid #d33;
    pointer-events: none;
}

.pwcal__legend {
    margin-top: 12px;
    font-size: 12px;
    color: var(--pwcal-muted);
    display: flex;
    flex-wrap: wrap;
    gap: 6px 14px;
}
.pwcal__legend-item { display: inline-flex; align-items: center; gap: 5px; }
.pwcal__swatch { width: 14px; height: 14px; border-radius: 3px; display: inline-block; position: relative; }
.pwcal__swatch--free   { background: #e4f3e4; }
.pwcal__swatch--full   { background: #fbe0e0; }
.pwcal__swatch--closed { background: #f3c6c6; }
.pwcal__swatch--holiday { background: #eef1f3; }
.pwcal__swatch--holiday::after {
    content: '';
    position: absolute;
    left: 2px; right: 2px; bottom: 2px;
    border-bottom: 2px solid #d33;
}

.pwcal__selection {
    margin-top: 16px;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

@media (max-width: 720px) {
    .pwcal__selection { grid-template-columns: minmax(0, 1fr); }
}

.pwcal__field label {
    display: block;
    font-size: 13px;
    color: var(--pwcal-muted);
    margin-bottom: 4px;
}

.pwcal__field select,
.pwcal__field .pwcal__dateinput,
.pwcal__field .pwcal__value {
    width: 100%;
    border: 1px solid var(--pwcal-border);
    border-radius: 8px;
    padding: 9px 10px;
    background: var(--pwcal-surface);
    font: inherit;
    color: var(--pwcal-text);
}

.pwcal__field select:disabled { background: #f6f7f8; color: var(--pwcal-muted); }

.pwcal__hint { margin-top: 10px; font-size: 13px; color: var(--pwcal-muted); }
.pwcal__hint--error { color: #b3261e; }
