/* ---------- Buchungsseite ---------- */

.hero {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 28px;
  align-items: center;
  padding-bottom: 8px;
}
.hero-doodle { width: 100%; max-width: 280px; transform: rotate(2deg); }
.intro { font-size: 21px; max-width: 640px; margin-top: 14px; color: var(--ink-soft); }

.steps {
  list-style: none;
  padding: 0;
  margin: 18px 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 26px;
  font-size: 19px;
}
.steps li { display: flex; align-items: center; gap: 8px; }
.steps .num {
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  font-family: var(--hand);
  font-weight: 700;
  font-size: 24px;
  border: 2.5px solid var(--ink);
  border-radius: 55% 45% 50% 50% / 45% 55% 45% 55%;
  background: var(--orange-soft);
}
.steps li:nth-child(2) .num { background: var(--blue-soft); }
.steps li:nth-child(3) .num { background: var(--green-soft); }

.main { padding-top: 10px; }

.week { margin-top: 34px; }
.week-head { display: flex; align-items: baseline; gap: 14px; margin-bottom: 14px; flex-wrap: wrap; }
.week-head h2 { font-size: 38px; }
.week-head .range { font-size: 20px; color: var(--ink-soft); }

.days {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(158px, 1fr));
  gap: 18px;
  align-items: start;
}

.day {
  padding: 14px 12px 14px;
  min-height: 140px;
  transition: transform .2s;
}
.day:nth-child(odd) { transform: rotate(-.4deg); }
.day:nth-child(even) { transform: rotate(.5deg); }
.day:nth-child(3n)::before { border-radius: var(--wobble-b); }
.day.empty { background: rgba(255, 253, 248, .55); }
.day.empty .day-name, .day.empty .day-date { color: var(--ink-faint); }
.day.today .day-name::after {
  content: 'heute';
  font-family: var(--ui);
  font-size: 14px;
  margin-left: 6px;
  padding: 0 7px;
  border-radius: 999px;
  background: var(--yellow);
  vertical-align: middle;
}

.day-head { display: flex; align-items: baseline; justify-content: space-between; border-bottom: 2px dashed var(--paper-3); padding-bottom: 6px; margin-bottom: 10px; }
.day-name { font-family: var(--hand); font-weight: 700; font-size: 30px; line-height: 1; }
.day-date { font-size: 17px; color: var(--ink-soft); }
.day-free { font-size: 14px; color: var(--green); text-align: right; margin: -6px 0 6px; }
.day .none { color: var(--ink-faint); font-size: 16px; text-align: center; padding: 18px 0 6px; font-family: var(--hand); font-size: 22px; }

.slots { display: flex; flex-direction: column; gap: 8px; }

