/* MYMA – Buchungs-Widget, Stundenplan und Terminseite (öffentlich + Mitglieder-App) */
.booking-section { background: var(--bg-soft); }
.booking-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 28px; align-items: start; }
.booking-aside { position: sticky; top: 96px; }
@media (max-width: 980px) { .booking-layout { grid-template-columns: 1fr; } .booking-aside { position: static; } }
.aside-steps { list-style: none; counter-reset: s; padding: 0; margin: 12px 0 0; }
.aside-steps li { counter-increment: s; position: relative; padding: 0 0 14px 40px; }
.aside-steps li::before { content: counter(s); position: absolute; left: 0; top: 0; width: 28px; height: 28px; border-radius: 50%; background: var(--ink); color: #fff; font-weight: 700; font-size: .85rem; display: grid; place-items: center; }
.aside-steps strong { display: block; color: var(--ink); }
.aside-steps span { font-size: .9rem; color: var(--muted); }

.booking-widget { background: #fff; border-radius: var(--radius-lg); border: 1px solid var(--line); box-shadow: var(--shadow); padding: clamp(18px, 3vw, 32px); scroll-margin-top: 90px; }
.bw-loading { padding: 40px 0; text-align: center; color: var(--muted); }
.bw-loading::before { content: ''; display: block; width: 28px; height: 28px; margin: 0 auto 10px; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--red); animation: bw-spin .8s linear infinite; }
@keyframes bw-spin { to { transform: rotate(360deg); } }

.bw-steps { list-style: none; display: flex; gap: 6px; padding: 0; margin: 0 0 22px; counter-reset: none; }
.bw-steps li { flex: 1; display: flex; align-items: center; gap: 8px; font-size: .88rem; font-weight: 600; color: var(--muted); padding-bottom: 10px; border-bottom: 3px solid var(--line); }
.bw-steps li span { width: 26px; height: 26px; border-radius: 50%; background: var(--bg-soft); display: grid; place-items: center; font-size: .8rem; flex: none; }
.bw-steps li.is-active { color: var(--ink); border-color: var(--red); }
.bw-steps li.is-active span { background: var(--red); color: #fff; }
.bw-steps li.is-done { color: var(--ink); border-color: var(--ink); }
.bw-steps li.is-done span { background: var(--ink); color: #fff; }
.bw-steps li.is-done svg { width: 14px; height: 14px; stroke: #fff; }
@media (max-width: 480px) { .bw-steps li { font-size: 0; gap: 0; justify-content: center; } .bw-steps li span { font-size: .8rem; } }

.bw-title { font-family: var(--font-display); font-size: clamp(1.5rem, 2.6vw, 1.9rem); text-transform: none; margin: 0 0 16px; }
.bw-cat { font-family: var(--font-body); font-size: .78rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin: 18px 0 10px; }
.bw-programs { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }
.bw-program { position: relative; display: flex; flex-direction: column; align-items: flex-start; text-align: left; gap: 2px; padding: 16px 40px 16px 20px; background: #fff; border: 1.5px solid var(--line); border-radius: 12px; cursor: pointer; font: inherit; color: var(--ink); overflow: hidden; transition: border-color .15s, transform .15s var(--ease), box-shadow .15s; }
.bw-program:hover, .bw-program:focus-visible { border-color: var(--c); transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.bw-program-band { position: absolute; left: 0; top: 0; bottom: 0; width: 5px; background: var(--c); }
.bw-program strong { font-size: 1.02rem; }
.bw-program span:not(.bw-program-band) { font-size: .85rem; color: var(--muted); }
.bw-program-arrow { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); }

.bw-selected { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 14px; border-radius: 10px; background: var(--bg-soft); margin-bottom: 18px; border-left: 4px solid var(--c); }
.bw-selected .btn { margin-left: auto; }
.bw-datebar { display: flex; flex-wrap: wrap; gap: 12px 18px; align-items: center; margin-bottom: 18px; }
.bw-from { display: flex; align-items: center; gap: 10px; font-weight: 600; color: var(--ink); }
.bw-from input { width: auto; min-width: 170px; }
.chip-row { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; border-radius: 99px; border: 1.5px solid var(--line-strong); background: #fff; color: var(--ink); font: inherit; font-size: .9rem; font-weight: 600; text-decoration: none; cursor: pointer; transition: .15s; }
.chip:hover { border-color: var(--ink); color: var(--ink); }
.chip.is-active { background: var(--ink); border-color: var(--ink); color: #fff; }

.bw-day { margin-bottom: 20px; }
.bw-day-title { font-family: var(--font-body); font-size: .95rem; font-weight: 700; color: var(--ink); margin: 0 0 8px; padding-bottom: 6px; border-bottom: 1px solid var(--line); }
.bw-day-slots { display: grid; gap: 8px; }
.bw-slot { display: grid; grid-template-columns: 74px minmax(0, 1fr) auto; gap: 14px; align-items: center; width: 100%; text-align: left; padding: 12px 14px 12px 16px; border: 1.5px solid var(--line); border-left: 5px solid var(--c); border-radius: 10px; background: #fff; font: inherit; color: var(--ink); cursor: pointer; transition: border-color .15s, box-shadow .15s, transform .15s var(--ease); }
button.bw-slot:hover { border-color: var(--ink); border-left-color: var(--c); box-shadow: var(--shadow-sm); transform: translateY(-1px); }
.bw-slot.is-static { cursor: default; }
.bw-slot.is-disabled { opacity: .55; cursor: not-allowed; background: var(--bg-soft); }
.bw-slot.is-mine { background: var(--green-soft); border-color: #b6e3c6; border-left-color: var(--c); }
.bw-slot-time { font-family: var(--font-display); font-size: 1.45rem; font-weight: 700; line-height: 1; }
.bw-slot-time small { display: block; font-family: var(--font-body); font-size: .75rem; color: var(--muted); font-weight: 500; margin-top: 4px; }
.bw-slot-info { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.bw-slot-info > span { font-size: .86rem; color: var(--muted); display: block; }
.bw-slot-info > span > .icon { display: inline-block; vertical-align: -3px; margin-right: 2px; }
.bw-slot-info .badge { align-self: flex-start; }
.bw-slot-free, .bw-slot-actions { display: flex; gap: 8px; align-items: center; justify-content: flex-end; flex-wrap: wrap; }
.bw-cap { display: flex !important; align-items: center; gap: 8px; }
.cap { width: 90px; height: 6px; border-radius: 9px; background: #e7e9ee; overflow: hidden; flex: none; }
.cap span { display: block; height: 100%; background: var(--green); border-radius: 9px; }
.cap span.high { background: var(--amber); }
.cap span.full { background: var(--red); }
@media (max-width: 560px) {
  .bw-slot { grid-template-columns: 62px minmax(0, 1fr); }
  .bw-slot-free, .bw-slot-actions { grid-column: 1 / -1; justify-content: flex-start; }
}

.bw-summary { display: flex; justify-content: space-between; gap: 14px; align-items: flex-start; flex-wrap: wrap; padding: 16px 18px; border-radius: 12px; background: var(--bg-dark); color: #c9ced6; margin-bottom: 22px; border-left: 5px solid var(--c); }
.bw-summary .eyebrow { margin-bottom: 4px; display: block; }
.bw-summary strong { display: block; color: #fff; font-size: 1.2rem; margin-bottom: 4px; }
.bw-summary span { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: .92rem; }
.bw-summary .btn { color: #fff; }
.bw-summary .btn:hover { background: rgba(255, 255, 255, .1); color: #fff; }
.bw-who, .bw-repeat { border: 0; padding: 0; margin: 0 0 16px; display: flex; flex-wrap: wrap; gap: 8px; }
.bw-who legend, .bw-repeat legend { width: 100%; margin-bottom: 8px; }
.seg { position: relative; cursor: pointer; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg span { display: inline-block; padding: 10px 18px; border-radius: 10px; border: 1.5px solid var(--line-strong); font-weight: 600; transition: .15s; }
.seg input:checked + span { border-color: var(--ink); background: var(--ink); color: #fff; }
.seg input:focus-visible + span { outline: 3px solid rgba(208, 32, 46, .45); outline-offset: 2px; }
.bw-contact-label { margin-top: 4px; }
.bw-wa span svg { color: #1fa855; vertical-align: -3px; }
.field-error { color: #b4141f; font-size: .85rem; margin: 5px 0 0; }

.bw-success { text-align: center; }
.bw-success .ticket-details { text-align: left; max-width: 520px; margin: 18px auto; }
.bw-success .ticket-actions { justify-content: center; }
.bw-success-icon { width: 76px; height: 76px; border-radius: 50%; background: var(--green-soft); color: var(--green); display: grid; place-items: center; margin: 0 auto 14px; }
.bw-success-icon .icon { width: 40px; height: 40px; stroke-width: 2.6; }

.bw-participants { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.seg-btn { display: inline-flex; align-items: center; gap: 6px; padding: 9px 16px; border-radius: 10px; border: 1.5px solid var(--line-strong); background: #fff; font: inherit; font-weight: 600; cursor: pointer; color: var(--ink); }
.seg-btn.is-active { background: var(--ink); border-color: var(--ink); color: #fff; }
.bw-program-filter { margin-bottom: 16px; }

.bw-sheet { position: fixed; inset: 0; z-index: 250; display: flex; align-items: flex-end; justify-content: center; }
.bw-sheet[hidden] { display: none; }
.bw-sheet-backdrop { position: absolute; inset: 0; background: rgba(17, 20, 24, .55); animation: bw-fade .2s; }
.bw-sheet-card { position: relative; width: 100%; max-width: 520px; background: #fff; border-radius: 18px 18px 0 0; padding: 24px 22px calc(22px + env(safe-area-inset-bottom)); box-shadow: var(--shadow-lg); animation: bw-up .25s var(--ease); }
@media (min-width: 640px) { .bw-sheet { align-items: center; } .bw-sheet-card { border-radius: 18px; } }
.bw-sheet-slot { border-left: 4px solid var(--c); padding: 8px 12px; background: var(--bg-soft); border-radius: 4px 10px 10px 4px; }
@keyframes bw-up { from { transform: translateY(40px); opacity: 0; } }
@keyframes bw-fade { from { opacity: 0; } }

/* Terminseite */
.ticket { background: #fff; border-radius: var(--radius-lg); box-shadow: var(--shadow); overflow: hidden; border: 1px solid var(--line); }
.ticket-head { background: var(--bg-dark); padding: 28px; border-top: 6px solid var(--c); }
.ticket-head h1 { color: #fff; font-size: clamp(2rem, 4vw, 2.8rem); margin-bottom: 10px; }
.ticket-head .badge { margin-right: 6px; }
.ticket-details { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0; margin: 0; }
.ticket-details > div { padding: 16px 28px; border-bottom: 1px solid var(--line); }
.ticket-details dt { font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 700; display: flex; align-items: center; gap: 6px; }
.ticket-details dd { margin: 4px 0 0; font-weight: 600; color: var(--ink); font-size: 1.05rem; }
.ticket-details.compact > div { padding: 10px 14px; }
@media (max-width: 560px) { .ticket-details { grid-template-columns: 1fr; } }
.ticket-actions { display: flex; flex-wrap: wrap; gap: 10px; padding: 20px 28px; }
.ticket-cancel { padding: 0 28px 24px; }

/* Stundenplan */
.plan-filter { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-bottom: 22px; }
.plan-filter select { width: auto; }
.plan-notices { margin-bottom: 18px; }
.week-plan { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; }
.week-day { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 14px 12px; }
.week-day.is-empty { background: transparent; border-style: dashed; }
.week-day-name { font-size: 1.15rem; text-transform: uppercase; margin: 0 0 10px; padding-bottom: 8px; border-bottom: 3px solid var(--red); }
.plan-item { display: block; padding: 10px 10px 10px 12px; border-radius: 8px; background: var(--bg-soft); border-left: 4px solid var(--c); text-decoration: none; color: var(--ink); margin-bottom: 8px; transition: transform .15s var(--ease), background .15s; }
.plan-item:hover { background: #fff; box-shadow: var(--shadow-sm); transform: translateY(-1px); color: var(--ink); }
.plan-time { display: block; font-family: var(--font-display); font-weight: 700; font-size: 1.1rem; }
.plan-item strong { display: block; font-size: .95rem; line-height: 1.25; }
.plan-meta { display: block; font-size: .78rem; color: var(--muted); margin-top: 2px; }
.plan-cta { display: none; font-size: .78rem; font-weight: 700; color: var(--red); margin-top: 4px; align-items: center; gap: 4px; }
.plan-item:hover .plan-cta { display: flex; }
@media (max-width: 1100px) { .week-plan { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 640px) { .week-plan { grid-template-columns: 1fr; } .week-day.is-empty { display: none; } .plan-cta { display: flex; } }

/* ---------- Stundenplan wie in der Schule (je Standort) ---------- */
.tt-locations { display: flex; flex-wrap: wrap; gap: 8px; width: 100%; }
.tt-locations .chip .icon { color: var(--red); }
.tt-locations .chip.is-active .icon { color: #fff; }
.tt-card { background: #0f1216; border-radius: 18px; overflow: hidden; box-shadow: var(--shadow-lg); margin-bottom: 28px; border: 1px solid #1f252d; }
.tt-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 14px; flex-wrap: wrap; padding: 22px 26px 18px; background: linear-gradient(120deg, #0b0d10 0%, #161b22 60%, #2a0f12 100%); border-bottom: 3px solid var(--red); position: relative; overflow: hidden; }
.tt-head::after { content: ''; position: absolute; right: -60px; top: -90px; width: 220px; height: 220px; border-radius: 50%; border: 26px solid rgba(208, 32, 46, .22); pointer-events: none; }
.tt-head h2 { color: #fff; margin: 0; font-size: clamp(1.6rem, 3vw, 2.2rem); }
.tt-kicker { display: block; color: var(--red); font-size: .74rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; margin-bottom: 4px; }
.tt-days { display: inline-flex; align-items: center; gap: 6px; color: #c9ced6; font-size: .9rem; font-weight: 600; position: relative; z-index: 1; }
.tt-days .icon { color: var(--red); }
.tt-scroll { overflow-x: auto; }
.tt { width: 100%; border-collapse: separate; border-spacing: 0; table-layout: fixed; min-width: 760px; }
.tt thead th { background: #0b0d10; color: #fff; font-family: var(--font-display); font-weight: 700; text-transform: uppercase; letter-spacing: .06em; font-size: 1.05rem; padding: 12px 10px; text-align: center; border-bottom: 1px solid #262c35; }
.tt thead th + th { border-left: 1px solid #1d232b; }
.tt .tt-timehead { width: 96px; color: #8a929e; font-size: .85rem; }
.tt-short { display: none; }
.tt tbody td, .tt tbody th { border-top: 1px solid #1d232b; vertical-align: top; }
.tt tbody td { background: #f6f7f9; padding: 8px; border-left: 1px solid #e3e6ea; }
.tt tbody tr:nth-child(even) td { background: #eef0f3; }
.tt-time { background: #161b22; color: #fff; font-family: var(--font-display); font-weight: 800; font-size: 1.35rem; text-align: center; padding: 14px 8px; font-variant-numeric: tabular-nums; letter-spacing: .02em; }
.tt-free { background-image: repeating-linear-gradient(135deg, transparent 0 10px, rgba(20, 24, 31, .025) 10px 20px); }
.tt-slot { display: block; position: relative; background: #fff; border-radius: 10px; padding: 10px 12px 10px 14px; text-decoration: none; color: var(--ink); border-left: 5px solid var(--c, var(--red)); box-shadow: 0 1px 2px rgba(20, 24, 31, .08); transition: transform .18s var(--ease), box-shadow .18s; }
.tt-slot + .tt-slot { margin-top: 8px; }
.tt-slot:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(20, 24, 31, .14); color: var(--ink); }
.tt-range { display: block; font-size: .78rem; font-weight: 700; color: var(--muted); font-variant-numeric: tabular-nums; }
.tt-slot strong { display: block; font-family: var(--font-display); font-size: 1.15rem; line-height: 1.1; text-transform: uppercase; letter-spacing: .01em; margin: 2px 0; }
.tt-meta { display: block; font-size: .76rem; color: var(--muted); line-height: 1.3; }
.tt-cta { display: inline-flex; align-items: center; gap: 3px; margin-top: 6px; font-size: .76rem; font-weight: 700; color: var(--red); opacity: .0; transform: translateY(-2px); transition: opacity .18s, transform .18s; }
.tt-slot:hover .tt-cta, .tt-slot:focus-visible .tt-cta { opacity: 1; transform: none; }
.tt-list { display: none; }
.tt-legend { display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: .88rem; color: var(--muted); }
.tt-legend > span { display: inline-flex; align-items: center; gap: 6px; }
@media (max-width: 1000px) { .tt-long { display: none; } .tt-short { display: inline; } }
@media (max-width: 760px) {
  .tt-scroll { display: none; }
  .tt-list { display: grid; gap: 14px; padding: 16px; }
  .tt-list-day h3 { color: #fff; font-size: 1.15rem; text-transform: uppercase; letter-spacing: .05em; margin: 0 0 8px; padding-left: 10px; border-left: 3px solid var(--red); }
  .tt-cta { opacity: 1; transform: none; }
  .tt-head { padding: 18px 18px 14px; }
}
