/* ===== Ticketshop – neue Terminübersicht und Platzauswahl ===== */

:root {
	--sp-text: #1c1c1c;
	--sp-leise: #6b6b6b;
	--sp-linie: #e2e2e2;
	--sp-flaeche: #f7f7f5;
	--sp-akzent: #004990;      /* Blau aus dem bisherigen Shop */
	--sp-ok: #1e8a4c;
	--sp-warn: #c26a00;
	--sp-fehler: #c0392b;
	--sp-radius: 10px;
}

/* ---------- Terminübersicht ---------- */
.to-liste { max-width: 900px; margin: 0 auto; padding: 8px 10px 20px; }
.to-ueberschrift { margin: 18px 0 4px; font-weight: bold; }
.to-faq { color: var(--sp-leise); font-size: 14px; margin-bottom: 16px; }
.to-hinweis { background: #fff6e6; border: 1px solid #f0c98a; color: #7a4a00; border-radius: var(--sp-radius); padding: 10px 14px; margin: 14px 0; font-size: 14px; }
.to-termin { display: flex; align-items: center; gap: 14px; padding: 12px; margin-bottom: 10px; border: 1px solid var(--sp-linie); border-radius: var(--sp-radius); background: #fff; color: var(--sp-text); text-decoration: none; transition: border-color .15s, box-shadow .15s; }
a.to-termin:hover, a.to-termin:focus { border-color: var(--sp-akzent); box-shadow: 0 2px 10px rgba(0, 73, 144, .12); text-decoration: none; color: var(--sp-text); }
.to-plakat { width: 72px; height: auto; border-radius: 6px; flex: none; }
.to-info { flex: 1; min-width: 0; }
.to-tag { font-size: 13px; color: var(--sp-leise); }
.to-datum { font-size: 22px; font-weight: bold; line-height: 1.2; }
.to-name { font-size: 16px; font-weight: bold; color: var(--sp-akzent); }
.to-zeit { font-size: 13px; color: var(--sp-leise); margin-top: 2px; }
.to-status { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; flex: none; text-align: right; }
.to-frei { font-size: 13px; font-weight: bold; padding: 3px 10px; border-radius: 99px; white-space: nowrap; }
.to-gruen { background: #e5f4ea; color: #17663a; }
.to-orange { background: #fdf0dc; color: #8a4b00; }
.to-rot { background: #fbe4e1; color: #9b2c1f; }
.to-los { font-size: 14px; font-weight: bold; color: var(--sp-akzent); white-space: nowrap; }
.to-ausverkauft { opacity: .65; }
@media (max-width: 520px) {
	.to-termin { gap: 10px; padding: 10px; align-items: flex-start; }
	.to-plakat { width: 56px; }
	.to-datum { font-size: 18px; }
	.to-status { gap: 6px; }
	.to-los { font-size: 13px; }
}

/* ---------- Platzauswahl ---------- */
.sp { max-width: 1240px; margin: 0 auto; padding: 0 8px 16px; color: var(--sp-text); }
.sp-kopf { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 8px 16px; margin: 0 0 10px; padding-top: 4px; }
.sp-tag { font-size: 13px; color: var(--sp-leise); }
.sp-titel { font-size: 22px; font-weight: bold; line-height: 1.2; }
.sp-zeit { font-size: 13px; color: var(--sp-leise); }
.sp-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 40px; padding: 8px 14px; border-radius: 8px; border: 1px solid #c9c9c9; background: #fff; color: var(--sp-text); font-size: 14px; font-weight: bold; cursor: pointer; text-decoration: none; white-space: nowrap; }
.sp-btn:hover, .sp-btn:focus { border-color: #888; text-decoration: none; color: var(--sp-text); }
.sp-btn-haupt { background: var(--sp-akzent); border-color: var(--sp-akzent); color: #fff; }
.sp-btn-haupt:hover, .sp-btn-haupt:focus { background: #003a73; color: #fff; }
.sp-btn-klein { min-height: 34px; padding: 4px 10px; font-size: 13px; }

.sp-legende { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; font-size: 13px; margin-bottom: 10px; }
.sp-leg { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.sp-leg i { width: 16px; height: 16px; border-radius: 5px 5px 4px 4px; display: inline-block; flex: none; }
.sp-leg small { color: var(--sp-leise); }

.sp-bereiche { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; margin-bottom: 10px; }
.sp-zone { text-align: left; padding: 8px 10px; border: 1px solid var(--sp-linie); border-radius: 8px; background: #fff; cursor: pointer; font-size: 13px; line-height: 1.3; color: var(--sp-text); }
.sp-zone:hover, .sp-zone:focus, .sp-zone.aktiv { border-color: var(--sp-akzent); outline: none; }
.sp-zone.aktiv { box-shadow: inset 0 0 0 1px var(--sp-akzent); }
.sp-zone b { display: block; font-size: 13px; }
.sp-zone em { font-style: normal; font-weight: bold; }
.sp-zone span { color: var(--sp-leise); }
.sp-balken { display: flex; height: 6px; border-radius: 3px; overflow: hidden; background: #dcdcdc; margin-top: 6px; }
.sp-balken i { display: block; height: 100%; }
.sp-zone.voll { opacity: .6; }
.sp-punkt { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: 0; }
.sp-bereiche-kat { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; }
.sp-bereiche-kat .sp-zone b { font-size: 14px; }
.sp-zone .sp-kurz { font-weight: normal; color: var(--sp-leise); }
.sp-nur-handy { display: none; }

.sp-werkzeug { display: flex; align-items: center; gap: 6px; margin-bottom: 6px; flex-wrap: wrap; }
.sp-werkzeug .sp-hinweis { font-size: 13px; color: var(--sp-leise); margin-left: 4px; }
.sp-frei-gesamt { margin-left: auto; font-size: 13px; color: var(--sp-leise); }

.sp-karte { position: relative; overflow: auto; border: 1px solid var(--sp-linie); border-radius: var(--sp-radius); background: var(--sp-flaeche); -webkit-overflow-scrolling: touch; overscroll-behavior: contain; }
.sp-flaeche { position: relative; margin: 0 auto; }
.sp-buehne { position: absolute; left: 18%; width: 64%; top: calc(var(--s) * .15); height: calc(var(--s) * 1); border-radius: 0 0 40% 40% / 0 0 100% 100%; background: #3a3a3a; color: #fff; font-size: max(10px, calc(var(--s) * .45)); font-weight: bold; letter-spacing: .15em; text-transform: uppercase; display: flex; align-items: center; justify-content: center; }
.sp-bl { position: absolute; left: calc(var(--x) * var(--s)); top: calc(var(--y) * var(--s)); font-size: max(10px, calc(var(--s) * .42)); font-weight: bold; color: var(--sp-leise); white-space: nowrap; }
.sp-rl { position: absolute; left: calc(var(--x) * var(--s)); top: calc(var(--y) * var(--s)); width: calc(var(--s) * 1); height: calc(var(--s) * .82); line-height: calc(var(--s) * .82); text-align: center; font-size: max(8px, calc(var(--s) * .36)); color: #9a9a9a; }
.sp-gang { position: absolute; left: calc(var(--x) * var(--s)); top: calc(var(--y) * var(--s)); width: calc(var(--w) * var(--s)); height: calc(var(--s) * .82); border-radius: 4px; background: #8d8d8d; color: #fff; font-size: max(8px, calc(var(--s) * .34)); display: flex; align-items: center; justify-content: center; overflow: hidden; }

.sp-p { transform: rotate(var(--rot, 0deg)); }
.sp-p { position: absolute; left: calc(var(--x) * var(--s)); top: calc(var(--y) * var(--s)); width: calc(var(--s) * .82); height: calc(var(--s) * .82); padding: 0; border: 0; border-radius: 32% 32% 24% 24%; font-size: 0; line-height: calc(var(--s) * .82); text-align: center; color: #fff; font-weight: bold; cursor: pointer; touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
.sp-f { background: var(--k); }
.sp-f:hover { filter: brightness(1.12); }
.sp-v { background: #d3d3d3; cursor: not-allowed; }
.sp-r { background: repeating-linear-gradient(45deg, #c8c8c8 0 2px, #fff 2px 4px); cursor: not-allowed; }
.sp-m { background: #161616; box-shadow: 0 0 0 max(1px, calc(var(--s) * .07)) #fff, 0 0 0 max(2px, calc(var(--s) * .15)) var(--k); z-index: 1; }
.sp-p.warte { animation: sp-warte .6s ease-in-out infinite alternate; cursor: progress; }
@keyframes sp-warte { from { opacity: .35; } to { opacity: .9; } }
.sp-p:focus-visible { outline: 2px solid var(--sp-akzent); outline-offset: 2px; }
.sp-zahlen .sp-p { font-size: calc(var(--s) * .36); }
.sp-zahlen .sp-v { color: transparent; }
.sp-zahlen .sp-r { color: #777; }
.sp-klein .sp-p { cursor: zoom-in; }

/* Einzelplatz-Regel */
.sp-luecke { animation: sp-puls 1.1s ease-in-out infinite; z-index: 2; }
@keyframes sp-puls {
	0%, 100% { box-shadow: 0 0 0 max(2px, calc(var(--s) * .1)) #e0302a; }
	50%      { box-shadow: 0 0 0 max(3px, calc(var(--s) * .2)) rgba(224, 48, 42, .35); }
}
.sp-regel { margin-top: 10px; padding: 10px 14px; border-radius: var(--sp-radius); background: #fff6e6; border: 1px solid #f0c98a; color: #7a4a00; font-size: 14px; line-height: 1.45; }
.sp-regel.nachdruck { background: #fbe4e1; border-color: #e7a49b; color: #8a2417; }
.sp-leg-regel { color: var(--sp-leise); font-style: italic; }

.sp-toast { min-height: 22px; margin: 8px 0 0; font-size: 14px; text-align: center; color: var(--sp-leise); }
.sp-toast.ok { color: var(--sp-ok); }
.sp-toast.fehler { color: var(--sp-fehler); font-weight: bold; }

.sp-korb { display: flex; align-items: center; gap: 10px 14px; flex-wrap: wrap; margin-top: 10px; padding: 12px 14px; border: 1px solid var(--sp-linie); border-radius: var(--sp-radius); background: #fff; }
.sp-korb-info { flex: 1; min-width: 180px; }
.sp-korb-summe { font-size: 17px; font-weight: bold; }
.sp-korb-klein { font-size: 12px; color: var(--sp-leise); }
.sp-timer { font-size: 13px; font-weight: bold; color: var(--sp-warn); margin-top: 2px; }
.sp-timer.knapp { color: var(--sp-fehler); }
.sp-korb-leer { color: var(--sp-leise); font-size: 14px; }
.sp-korb-knoepfe { display: flex; gap: 8px; margin-left: auto; }

@media (max-width: 699px) {
	.sp-karte { max-height: 440px; }
	.sp-titel { font-size: 19px; }
	.sp-bereiche { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
	.sp-zone { padding: 6px 8px; font-size: 12px; }
	.sp-zone b { font-size: 12px; }
	.sp-balken { height: 4px; margin-top: 4px; }
	.sp-legende { font-size: 12px; gap: 4px 10px; }
	.sp-leg-preis { display: none; }
	.sp-nur-pc { display: none; }
	.sp-nur-handy { display: inline-flex; }
	.sp-kopf { margin-bottom: 6px; }
	.sp-legende { gap: 3px 10px; margin-bottom: 8px; font-size: 11.5px; }
	.sp-leg i { width: 13px; height: 13px; }
	.sp-bereiche-kat { gap: 6px; margin-bottom: 8px; }
	.sp-bereiche-kat .sp-zone { padding: 5px 7px; }
	.sp-bereiche-kat .sp-zone b { font-size: 13px; white-space: nowrap; }
	.sp-bereiche-kat .sp-balken { height: 3px; margin-top: 4px; }
	.sp-werkzeug .sp-hinweis { width: 100%; margin-left: 0; font-size: 12px; }
	.sp-korb-knoepfe { width: 100%; }
	.sp-korb-knoepfe .sp-btn-haupt { flex: 1; }
	.sp-frei-gesamt { width: 100%; margin-left: 0; }

	/* Mobil: oben nur Titel/Datum und der Warenkorb mit „Weiter zur Kasse“, darunter der Plan,
	   alles Weitere (Knöpfe, Preis-Kacheln, Legende) unter dem Plan. */
	.sp { display: flex; flex-direction: column; }
	.sp-kopf     { order: 1; margin-bottom: 6px; flex-wrap: nowrap; align-items: center; }
	.sp-kopf > div:first-child { min-width: 0; }
	.sp-termin   { flex-shrink: 0; white-space: nowrap; }
	.sp-korb     { order: 2; margin: 0; padding: 8px 10px; }
	.sp-regel    { order: 3; margin-top: 6px; }
	.sp-toast    { order: 4; min-height: 0; margin: 4px 0; font-size: 13px; }
	.sp-karte    { order: 5; max-height: 380px; margin-top: 4px; }
	.sp-werkzeug { order: 6; margin: 8px 0 6px; }
	.sp-bereiche { order: 7; }
	.sp-legende  { order: 8; margin: 6px 0 0; }
	.sp-zeit { display: none; }
	.sp-tag  { font-size: 12px; }
	.sp-titel { font-size: 17px; line-height: 1.2; }
	.sp-frei-gesamt { display: none; }               /* steht schon in den Preis-Kacheln */
	.sp-werkzeug .sp-hinweis { display: none; }
	.sp-klein .sp-werkzeug .sp-hinweis { display: block; margin-top: 2px; }  /* nur der Zoom-Tipp */
	.sp-korb-info { min-width: 0; }
	.sp-korb-leer { font-size: 13px; }
}

/* Timer auf den Kassenseiten (header/showbasket) */
.res-timer { font-weight: bold; color: var(--sp-warn); }
.res-timer.knapp { color: var(--sp-fehler); }

/* ---------- Wartesymbol bei Seitenwechseln (Knopf/Link, der gerade lädt) ---------- */
.shop-laedt, .shop-laedt * { cursor: progress !important; }
.shop-btn-laedt { pointer-events: none; opacity: .85; }
.shop-btn-laedt::after { content: ''; display: inline-block; width: 1em; height: 1em; margin-left: .5em; vertical-align: -.15em; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: shop-dreh .7s linear infinite; }
@keyframes shop-dreh { to { transform: rotate(360deg); } }