.slot {
  position: relative;
  appearance: none;
  font: inherit;
  font-size: 20px;
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 6px;
  padding: 6px 8px 5px;
  border: 2px solid var(--ink);
  border-radius: var(--wobble-a);
  background: #fffbe6;
  color: var(--ink);
  cursor: pointer;
  box-shadow: 2px 3px 0 var(--ink);
  transition: transform .12s, box-shadow .12s, background .15s;
}
.slot:nth-child(even) { border-radius: var(--wobble-b); background: #fff6ea; }
.slot .to { font-size: 15px; color: var(--ink-soft); }
.slot:hover { background: var(--yellow); transform: translateY(-2px) rotate(-1.5deg); box-shadow: 3px 5px 0 var(--ink); }
.slot:focus-visible { outline: 3px dashed var(--blue); outline-offset: 3px; }
.slot.selected { background: var(--orange); color: #fff; }
.slot.selected .to { color: #fff; }

.slot.taken {
  cursor: default;
  background: transparent;
  box-shadow: none;
  border-style: dashed;
  border-color: var(--ink-faint);
  color: var(--ink-faint);
  transform: none;
}
.slot.taken .to { color: var(--ink-faint); }
.slot.taken::after {
  content: '';
  position: absolute;
  left: 8%;
  right: 8%;
  top: 50%;
  height: 10px;
  margin-top: -5px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 10' preserveAspectRatio='none'%3E%3Cpath d='M2 6 Q 25 1 50 5 T 98 4' stroke='%23e5484d' stroke-width='2.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E") center / 100% 100% no-repeat;
}
.slot.just-taken { animation: wiggle .4s ease 2; }

/* gebuchte Termine: Vornamen + direkt in den Raum */
.slot.booked {
  flex-direction: column;
  align-items: stretch;
  gap: 1px;
  text-decoration: none;
  text-align: left;
  padding: 5px 10px 6px;
  background: #eef4ff;
  border-style: dashed;
  border-color: var(--ink-soft);
  box-shadow: none;
  font-size: 17px;
}
.slot.booked .when { display: flex; align-items: center; gap: 6px; font-size: 18px; color: var(--ink-soft); }
.slot.booked .who { font-family: var(--hand); font-weight: 700; font-size: 22px; line-height: 1.05; color: var(--ink); overflow: hidden; text-overflow: ellipsis; padding-right: .2em; }
.slot.booked .enter { font-size: 14px; color: var(--blue); }
.slot.booked:hover { background: var(--blue-soft); transform: translateY(-1px) rotate(-1deg); box-shadow: 2px 3px 0 var(--ink); border-style: solid; color: var(--ink); }
.slot.booked.live { background: var(--green-soft); border: 2.5px solid var(--green); box-shadow: 2px 3px 0 var(--green); animation: live-pulse 2s ease-in-out infinite; }
.slot.booked.live .enter { color: #1f7a43; font-weight: 700; font-size: 15px; }
.slot.booked .now { background: var(--green); color: #fff; border-radius: 999px; padding: 0 8px; font-size: 13px; }
.slot.booked.over { opacity: .5; }
@keyframes live-pulse { 50% { box-shadow: 2px 3px 0 var(--green), 0 0 0 5px rgba(63, 180, 107, .2); } }

fieldset.person { border: 2px dashed var(--paper-3); border-radius: 12px; padding: 6px 12px 12px; margin: 0 0 14px; min-width: 0; }
fieldset.person legend { font-family: var(--hand); font-weight: 700; font-size: 22px; padding: 0 6px; }
fieldset.person label { margin-top: 6px; }
.persons { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.persons[data-n="1"] { grid-template-columns: minmax(0, 1fr); max-width: 50%; }
.group-size { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 2px 0 12px; }
.group-size .gs-label { font-size: 17px; color: var(--ink-soft); margin-right: 4px; }
.gs-opt { position: relative; cursor: pointer; }
.gs-opt input { position: absolute; opacity: 0; pointer-events: none; }
.gs-opt span {
  display: inline-block;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: #fff;
  padding: 2px 14px 1px;
  font-size: 17px;
  box-shadow: 2px 2px 0 var(--ink);
}
.gs-opt input:checked + span { background: var(--yellow); }
.gs-opt input:focus-visible + span { outline: 3px dashed var(--blue); outline-offset: 2px; }
@media (max-width: 640px) { .persons, .persons[data-n="1"] { grid-template-columns: 1fr; max-width: none; } }
.tz-hint { margin-top: 12px; font-size: 16px; color: var(--ink-soft); background: var(--yellow); display: inline-block; padding: 2px 10px; border-radius: 8px; }

.legend { display: flex; gap: 26px; margin-top: 30px; color: var(--ink-soft); font-size: 17px; flex-wrap: wrap; }
.legend .lg { display: inline-block; width: 26px; height: 16px; border: 2px solid var(--ink); border-radius: var(--wobble-a); vertical-align: -2px; margin-right: 6px; background: #fffbe6; }
.legend .lg.taken { border-style: dashed; border-color: var(--ink-soft); background: #eef4ff; }
.legend .lg.live { border-color: var(--green); background: var(--green-soft); }

.loading { font-size: 30px; color: var(--ink-faint); padding: 40px 0; text-align: center; }

.empty-state { padding: 40px 30px; text-align: center; max-width: 560px; margin: 40px auto; }
.empty-state h2 { margin-bottom: 8px; }

/* Eigene Termine oben */
.mine {
  display: flex;
  gap: 18px;
  align-items: center;
  padding: 16px 22px;
  margin: 14px 0 8px;
  background: var(--green-soft);
  flex-wrap: wrap;
}
.mine .hand { font-size: 30px; }
.mine .when { font-size: 20px; }
.mine .arrive-mini { display: block; font-size: 15px; color: var(--ink-soft); }

/* „Bitte ein paar Minuten früher kommen“ */
.arrive-note {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  background: #fff6d6;
  border: 2px solid var(--ink);
  border-radius: 12px 9px 13px 10px;
  box-shadow: 2px 3px 0 rgba(45,42,50,.5);
  padding: 12px 14px;
  margin: 14px 0 16px;
  font-size: 17px;
  line-height: 1.35;
}
.arrive-note b { font-weight: 700; }
.arrive-icon { flex: none; width: 34px; height: 34px; }
.arrive-icon svg { width: 100%; height: 100%; }
.arrive-hint { display: flex; gap: 8px; align-items: center; margin: 0 0 12px; }
.arrive-hint svg { flex: none; width: 22px; height: 22px; }

/* Buchungsdialog */
.book-when { font-size: 22px; margin: 6px 0 18px; }
.book-when b { font-family: var(--hand); font-size: 32px; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.hp { position: absolute; left: -5000px; width: 1px; height: 1px; overflow: hidden; }
.form-error { color: var(--red); min-height: 1.4em; margin: 2px 0 8px; font-size: 18px; }

.success-head { display: flex; align-items: center; gap: 14px; }
.success-head svg { width: 70px; height: 70px; flex: none; }
.linkbox {
  display: flex;
  gap: 8px;
  align-items: center;
  background: var(--paper);
  border: 2px dashed var(--ink-faint);
  border-radius: 10px;
  padding: 8px 10px;
  margin: 6px 0 14px;
  font-size: 16px;
  word-break: break-all;
}
.linkbox code { flex: 1; font-family: ui-monospace, Menlo, monospace; font-size: 14px; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px; }

.foot { display: flex; gap: 12px; align-items: center; padding-top: 0; padding-bottom: 30px; font-size: 15px; flex-wrap: wrap; }

@media (max-width: 760px) {
  .hero { grid-template-columns: 1fr; }
  .hero-doodle { max-width: 200px; justify-self: center; order: -1; }
  .two { grid-template-columns: 1fr; }
  .days { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; }
  body { font-size: 17px; }
}

/* ---------- Dozent:in wählen ---------- */

.pick-title { font-size: 34px; margin: 6px 0 12px; }
.lec-pick { display: flex; flex-wrap: wrap; gap: 16px; margin-bottom: 28px; }
.lec-card {
  appearance: none;
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 220px;
  padding: 12px 22px 12px 16px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  text-align: left;
  cursor: pointer;
  box-shadow: 3px 4px 0 rgba(45,42,50,.8);
  transition: transform .12s, background .12s;
}
.lec-card:hover { transform: translateY(-2px) rotate(-.6deg); }
.lec-card .dot { width: 26px; height: 26px; border-radius: 50%; background: var(--lc); border: 2.5px solid var(--ink); flex: none; }
.lec-card .name { display: block; font-family: var(--hand); font-weight: 700; font-size: 32px; line-height: 1; }
.lec-card small { display: block; color: var(--ink-soft); font-size: 16px; margin-top: 3px; }
.lec-card.active {
  background: color-mix(in srgb, var(--lc) 18%, white);
  outline: 3px solid var(--lc);
  outline-offset: 3px;
  transform: rotate(-1deg);
}
.choose-first { font-size: 26px; color: var(--ink-soft); padding: 18px 4px 40px; }
#weeks { --lc: var(--blue); }
.book-lec { display: inline-flex; align-items: center; gap: 7px; margin-left: 12px; font-weight: 700; }
.book-lec .dot { width: 14px; height: 14px; border-radius: 50%; background: var(--lc); border: 2px solid var(--ink); }
@media (max-width: 640px) {
  .lec-card { min-width: 0; flex: 1 1 140px; }
  .pick-title { font-size: 28px; }
}

/* ---------- Reservierung während des Ausfüllens ---------- */

.slot.held {
  background: repeating-linear-gradient(-45deg, #f3eee2 0 6px, #fbf8f0 6px 12px);
  border-style: dashed;
  color: var(--ink-faint);
  box-shadow: none;
}
.slot.held:hover { background: repeating-linear-gradient(-45deg, #f3eee2 0 6px, #fbf8f0 6px 12px); transform: none; box-shadow: none; }
.slot .held-note { display: block; font-size: 13px; line-height: 1.1; color: var(--ink-faint); }
.slot.checking { cursor: progress; opacity: .6; }
.hold-info {
  display: inline-block;
  font-size: 16px;
  background: var(--green-soft);
  border: 1.5px solid var(--green);
  border-radius: 999px;
  padding: 2px 12px;
  margin: 0 0 8px;
}
.hold-info.soon { background: var(--orange-soft); border-color: var(--orange); }
.hold-info.over { background: var(--red-soft); border-color: var(--red); border-radius: 12px; }
