:root {
    /* Farben der Schul-Website (BGRG8 Albertgasse), aus Screenshots übernommen */
    --brand-color: #31999A;      /* Teal - Akzentfarbe (Buttons, Kalender-Kopf, Stepper) */
    --brand-color-dark: #267677; /* dunklere Variante für Hover-Zustände */
    --header-color: #2E4A62;     /* Dunkelblau - Header und Verfügbarkeits-Badge */
    --brand-text-on-brand: #ffffff;
    --hover-teal: #e3f3f3;       /* helle Tönung von --brand-color, statt generischem Grün */
    --hover-teal-border: #a9d4d4;
}

body {
    background-color: #f7f9fa;
}

.booking-container {
    max-width: 720px;
    margin: 0 auto;
    padding-bottom: 5px;
}

/* ---------------- Seiten-Header ---------------- */
/* Dunkelblau (wie die Schul-Website), eng am Text - kein überschüssiger Leerraum */
.app-header {
    background: var(--header-color);
    color: #fff;
    padding: 12px 0;
    margin-bottom: 32px;
    line-height: 1.3;
}

.app-header h1 {
    font-size: 1.2rem;
    font-weight: 600;
    margin: 0;
}

.app-header .teacher-name {
    font-size: 0.9rem;
    opacity: 0.9;
    margin-top: 1px;
}

/* ---------------- Stepper (Art / Datum & Uhrzeit / Details / Fertig) ---------------- */
.stepper {
    display: flex;
    justify-content: space-between;
    margin-bottom: 2.5rem;
    position: relative;
}

.stepper::before {
    content: "";
    position: absolute;
    top: 18px;
    left: 10%;
    right: 10%;
    height: 2px;
    background: #e2e2e2;
    z-index: 0;
}

.stepper .step {
    position: relative;
    z-index: 1;
    text-align: center;
    flex: 1;
}

.stepper .step-circle {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 2px solid #cfcfcf;
    background: #fff;
    color: #999;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 6px;
    font-weight: 600;
}

.stepper .step.active .step-circle {
    border-color: var(--brand-color);
    color: var(--brand-color);
}

.stepper .step.done .step-circle {
    background: var(--brand-color);
    border-color: var(--brand-color);
    color: #fff;
}

/* Alle Stepper-Labels einheitlich fett (nicht nur der aktive Schritt) */
.stepper .step-label {
    font-size: 0.85rem;
    color: #888;
    font-weight: 600;
}

.stepper .step.active .step-label,
.stepper .step.done .step-label {
    color: var(--brand-color);
}

/* ---------------- Buttons & Akzentfarbe ---------------- */
.btn-brand {
    background-color: var(--brand-color);
    border-color: var(--brand-color);
    color: #fff;
}
.btn-brand:hover,
.btn-brand:focus {
    background-color: var(--brand-color-dark);
    border-color: var(--brand-color-dark);
    color: #fff;
}

/* ICS-Download-Button: grau in Ruhe, weiße Schrift erst bei Hover */
.btn-ics-download {
    background-color: transparent;
    border: 1px solid #adb5bd;
    color: #6c757d;
}
.btn-ics-download:hover,
.btn-ics-download:focus {
    background-color: #6c757d;
    border-color: #6c757d;
    color: #fff;
}

/* ---------------- Kalender ---------------- */
.calendar-nav {
    background: var(--brand-color);
    color: #fff;
    padding: 10px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-radius: 4px 4px 0 0;
}

.calendar-nav button {
    background: transparent;
    border: none;
    color: #fff;
    padding: 0 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 28px;
}

.calendar-nav button .icon-fa {
    width: 20px;
    height: 20px;
}

#cal-month-label {
    display: inline-flex;
    align-items: center;
    height: 28px;
}

.calendar-nav button:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    border: 1px solid #eee;
    border-top: none;
}

.calendar-grid .weekday {
    text-align: center;
    font-weight: 600;
    padding: 8px 0;
    background: #fafafa;
    border-bottom: 1px solid #eee;
}

/* Alle Zellen exakt gleich hoch - unabhängig davon, ob ein Verfügbarkeits-Badge
   angezeigt wird oder nicht (der Platz dafür wird über min-height IMMER
   reserviert, siehe .availability-badge unten mit visibility statt display). */
