/*
 * Ergänzungen für die Buchungsverwaltung.
 *
 * Das Grundgerüst kommt aus /gemeinsam/style.css – hier steht nur, was diese
 * Seite mehr braucht als die vier Anfrageseiten: die Buchungskarten und der
 * Dialog, in dem umgebucht, abgesagt und berichtigt wird.
 */

.schmal { max-width: 34rem; margin-inline: auto; }
.schmal h1 { font-size: clamp(1.8rem, 4vw, 2.4rem); }

.laden { color: var(--text-schwach); padding: 3rem 0; text-align: center; }

/* --- Eine Buchung ---------------------------------------------------------- */

/*
 * Die ganze Karte ist der Knopf: „Wenn man auf die Box mit den Daten klickt,
 * kann man umbuchen, absagen oder die Daten ändern." Deshalb ein <button>
 * und kein <div> mit Klickzuhörer – sonst kommt man mit der Tastatur nicht
 * heran.
 */
.buchung {
  display: block;
  width: 100%;
  text-align: left;
  font: inherit;
  color: inherit;
  background: var(--flaeche);
  border: 1px solid var(--linie);
  border-radius: var(--rundung);
  padding: 1.3rem 1.5rem;
  margin-bottom: 1rem;
  cursor: pointer;
  transition: border-color .15s, box-shadow .15s;
}
.buchung:hover, .buchung:focus-visible {
  border-color: var(--akzent);
  box-shadow: 0 2px 10px rgba(16, 51, 58, .07);
  outline: none;
}

/* Was nicht mehr zu ändern ist, sieht auch nicht mehr wie ein Knopf aus. */
.buchung.zu { cursor: default; background: var(--flaeche-still); }
.buchung.zu:hover { border-color: var(--linie); box-shadow: none; }

.buchung-kopf { display: flex; align-items: baseline; gap: .8rem; flex-wrap: wrap; }
.buchung-datum { font-size: 1.15rem; font-weight: 700; color: var(--akzent-dunkel); }
.buchung-kursart { font-weight: 600; }

.buchung-zeile { color: var(--text-schwach); font-size: .95rem; margin-top: .35rem; }

.buchung-fuss {
  display: flex; align-items: center; gap: .6rem; flex-wrap: wrap;
  margin-top: .9rem; padding-top: .8rem; border-top: 1px solid var(--linie);
  font-size: .9rem; color: var(--text-schwach);
}

.marke-etikett {
  font-size: .78rem; font-weight: 650; padding: .2rem .6rem; border-radius: 999px;
  background: var(--akzent-hell); color: var(--akzent-dunkel); white-space: nowrap;
}
.marke-etikett.warn { background: var(--signal-hell); color: var(--signal); }

.buchung-hinweis { flex: 1 1 14rem; }

/* --- Der Dialog ------------------------------------------------------------ */

.dialog {
  width: min(100% - 2rem, 560px); padding: 0; border: none;
  border-radius: var(--rundung); background: transparent;
}
.dialog::backdrop { background: rgba(16, 51, 58, .45); backdrop-filter: blur(2px); }
.dialog .formular { position: relative; margin: 0; max-height: 85vh; overflow-y: auto; }

.dialog-zu {
  position: absolute; top: .7rem; right: .9rem;
  border: none; background: none; font-size: 1.7rem; line-height: 1;
  color: var(--text-schwach); cursor: pointer; padding: .2rem .4rem;
}
.dialog-zu:hover { color: var(--text); }

/* Die drei Wege, die sich im Dialog auftun. */
.wahl { display: grid; gap: .7rem; margin-top: .5rem; }
.wahl button {
  text-align: left; font: inherit; color: inherit; cursor: pointer;
  background: var(--flaeche); border: 1px solid var(--linie);
  border-radius: 10px; padding: .9rem 1.1rem;
}
.wahl button:hover { border-color: var(--akzent); background: var(--akzent-hell); }
.wahl strong { display: block; }
.wahl span { font-size: .9rem; color: var(--text-schwach); }

.zurueck {
  border: none; background: none; color: var(--akzent-dunkel);
  font: 600 .92rem var(--schrift); cursor: pointer; padding: 0 0 .8rem;
}

/* --- Ersatztermine --------------------------------------------------------- */

.termine { max-height: 22rem; overflow-y: auto; margin: .3rem 0 1rem; }

.termine .monat {
  position: sticky; top: 0;
  margin: 1rem 0 .2rem;
  padding: .35rem .4rem;
  background: var(--flaeche);
  font-size: .78rem; font-weight: 700; letter-spacing: .09em; text-transform: uppercase;
  color: var(--text-schwach);
}
.termine .monat:first-child { margin-top: 0; }

.termin-wahl .wann { min-width: 5.5rem; }

.termin-wahl {
  display: flex; align-items: center; gap: .9rem; width: 100%;
  text-align: left; font: inherit; color: inherit; cursor: pointer;
  background: none; border: none; border-bottom: 1px solid var(--linie);
  padding: .8rem .4rem;
}
.termin-wahl:hover { background: var(--akzent-hell); }
.termin-wahl .wann { font-weight: 650; min-width: 8.5rem; }
.termin-wahl .wo { flex: 1; color: var(--text-schwach); font-size: .93rem; }

/* Der Betrag, der am Kurstag fällig wird – die wichtigste Zahl im Dialog. */
.termin-wahl .geld { font-weight: 650; white-space: nowrap; font-variant-numeric: tabular-nums; }
.termin-wahl .geld.bar { color: var(--signal); }
.termin-wahl .geld.gleich { color: var(--text-schwach); font-weight: 500; }

.kasten {
  background: var(--signal-hell); border: 1px solid var(--signal);
  border-radius: 10px; padding: .9rem 1.1rem; margin: 1rem 0;
  font-size: .95rem;
}
.kasten.ruhig { background: var(--flaeche-still); border-color: var(--linie); }

@media (max-width: 620px) {
  .termin-wahl { flex-wrap: wrap; gap: .3rem .9rem; }
  .termin-wahl .wo { flex-basis: 100%; }
}
