/**
 * mod_buergerhaus_calendar - media/css/kalender.css
 * Version: 2.5.0
 * Datum: 2026-09-29
 * Beschreibung: Gestaltung von Belegungskalender und Anfrageformular
 *   (Optik wie bisher, dazu Tagesauswahl, Legende und Handy-Ansicht).
 *
 * Änderungshistorie:
 * 2.4.0 (2026-09-29): Aus style.css hervorgegangen; Markierung des gewählten
 *   Zeitraums, vergangene/belegte Tage, Legende, Rückmeldung, Handy.
 */

.bhk-kalender {
    padding: 20px;
    background: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 5px;
}

/* ---------- Kopfzeile ---------- */
.bhk .clndr-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: .5rem;
    margin-bottom: 16px;
}
.bhk .clndr-controls .month {
    font-weight: 700;
    font-size: 1.1rem;
    text-align: center;
}
.bhk .clndr-previous-button,
.bhk .clndr-next-button {
    padding: 8px 14px;
    border: 0;
    background-color: #007bff;
    color: #fff;
    border-radius: 4px;
    cursor: pointer;
    font: inherit;
}
.bhk .clndr-previous-button:hover,
.bhk .clndr-next-button:hover {
    background-color: #0056b3;
}

/* ---------- Legende ---------- */
.bhk-legende {
    display: flex;
    flex-wrap: wrap;
    gap: .4rem 1.2rem;
    margin-bottom: 12px;
    font-size: .9rem;
    color: #555;
}
.bhk-punkt {
    display: inline-block;
    width: .85em;
    height: .85em;
    margin-right: .3em;
    border-radius: 2px;
    vertical-align: -1px;
}
.bhk-punkt--frei    { background: #fff; border: 1px solid #bbb; }
.bhk-punkt--anfrage { background: #007bff; }
.bhk-punkt--belegt  { background: #dc3545; }

/* ---------- Tabelle ---------- */
.bhk .calendar-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
    background: #fff;
}
.bhk .calendar-table th,
.bhk .calendar-table td {
    text-align: center;
    border: 1px solid #ddd;
    padding: 8px 4px;
    vertical-align: top;
}
.bhk .calendar-table td.day {
    height: 64px;
    cursor: pointer;
    transition: background-color .15s;
}
.bhk .calendar-table td.day:hover,
.bhk .calendar-table td.day:focus-visible {
    background-color: #eef5ff;
    outline: none;
}
.bhk .calendar-table td.day:focus-visible {
    box-shadow: inset 0 0 0 2px #007bff;
}
.bhk .day-number {
    display: block;
    font-weight: 600;
}
.bhk td.today .day-number {
    display: inline-block;
    min-width: 1.8em;
    border-radius: 50%;
    background: #22262b;
    color: #fff;
}
.bhk td.adjacent-month {
    color: #bbb;
    background: #fafafa;
}
.bhk td.past {
    color: #aaa;
    cursor: not-allowed;
}
.bhk td.past:hover {
    background-color: transparent;
}
.bhk td.bhk-belegt {
    cursor: not-allowed;
    background: #fdf0f1;
}
/* gewählter Tag / Zeitraum */
.bhk td.bhk-gewaehlt {
    background: #d9f2df !important;
    box-shadow: inset 0 0 0 2px #2f8a3e;
}

.bhk .event {
    margin-top: 4px;
    font-size: .8em;
    padding: 2px;
    border-radius: 2px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.bhk .highlighted-red  { background: #dc3545; color: #fff; }
.bhk .highlighted-blue { background: #007bff; color: #fff; }

/* ---------- Rückmeldung ---------- */
.bhk-info {
    margin: 14px 0 0;
}
.bhk-info[hidden] {
    display: none !important;
}
.bhk-info-knoepfe {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    margin-top: .6rem;
}

/* übernommenes Datumsfeld kurz aufleuchten lassen */
.bhk .bhk-aufleuchten {
    animation: bhk-aufleuchten 1.8s ease-out;
}
@keyframes bhk-aufleuchten {
    0%, 30% { box-shadow: 0 0 0 4px rgba(47, 138, 62, .45); background-color: #eaf7ed; }
    100%    { box-shadow: none; }
}

/* ---------- Preis-Aufschlüsselung ---------- */
.bhk-preis-zeilen {
    list-style: none;
    margin: .5rem 0 0;
    padding: .5rem 0 0;
    border-top: 1px solid rgba(0, 0, 0, .12);
    font-size: .9rem;
}
.bhk-preis-zeilen[hidden] {
    display: none;
}
.bhk-preis-zeilen li {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: .1rem 0;
}
.bhk-preis-zeilen li span:last-child {
    white-space: nowrap;
}

/* ---------- Handy ---------- */
@media (max-width: 575.98px) {
    .bhk-kalender {
        padding: 10px;
    }
    .bhk .bhk-lang {
        display: none; /* nur Pfeile */
    }
    .bhk .calendar-table th,
    .bhk .calendar-table td {
        padding: 5px 1px;
        font-size: .85rem;
    }
    .bhk .calendar-table td.day {
        height: 48px;
    }
    /* Belegung als Farbbalken statt Text */
    .bhk .event {
        height: 6px;
        padding: 0;
        font-size: 0;
        margin: 4px 2px 0;
    }
}
