/* =========================================================
   PRIOR SKAVERA – Buchungsportal (Terminliste, Dialog, Ergebnisseiten)
   Nutzt die Variablen aus styles.css
   ========================================================= */

/* ---------- Abschnitt ---------- */
.booking-section { padding-block: clamp(3.5rem, 2.5rem + 4vw, 6rem); background: var(--bg); }
.booking-filters { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 1.5rem; }
.chip {
  min-height: 40px;
  padding: 0.45rem 1rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--petrol);
  font: 600 0.875rem/1 var(--font-head);
  cursor: pointer;
  touch-action: manipulation;
  transition: background-color 150ms ease, color 150ms ease, border-color 150ms ease, transform 160ms var(--ease-out);
}
.chip:active { transform: scale(0.97); }
.chip[aria-pressed="true"] { background: var(--petrol); border-color: var(--petrol); color: #fff; }
@media (hover: hover) and (pointer: fine) {
  .chip:hover:not([aria-pressed="true"]) { border-color: var(--petrol); }
}

.booking-list { display: grid; gap: 1rem; }
.booking-empty {
  padding: 2rem;
  border: 1px dashed #c9d5cd;
  border-radius: var(--radius);
  background: var(--surface);
  text-align: center;
  color: var(--muted);
}
.booking-empty p + p { margin-top: 0.5rem; }
.booking-empty strong { color: var(--petrol); }

/* Platzhalter während des Ladens */
.event-skeleton {
  height: 168px;
  border-radius: var(--radius);
  background: linear-gradient(90deg, #eef1ee 0%, #f7f9f6 40%, #eef1ee 80%) 0 0 / 300% 100%;
  animation: skeleton 1.4s linear infinite;
}
@keyframes skeleton { to { background-position: -150% 0; } }

/* ---------- Terminkarte ---------- */
.event-card {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 1rem 1.25rem;
  padding: 1.25rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  animation: card-in 400ms var(--ease-out) both;
  animation-delay: calc(var(--i, 0) * 50ms);
}
@keyframes card-in { from { opacity: 0; transform: translateY(8px); } }
.event-card[data-state="closed"] { opacity: 0.75; }

.event-date {
  display: grid;
  justify-items: center;
  align-content: start;
  gap: 0.1rem;
  padding: 0.75rem 0.25rem;
  border-radius: var(--radius-sm);
  background: var(--petrol);
  color: #fff;
  text-align: center;
  height: fit-content;
}
.ed-weekday { font: 700 0.6875rem/1 var(--font-head); letter-spacing: 0.12em; text-transform: uppercase; color: var(--green-300); }
.ed-day { font: 800 1.875rem/1 var(--font-head); font-variant-numeric: tabular-nums; }
.ed-month { font-size: 0.75rem; color: var(--on-dark-muted); }

.event-main { min-width: 0; }
.event-cat { font: 700 0.75rem/1.2 var(--font-head); letter-spacing: 0.12em; text-transform: uppercase; color: var(--green-700); margin-bottom: 0.35rem; }
.event-main h3 { font-size: clamp(1.125rem, 1rem + 0.5vw, 1.3125rem); }
.event-meta { display: flex; flex-wrap: wrap; gap: 0.15rem 1rem; margin-top: 0.4rem; font-size: 0.9375rem; color: var(--petrol); font-weight: 500; }
.event-meta span + span::before { content: "·"; margin-right: 1rem; color: var(--muted); }
.event-summary { margin-top: 0.6rem; color: var(--muted); font-size: 0.9375rem; }
.event-note {
  display: inline-block;
  margin-top: 0.6rem;
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  background: var(--green-50);
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--green-700);
}

.event-more { margin-top: 0.75rem; }
.event-more summary {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font: 700 0.875rem/1.2 var(--font-head);
  color: var(--green-700);
  cursor: pointer;
  list-style: none;
}
.event-more summary::-webkit-details-marker { display: none; }
.event-more summary::after {
  content: "";
  width: 16px;
  height: 16px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m7 10 5 5 5-5' fill='none' stroke='%232f6a0c' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
  transition: transform 200ms var(--ease-out);
}
.event-more[open] summary::after { transform: rotate(180deg); }
.event-more-body { margin-top: 0.75rem; padding-top: 0.75rem; border-top: 1px solid var(--line); font-size: 0.9375rem; color: var(--text); }
.event-facts { display: grid; gap: 0.4rem; margin: 0.75rem 0 0; }
.event-facts div { display: grid; grid-template-columns: 8.5rem minmax(0, 1fr); gap: 1rem; }
.event-facts dt { color: var(--muted); }
.event-facts dd { margin: 0; }
@media (max-width: 520px) { .event-facts div { grid-template-columns: 1fr; gap: 0; } }

.event-side { grid-column: 1 / -1; display: grid; gap: 0.9rem; align-content: start; }
.event-price { display: grid; gap: 0.1rem; }
.ep-main { font: 800 1.375rem/1.2 var(--font-head); color: var(--petrol); font-variant-numeric: tabular-nums; }
.ep-sub { font-size: 0.8125rem; color: var(--muted); }

.seats p { margin-top: 0.4rem; font-size: 0.8125rem; font-weight: 600; color: var(--green-700); }
.seats[data-state="few"] p { color: #9a5b00; }
.seats[data-state="full"] p, .seats[data-state="closed"] p { color: var(--muted); }
.seats-bar { height: 6px; overflow: hidden; border-radius: 999px; background: #e7ece8; }
.seats-bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--green);
  transform-origin: left center;
  animation: seats-in 700ms var(--ease-out) both;
  animation-delay: calc(150ms + var(--i, 0) * 50ms);
}
.seats[data-state="few"] .seats-bar span { background: #d08a12; }
.seats[data-state="full"] .seats-bar span { background: #9aa8ae; }
@keyframes seats-in { from { transform: scaleX(0); } }
.event-side .btn { width: 100%; }

@media (min-width: 760px) {
  .event-card { grid-template-columns: 84px minmax(0, 1fr) 240px; padding: 1.5rem; gap: 1.5rem; }
  .event-side { grid-column: auto; padding-left: 1.5rem; border-left: 1px solid var(--line); }
}

/* ---------- Dialog ---------- */
html.dialog-open { overflow: hidden; }
.booking-dialog {
  width: min(680px, calc(100vw - 2rem));
  max-height: min(92dvh, 900px);
  padding: 0;
  border: 0;
  border-radius: calc(var(--radius) + 4px);
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 40px 80px -24px rgb(11 37 51 / 0.5);
  overflow: hidden;
  opacity: 1;
  transform: none;
  transition: opacity 200ms var(--ease-out), transform 200ms var(--ease-out);
}
.booking-dialog[data-state="closed"] { opacity: 0; transform: scale(0.96); transition-duration: 150ms; }
.booking-dialog::backdrop { background: rgb(11 37 51 / 0.55); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); transition: opacity 200ms ease; }
.booking-dialog[data-state="closed"]::backdrop { opacity: 0; }

.bd-panel { display: flex; flex-direction: column; max-height: inherit; overflow-y: auto; overscroll-behavior: contain; }
.bd-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; padding: 1.5rem 1.5rem 1rem; background: var(--petrol); color: #fff; }
.bd-kicker { font: 700 0.6875rem/1.2 var(--font-head); letter-spacing: 0.16em; text-transform: uppercase; color: var(--green-300); }
.bd-head h2 { margin-top: 0.35rem; font-size: clamp(1.125rem, 1rem + 0.6vw, 1.375rem); color: #fff; }
.bd-date { margin-top: 0.25rem; font-size: 0.875rem; color: var(--on-dark-muted); }
.bd-close {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border: 1px solid rgb(255 255 255 / 0.25);
  border-radius: 50%;
  background: rgb(255 255 255 / 0.08) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 6l12 12M18 6 6 18' stroke='white' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E") center / 18px no-repeat;
  cursor: pointer;
  transition: background-color 150ms ease, transform 160ms var(--ease-out);
}
.bd-close:active { transform: scale(0.94); }
@media (hover: hover) and (pointer: fine) { .bd-close:hover { background-color: rgb(255 255 255 / 0.18); } }
.bd-success .bd-close, .bd-panel > .bd-close { position: absolute; top: 1rem; right: 1rem; border-color: var(--line); background-color: var(--bg); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 6l12 12M18 6 6 18' stroke='%2312364a' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E"); }

.bd-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.5rem; padding: 0.9rem 1.5rem; background: var(--petrol); border-top: 1px solid rgb(255 255 255 / 0.08); }
.bd-steps li { display: flex; align-items: center; gap: 0.5rem; font-size: 0.8125rem; color: var(--on-dark-muted); min-width: 0; }
.bd-steps span {
  flex-shrink: 0;
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 1.5px solid rgb(255 255 255 / 0.3);
  font: 700 0.75rem/1 var(--font-head);
  transition: background-color 200ms ease, border-color 200ms ease, color 200ms ease;
}
.bd-steps li[aria-current="step"] { color: #fff; font-weight: 600; }
.bd-steps li[aria-current="step"] span { background: var(--green-300); border-color: var(--green-300); color: var(--petrol-900); }
.bd-steps li.is-done span { background: var(--green); border-color: var(--green); color: #fff; }
@media (max-width: 520px) {
  .bd-steps li:not([aria-current="step"]) { font-size: 0; gap: 0; }
  .bd-steps li { justify-content: center; }
  .bd-steps li[aria-current="step"] { justify-content: flex-start; }
}

.bd-form { display: flex; flex-direction: column; min-height: 0; }
.bd-body { display: grid; gap: 1rem; padding: 1.5rem; animation: step-in 220ms var(--ease-out); }
.bd-body[data-dir="1"] { --dx: 12px; }
.bd-body[data-dir="-1"] { --dx: -12px; }
@keyframes step-in { from { opacity: 0; transform: translateX(var(--dx, 0)); } }
.bd-foot {
  position: sticky;
  bottom: 0;
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 1rem 1.5rem calc(1rem + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid var(--line);
  background: rgb(255 255 255 / 0.96);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}
.bd-foot .btn-primary { min-width: 11rem; }
.btn.is-loading { cursor: progress; opacity: 0.8; }
.step-intro { color: var(--muted); font-size: 0.9375rem; }

.booking-dialog .field-row { display: grid; gap: 1rem; }
@media (min-width: 560px) {
  .booking-dialog .field-row { grid-template-columns: 1fr 1fr; }
  .booking-dialog .field-row--zip { grid-template-columns: 8rem 1fr; }
}
.booking-dialog .field label { font-size: 0.875rem; }
.booking-dialog textarea { min-height: 90px; }
.booking-dialog .field-error:empty { display: none; }

/* Anzahl Teilnehmende */
.stepper-row { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 1rem; padding: 1rem 1.1rem; border-radius: var(--radius-sm); background: var(--bg); }
.stepper-label { font: 700 0.9375rem/1.2 var(--font-head); color: var(--petrol); margin-right: auto; }
.stepper { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); }
.stepper button {
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--petrol);
  font: 600 1.25rem/1 var(--font-head);
  cursor: pointer;
  touch-action: manipulation;
  transition: background-color 150ms ease, transform 160ms var(--ease-out);
}
.stepper button:active:not(:disabled) { transform: scale(0.92); }
.stepper button:disabled { color: #b4c0c5; cursor: not-allowed; }
@media (hover: hover) and (pointer: fine) { .stepper button:hover:not(:disabled) { background: var(--green-50); } }
.stepper output { min-width: 2rem; text-align: center; font: 800 1.125rem/1 var(--font-head); color: var(--petrol); font-variant-numeric: tabular-nums; }
.stepper-hint { width: 100%; font-size: 0.8125rem; color: var(--muted); }

.pt-row { position: relative; display: grid; gap: 1rem; margin: 0; padding: 1rem 1.1rem 1.1rem; border: 1px solid var(--line); border-radius: var(--radius-sm); animation: card-in 250ms var(--ease-out); }
.pt-row legend { padding: 0 0.4rem; margin-left: -0.4rem; font: 700 0.8125rem/1 var(--font-head); letter-spacing: 0.06em; text-transform: uppercase; color: var(--green-700); }
.pt-remove { position: absolute; top: -0.55rem; right: 0.75rem; padding: 0 0.4rem; border: 0; background: var(--surface); color: var(--muted); font-size: 0.8125rem; cursor: pointer; text-decoration: underline; }
@media (hover: hover) and (pointer: fine) { .pt-remove:hover { color: #b3261e; } }

/* Zusammenfassung */
.sum { display: grid; gap: 0; border: 1px solid var(--line); border-radius: var(--radius-sm); overflow: hidden; }
.sum section { position: relative; padding: 1rem 1.1rem; }
.sum section + section { border-top: 1px solid var(--line); }
.sum h3 { font-size: 0.75rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); margin-bottom: 0.35rem; }
.sum p, .sum li { font-size: 0.9375rem; color: var(--petrol); }
.sum ul { display: grid; gap: 0.15rem; }
.sum .link { position: absolute; top: 0.95rem; right: 1.1rem; }
.link { padding: 0; border: 0; background: none; color: var(--green-700); font: 600 0.8125rem/1.2 var(--font-body); text-decoration: underline; cursor: pointer; }
.sum-price-wrap { background: var(--bg); }
.sum-price { width: 100%; border-collapse: collapse; font-size: 0.9375rem; font-variant-numeric: tabular-nums; }
.sum-price td { padding: 0.2rem 0; color: var(--petrol); }
.sum-price td:last-child { text-align: right; }
.sum-total td { padding-top: 0.5rem; border-top: 1px solid var(--line); font: 800 1.0625rem/1.3 var(--font-head); }
.sum-note { font-size: 0.8125rem; color: var(--muted); line-height: 1.55; }
.sum-price-wrap .sum-note { margin-top: 0.5rem; }
.consents { display: grid; gap: 0.75rem; }
.status-actions { display: inline-flex; flex-wrap: wrap; gap: 0.25rem 1rem; margin-left: 0.25rem; }
.status-actions .link { font-size: 0.875rem; }

/* Erfolg */
.bd-panel:has(.bd-success) { position: relative; }
.bd-success { display: grid; justify-items: center; gap: 1rem; padding: 3rem 1.75rem 2.25rem; text-align: center; }
.bd-success h2 { max-width: 26rem; font-size: clamp(1.25rem, 1.1rem + 0.8vw, 1.625rem); }
.bd-success p { max-width: 30rem; color: var(--muted); }
.bd-success .btn { margin-top: 0.5rem; min-width: 10rem; }
.bd-success-icon, .result-icon {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--green-50);
  animation: pop-in 400ms var(--ease-out) both;
}
.bd-success-icon::before, .result-icon::before {
  content: "";
  width: 30px;
  height: 30px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m5 12.5 4.5 4.5L19 7.5' fill='none' stroke='%232f6a0c' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
}
@keyframes pop-in { from { opacity: 0; transform: scale(0.9); } }

/* Mobil: Dialog als Bottom-Sheet */
@media (max-width: 599px) {
  .booking-dialog {
    width: 100vw;
    max-width: 100vw;
    max-height: 94dvh;
    margin: auto 0 0;
    border-radius: 18px 18px 0 0;
    transition: transform 320ms var(--ease-drawer, cubic-bezier(0.32, 0.72, 0, 1)), opacity 200ms ease;
  }
  .booking-dialog[data-state="closed"] { opacity: 1; transform: translateY(100%); transition-duration: 220ms; }
  .bd-head { padding: 1.25rem 1.25rem 0.85rem; }
  .bd-steps { padding: 0.75rem 1.25rem; }
  .bd-body { padding: 1.25rem; }
  .bd-foot { padding-inline: 1.25rem; }
  .bd-foot .btn-primary { min-width: 0; flex: 1; }
}

/* ---------- Ergebnisseiten (Bestätigungslink, Installation) ---------- */
.booking-page { min-height: 100dvh; }
.booking-result { padding-block: clamp(2.5rem, 2rem + 4vw, 5rem); display: grid; justify-items: center; }
.result-card {
  width: 100%;
  max-width: 640px;
  display: grid;
  gap: 1rem;
  padding: clamp(1.75rem, 1.25rem + 2vw, 2.75rem);
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 4px);
  background: var(--surface);
  box-shadow: var(--shadow-md);
}
.result-card h1 { font-size: clamp(1.5rem, 1.2rem + 1.4vw, 2.125rem); }
.result-card .eyebrow { margin-bottom: 0; }
.result-card.is-error { border-top: 4px solid #b3261e; }
.result-card.is-success { border-top: 4px solid var(--green); }
.result-facts { display: grid; gap: 0.5rem; margin: 0.5rem 0 0; padding: 1rem 1.1rem; border-radius: var(--radius-sm); background: var(--bg); }
.result-facts div { display: grid; grid-template-columns: 8rem minmax(0, 1fr); gap: 1rem; }
.result-facts dt { color: var(--muted); }
.result-facts dd { margin: 0; color: var(--petrol); font-weight: 600; }
.result-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 0.5rem; }
.install-form { margin-top: 0.5rem; }
.result-card code { padding: 0.1rem 0.35rem; border-radius: 4px; background: var(--bg); font-size: 0.9em; }

@media (prefers-reduced-motion: reduce) {
  .event-card, .seats-bar span, .bd-body, .pt-row, .bd-success-icon, .result-icon, .event-skeleton { animation: none; }
  .booking-dialog, .booking-dialog[data-state="closed"] { transform: none; transition: opacity 150ms ease; }
}

/* Datumsfeld wie die übrigen Eingabefelder */
.booking-dialog input[type="date"] {
  width: 100%;
  min-height: 48px;
  padding: 0.7rem 0.9rem;
  border: 1.5px solid #c9d5cd;
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
  font: 400 16px/1.4 var(--font-body);
  -webkit-appearance: none;
  appearance: none;
}
.booking-dialog input[type="date"]:focus-visible { outline: none; border-color: var(--green); box-shadow: 0 0 0 3px rgb(59 122 8 / 0.2); }
.booking-dialog [aria-invalid="true"] { border-color: #b3261e !important; }
@media (max-width: 759px) {
  .event-meta { flex-direction: column; }
  .event-meta span + span::before { content: none; }
}
.event-online { display: inline-block; margin-left: 0.5rem; padding: 0.1rem 0.5rem; border-radius: 999px; background: #e3f0f6; color: #0f5873; font-size: 0.6875rem; letter-spacing: 0.08em; vertical-align: 1px; }
.event-cat .event-online:first-child { margin-left: 0; }

.course-rich { overflow-wrap: anywhere; }
.course-rich p, .course-rich div { margin-top: 0; margin-bottom: .55em; }
.course-rich > :last-child { margin-bottom: 0; }
.course-rich ul, .course-rich ol { padding-left: 1.4em; margin-block: .5em; }
.course-rich strong, .course-rich b { font-weight: 700; }
.course-rich span, .course-rich p, .course-rich div { line-height: 1.5; }
.course-public-title { font-family: var(--font-head); color: var(--petrol); font-size: clamp(1.125rem, 1rem + .5vw, 1.3125rem); font-weight: 700; }
.course-public-image { display: block; width: 100%; max-height: 260px; object-fit: contain; object-position: left center; border-radius: var(--radius-sm, 8px); margin-bottom: 1rem; }
.event-facts dd { overflow-wrap: anywhere; }

/* ---------- Kalenderansicht ---------- */
.booking-viewbar { display: flex; justify-content: flex-end; margin-bottom: 1rem; }
.view-switch { display: inline-flex; gap: 0.25rem; padding: 0.25rem; border-radius: 999px; background: #e6ece7; }
.view-switch button { display: inline-flex; align-items: center; gap: 0.45rem; min-height: 38px; padding: 0.4rem 1rem; border: 0; border-radius: 999px; background: transparent; color: var(--petrol); font: 600 0.875rem/1 var(--font-head); cursor: pointer; touch-action: manipulation; transition: background-color 180ms var(--ease-out), box-shadow 180ms var(--ease-out); }
.view-switch svg:not([fill="none"]) { fill: currentColor; }
.booking-list[hidden] { display: none; }
.view-switch button[aria-pressed="true"] { background: var(--surface); box-shadow: 0 1px 3px rgb(18 54 74 / 0.12); }
.view-switch button:focus-visible { outline: 3px solid var(--green); outline-offset: 2px; }
.booking-viewbar:has(+ .booking-filters:not([hidden])) { margin-bottom: 0.75rem; }

.booking-cal { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(0.75rem, 0.4rem + 1.5vw, 1.5rem); box-shadow: var(--shadow-sm); }
.booking-cal[hidden] { display: none; }
.cal-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; }
.cal-title { font: 700 clamp(1.125rem, 1rem + 0.5vw, 1.375rem)/1.2 var(--font-head); color: var(--petrol); margin: 0; outline: none; }
.cal-nav { display: grid; place-items: center; width: 44px; height: 44px; border: 1px solid var(--line); border-radius: 50%; background: var(--surface); color: var(--petrol); cursor: pointer; transition: border-color 150ms ease, transform 160ms var(--ease-out); }
.cal-nav:active:not(:disabled) { transform: scale(0.94); }
.cal-nav:disabled { opacity: 0.35; cursor: default; }
@media (hover: hover) and (pointer: fine) { .cal-nav:hover:not(:disabled) { border-color: var(--petrol); } }

.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.cal-wd { padding: 0.5rem 0.6rem; font: 700 0.75rem/1 var(--font-head); letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); background: #f8faf7; }
.cal-day { min-height: 108px; padding: 0.4rem; display: flex; flex-direction: column; gap: 0.3rem; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); min-width: 0; }
.cal-day.is-out { background: #fafbfa; }
.cal-num { font: 600 0.8125rem/1 var(--font-head); color: var(--muted); padding: 0.25rem 0.3rem; align-self: flex-start; border-radius: 999px; min-width: 1.7rem; text-align: center; }
.cal-day.is-today .cal-num, .cal-day.is-today.has-events .cal-num { background: var(--petrol); color: #fff; }
.cal-day.has-events .cal-num { color: var(--petrol); }
.cal-ev { display: grid; gap: 0.1rem; width: 100%; padding: 0.35rem 0.45rem; border: 0; border-left: 3px solid var(--green); border-radius: 6px; background: var(--green-50); color: var(--petrol); text-align: left; cursor: pointer; font: inherit; transition: background-color 150ms ease, transform 160ms var(--ease-out); }
.cal-ev:active:not(:disabled) { transform: scale(0.98); }
.cal-ev-time { font: 700 0.6875rem/1.2 var(--font-head); color: var(--green-700); }
.cal-ev-title { font-size: 0.75rem; line-height: 1.3; font-weight: 600; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.cal-ev[data-state="full"] { border-left-color: #c47f0a; background: #fff6e2; }
.cal-ev[data-state="full"] .cal-ev-time { color: #8a5a00; }
.cal-ev[data-state="closed"] { border-left-color: #9aa9a0; background: #f0f3f1; color: var(--muted); cursor: default; }
.cal-ev[data-state="closed"] .cal-ev-time { color: var(--muted); }
@media (hover: hover) and (pointer: fine) { .cal-ev:not(:disabled):hover { background: #e2efd6; } .cal-ev[data-state="full"]:hover { background: #ffedc4; } }
.cal-ev:focus-visible { outline: 3px solid var(--green); outline-offset: 1px; }
.cal-dots { display: none; }

.cal-legend { display: flex; flex-wrap: wrap; gap: 0.4rem 1.25rem; margin-top: 0.85rem; font-size: 0.8125rem; color: var(--muted); }
.cal-legend span { display: inline-flex; align-items: center; gap: 0.4rem; }
.cal-legend i, .cal-dots i { width: 9px; height: 9px; border-radius: 50%; background: var(--green); display: inline-block; }
.cal-legend i[data-state="full"], .cal-dots i[data-state="full"] { background: #c47f0a; }
.cal-legend i[data-state="closed"], .cal-dots i[data-state="closed"] { background: #9aa9a0; }

.cal-agenda { display: none; margin-top: 1.25rem; padding-top: 1rem; border-top: 1px solid var(--line); }
.cal-agenda h4 { margin: 0 0 0.75rem; font: 700 1rem/1.3 var(--font-head); color: var(--petrol); }
.cal-item { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 0.75rem; align-items: center; padding: 0.7rem 0; border-bottom: 1px solid var(--line); }
.cal-item:last-child { border-bottom: 0; }
.cal-item-date { display: grid; justify-items: center; width: 2.75rem; padding: 0.35rem 0; border-radius: 10px; background: var(--green-50); color: var(--green-700); font: 600 0.6875rem/1.1 var(--font-head); text-transform: uppercase; }
.cal-item-date b { font-size: 1.125rem; color: var(--petrol); }
.cal-item[data-state="full"] .cal-item-date { background: #fff6e2; color: #8a5a00; }
.cal-item[data-state="closed"] .cal-item-date { background: #f0f3f1; color: var(--muted); }
.cal-item-main { display: grid; gap: 0.15rem; min-width: 0; }
.cal-item-main strong { color: var(--petrol); font-size: 0.9375rem; line-height: 1.3; overflow-wrap: anywhere; }
.cal-item-main small { color: var(--muted); font-size: 0.8125rem; }
.cal-item .btn { min-height: 40px; padding: 0.45rem 0.95rem; font-size: 0.875rem; }

/* Smartphone: Punkte im Raster, Termine als Liste darunter */
@media (max-width: 720px) {
  .booking-viewbar { justify-content: stretch; }
  .view-switch { width: 100%; } .view-switch button { flex: 1; justify-content: center; }
  .cal-wd { padding: 0.4rem 0; text-align: center; font-size: 0.6875rem; letter-spacing: 0.04em; }
  .cal-day { min-height: 52px; align-items: center; padding: 0.3rem 0.1rem; gap: 0.25rem; }
  .cal-num { align-self: center; }
  .cal-ev { display: none; }
  .cal-dots { display: flex; gap: 3px; justify-content: center; }
  .cal-agenda { display: block; }
  .cal-item { grid-template-columns: auto minmax(0, 1fr); }
  .cal-item .btn { grid-column: 1 / -1; width: 100%; }
}
@media (prefers-reduced-motion: reduce) { .view-switch button, .cal-nav, .cal-ev { transition: none; } }