.calendar-grid .day-cell {
    text-align: center;
    padding: 8px 0 6px;
    border: 1px solid #f2f2f2;
    cursor: default;
    color: #333;
    position: relative;
    min-height: 52px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
}

/* Tage außerhalb des Monats bzw. ohne Termine (vergangene/gesperrte Tage) -
   dezenter grauer Hintergrund, damit man auf einen Blick sieht, dass der Tag
   nicht buchbar ist; die Zahl bleibt in einem noch gut lesbaren Grauton
   (kein zu heller/verschwindender Text). Zellengröße bleibt identisch. */
.calendar-grid .day-cell.disabled {
    color: #8a8a8a;
    background: #f4f4f4;
}

.calendar-grid .day-cell.available {
    cursor: pointer;
    transition: background-color 0.15s ease;
}

/* Hover-Effekt auf buchbaren Tagen - helle Tönung der Teal-Akzentfarbe.
   Textfarbe wird hier bewusst explizit gesetzt (statt sie zu vererben):
   ein bereits ausgewählter Tag hat weißen Text auf dunklem Teal-Hintergrund
   (.selected) - würde man das beim Hover nicht überschreiben, bliebe der
   Text weiß auf dem jetzt hellen Hover-Hintergrund und wäre kaum lesbar. */
.calendar-grid .day-cell.available:hover {
    background: var(--hover-teal);
    box-shadow: inset 0 0 0 1px var(--hover-teal-border);
    color: var(--header-color);
}

.calendar-grid .day-cell.selected {
    background: var(--brand-color);
    color: #fff;
    border-radius: 4px;
}

/* Anzahl freier Termine - dunkelblaues Badge statt Browser-Tooltip.
   Wird IMMER im Markup erzeugt (siehe booking.js), aber bei Tagen ohne
   Termine per "visibility: hidden" unsichtbar gemacht statt "display: none" -
   dadurch bleibt der reservierte Platz erhalten und alle Zellen bleiben
   exakt gleich groß. */
.calendar-grid .day-cell .availability-badge {
    display: inline-block;
    min-width: 20px;
    font-size: 0.62rem;
    margin-top: 3px;
    background: var(--header-color);
    color: #fff;
    visibility: hidden;
}

.calendar-grid .day-cell.available .availability-badge {
    visibility: visible;
}

/* Tage, an denen (auch) individuell zusätzlich angelegte Sprechzeiten
   verfügbar sind, bekommen bewusst die Teal-Akzentfarbe statt des
   normalen Dunkelblaus - macht auf einen Blick sichtbar, dass dort etwas
   Besonderes (außerhalb der regulären Sprechzeiten) angeboten wird. */
.calendar-grid .day-cell.available.has-extra-availability .availability-badge {
    background: var(--brand-color);
}

/* ---------------- Zeit-Slots ---------------- */
.time-slot-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #eee;
}

/* ---------------- Footer ---------------- */
.app-footer {
    text-align: center;
    color: #999;
    font-size: 0.8rem;
    padding: 24px 0 10px;
}

.app-footer-link {
    color: #999;
    text-decoration: none;
}
.app-footer-link:hover {
    color: #999;
    text-decoration: none;
}

/* ---------------- Icons (FontAwesome, siehe icon() in helpers.php) ---------------- */
/* Alle Icons im Projekt exakt gleich groß und sauber zum Text ausgerichtet -
   unabhängig vom jeweiligen Icon-Motiv oder wo sie eingesetzt werden
   (Navigation, Buttons, Listen, ...). */
.icon-fa {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    vertical-align: -0.125em;
}

/* ---------------- Bootstrap-Standardfarben ans Design anpassen ---------------- */
/* Aktive Einträge in Dropdown-Menüs (z.B. "Buchungen" innerhalb "Termine")
   nutzen sonst Bootstraps Standard-Hellblau - stattdessen Teal, passend zum
   restlichen Design. */
.dropdown-item.active,
.dropdown-item:active {
    background-color: var(--brand-color);
    color: #fff;
}
