/* Verfuegbarkeitskalender.

   Lag frueher in photobox-booking.css und war damit an die Buchungsstrecke
   gebunden. Seit der Kunde seinen Termin auch im Eventbereich verlegen kann,
   brauchen zwei Seiten dieselben Regeln - kopieren waere die schlechtere
   Antwort gewesen. */

.booking-calendar-field > span {
    display: block;
    margin-bottom: 8px;
}

.booking-calendar {
    border: 1px solid var(--border, #e2e8f0);
    border-radius: var(--radius-md, 12px);
    background: #fff;
    padding: 14px;
}

.booking-calendar-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}

.booking-calendar-head strong {
    font-size: 15px;
    text-transform: capitalize;
}

.booking-calendar-nav {
    width: 34px;
    height: 34px;
    border: 1px solid var(--border, #e2e8f0);
    border-radius: 8px;
    background: #fff;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
}

.booking-calendar-nav:disabled {
    opacity: 0.35;
    cursor: default;
}

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

.booking-calendar-weekday {
    text-align: center;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    color: #5b6472; /* AA: 4.9:1 on white (was #94a3b8, 2.97:1) */
    padding: 4px 0;
}

.booking-calendar-day {
    height: 44px;
    border: 1px solid transparent;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
}

.booking-calendar-day.is-free {
    background: #dcfce7;
    border-color: #bbf7d0;
    color: #15803d;
}

.booking-calendar-day.is-free:hover {
    background: #bbf7d0;
}

.booking-calendar-day.is-blocked {
    background: #f1f5f9;
    color: #94a3b8;
    cursor: default;
}

.booking-calendar-day.is-past {
    background: #f8fafc;
    color: #cbd5e1;
}

.booking-calendar-day.is-selected {
    background: var(--primary, #0066ff);
    border-color: var(--primary, #0066ff);
    color: #fff;
}

/* Der eigene Auf- und Abbautag. Er sah bisher aus wie eine fremde Buchung,
   obwohl er zur Buchung des Kunden gehoert - gedeckte Fassung der
   Auswahlfarbe, damit die Zugehoerigkeit sichtbar ist. */
.booking-calendar-day.is-own-buffer {
    background: #dbeafe;
    border-color: #bfdbfe;
    color: #1d4ed8;
    cursor: default;
}

.booking-calendar-loading {
    grid-column: 1 / -1;
    padding: 18px 6px;
    text-align: center;
    color: var(--text-secondary, #64748b);
    font-size: 13px;
}

.booking-calendar-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 16px;
    margin-top: 10px;
    font-size: 12px;
    color: var(--text-secondary, #64748b);
}

.cal-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 3px;
    margin-right: 4px;
    vertical-align: -1px;
}

.cal-dot-free { background: #dcfce7; border: 1px solid #bbf7d0; }
.cal-dot-blocked { background: #f1f5f9; border: 1px solid #e2e8f0; }
.cal-dot-selected { background: var(--primary, #0066ff); }
.cal-dot-own-buffer { background: #dbeafe; border: 1px solid #bfdbfe; }

/* Kalender braucht die volle Grid-Zeile, sonst überlappt er Nachbarfelder */
.booking-calendar-field {
    grid-column: 1 / -1;
}

/* Puffertage der aktuellen Auswahl (mitreserviert) */
.booking-calendar-day.is-buffer {
    background: #dbeafe;
    border-color: #bfdbfe;
    color: #1d4ed8;
}

.cal-dot-buffer { background: #dbeafe; border: 1px solid #bfdbfe; }
