/* =========================================================
   Traumtänzer App – Design-Tokens (aus Claude-Design-Entwurf)
   ========================================================= */
:root {
	--tt-magenta: #851159;
	--tt-magenta-dark: #650D44;
	--tt-banner-yellow: #FCE008;
	--tt-gold: #E8A93A;
	--tt-dark: #3B2E45;
	--tt-cream: #EDE7E1;
	--tt-card: #FAF7F2;
	--tt-white: #FFFFFF;
	--tt-text: #2A2330;
	--tt-text-muted: #8A8290;
	--tt-line: #E4DDD4;
	--tt-success: #3E8E5A;

	--tt-radius-lg: 22px;
	--tt-radius-md: 16px;
	--tt-radius-sm: 12px;
	--tt-radius-pill: 999px;

	--tt-shadow: 0 8px 24px rgba(59, 46, 69, 0.08);
	--tt-shadow-hero: 0 14px 30px rgba(133, 17, 89, 0.28);

	--tt-font-heading: 'Poppins', -apple-system, BlinkMacSystemFont, sans-serif;
	--tt-font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;

	--tt-tabbar-height: 68px;
	--tt-safe-bottom: env(safe-area-inset-bottom, 0px);
	--tt-safe-top: env(safe-area-inset-top, 0px);
	--tt-max-width: 480px;
}

/* =========================================================
   Reset & Grundgerüst
   ========================================================= */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
	margin: 0;
	background: var(--tt-cream);
	color: var(--tt-text);
	font-family: var(--tt-font-body);
	font-size: 15px;
	line-height: 1.45;
	-webkit-font-smoothing: antialiased;
	overscroll-behavior-y: none;
}
h1, h2, h3, h4 { font-family: var(--tt-font-heading); margin: 0; color: var(--tt-dark); }
p { margin: 0; }
a { color: inherit; text-decoration: none; -webkit-tap-highlight-color: transparent; }
button { font-family: inherit; -webkit-tap-highlight-color: transparent; }
img { max-width: 100%; display: block; }

/* aktive Tap-Zustände statt blauer Browser-Highlights, wie in nativen Apps */
a, button, .tt-tabbar__item, .tt-quick-tile, .tt-menu-row {
	touch-action: manipulation;
}
a:active, button:active {
	opacity: 0.72;
	transition: opacity .08s ease;
}

.tt-app {
	max-width: var(--tt-max-width);
	margin: 0 auto;
	min-height: 100vh;
	background: var(--tt-cream);
	position: relative;
	padding-bottom: calc(var(--tt-tabbar-height) + var(--tt-safe-bottom) + 22px);
	/* Sicherheitsnetz (04.08.2026): auf schmalen Mobil-Viewports faellt es
	   nicht auf, wenn ein einzelnes Element (z. B. ein unerwartetes Bild aus
	   einem ttmember-Shortcode) breiter als der Container ist - auf
	   Desktop-Breiten wird das sofort sichtbar, weil rechts/links davon der
	   graue Desktop-Hintergrund liegt. overflow-x:hidden schneidet so etwas
	   zuverlaessig ab, statt die App-Breite zu sprengen. */
	overflow-x: hidden;
}

.tt-screen { padding: 20px 20px 0; display: flex; flex-direction: column; gap: 28px; }

/* =========================================================
   Kopfbereich: gelbes Logo-Banner + Icon-Zeile (Anrufen/eMail/Menü),
   erscheint auf jeder Seite, ganz oben in der App.
   ========================================================= */
.tt-site-header {
	background: var(--tt-banner-yellow);
	display: flex;
	align-items: center;
	justify-content: center;
	padding: calc(var(--tt-safe-top) + 20px) 24px 20px;
}
.tt-site-header__logo-link { display: block; }
.tt-site-header__logo { max-width: 230px; width: 100%; height: auto; }

.tt-icon-row {
	display: flex;
	background: var(--tt-white);
	border-bottom: 1px solid var(--tt-line);
}
.tt-icon-row__item {
	flex: 1;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 4px;
	padding: 12px 6px;
	border: none;
	background: transparent;
	color: var(--tt-text-muted);
	font-size: 10.5px;
	font-weight: 600;
	text-align: center;
	line-height: 1.2;
}
.tt-icon-row__item + .tt-icon-row__item { border-left: 1px solid var(--tt-line); }
.tt-icon-row__icon { width: 20px; height: 20px; }
.tt-icon-row__item[aria-expanded="true"] { color: var(--tt-magenta); }

/* =========================================================
   Begrüßung (Home)
   ========================================================= */
.tt-greeting { display: flex; flex-direction: column; gap: 2px; margin-bottom: -6px; }
.tt-greeting__hello { color: var(--tt-text-muted); font-size: 14px; }
.tt-greeting__name { font-size: 28px; font-weight: 700; }

/* =========================================================
   Hero-Karte „Nächster Termin"
   ========================================================= */
.tt-hero {
	position: relative;
	overflow: hidden;
	background: linear-gradient(135deg, var(--tt-magenta) 0%, var(--tt-magenta-dark) 100%);
	border-radius: var(--tt-radius-lg);
	padding: 22px 22px 24px;
	color: var(--tt-white);
	box-shadow: var(--tt-shadow-hero);
	display: flex;
	flex-direction: column;
	gap: 10px;
}
.tt-hero__decor {
	position: absolute;
	top: -30px; right: -30px;
	width: 130px; height: 130px;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.08);
}
.tt-hero__label {
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--tt-gold);
}
.tt-hero__title { font-size: 21px; font-weight: 700; line-height: 1.25; max-width: 88%; }
.tt-hero__meta { font-size: 13.5px; color: rgba(255, 255, 255, 0.82); }
.tt-hero__actions { display: flex; gap: 10px; margin-top: 6px; }

/* =========================================================
   Buttons
   ========================================================= */
.tt-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 11px 18px;
	border-radius: var(--tt-radius-pill);
	font-size: 13.5px;
	font-weight: 600;
	border: none;
}
.tt-btn--ghost { background: rgba(255, 255, 255, 0.16); color: var(--tt-white); }
.tt-btn--gold { background: var(--tt-gold); color: var(--tt-dark); }
.tt-btn--magenta { background: var(--tt-magenta); color: var(--tt-white); }

/* =========================================================
   Abschnitte / Kartenreihen
   ========================================================= */
.tt-section { display: flex; flex-direction: column; gap: 12px; }
.tt-section__head { display: flex; align-items: center; justify-content: space-between; }
.tt-section__head h3 { font-size: 16px; font-weight: 600; }
.tt-link { color: var(--tt-magenta); font-size: 13px; font-weight: 600; }

.tt-scroll-row {
	display: flex;
	gap: 12px;
	overflow-x: auto;
	scroll-snap-type: x proximity;
	margin: 0 -20px;
	padding: 2px 20px 4px;
	-ms-overflow-style: none;
	scrollbar-width: none;
}
.tt-scroll-row::-webkit-scrollbar { display: none; }

/* =========================================================
   Ticket-Karte (Reihe auf Home + Liste auf Tickets-Screen)
   ========================================================= */
.tt-color-magenta { --tt-c: var(--tt-magenta); }
.tt-color-dark     { --tt-c: var(--tt-dark); }
.tt-color-gold     { --tt-c: var(--tt-gold); }
.tt-color-muted    { --tt-c: var(--tt-text-muted); }

.tt-ticket {
	display: flex;
	background: var(--tt-white);
	border-radius: var(--tt-radius-md);
	box-shadow: var(--tt-shadow);
	overflow: hidden;
}
.tt-ticket--row {
	flex: 0 0 168px;
	flex-direction: column;
	scroll-snap-align: start;
}
.tt-ticket--row .tt-ticket__stripe {
	background: var(--tt-c);
	height: 56px;
	display: flex;
	align-items: center;
	padding: 0 14px;
}
.tt-ticket--row .tt-ticket__icon { width: 22px; height: 22px; color: rgba(255,255,255,0.85); }
.tt-ticket--row .tt-ticket__body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 6px; }
.tt-ticket--row .tt-ticket__title { font-weight: 600; font-size: 13.5px; line-height: 1.3; }
.tt-ticket--row .tt-ticket__avail { font-size: 12px; color: var(--tt-success); font-weight: 600; }

.tt-ticket--list {
	align-items: stretch;
	width: 100%;
}
.tt-ticket--list .tt-ticket__stripe {
	width: 10px;
	background: var(--tt-c);
	flex-shrink: 0;
}
.tt-ticket--list .tt-ticket__icon { display: none; }
.tt-ticket--list .tt-ticket__body { flex: 1; padding: 14px 12px; display: flex; flex-direction: column; gap: 4px; }
.tt-ticket--list .tt-ticket__title { font-weight: 600; font-size: 14.5px; }
.tt-ticket--list .tt-ticket__meta { font-size: 12.5px; color: var(--tt-text-muted); }
.tt-ticket--list .tt-ticket__avail { font-size: 12.5px; color: var(--tt-success); font-weight: 600; }
.tt-ticket--list .tt-ticket__chevron { align-self: center; padding-right: 14px; color: var(--tt-text-muted); width: 18px; }

/* =========================================================
   Schnellzugriff-Kacheln
   ========================================================= */
.tt-quick-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.tt-quick-grid--1col { grid-template-columns: 1fr; }
.tt-quick-tile {
	display: flex;
	align-items: center;
	gap: 12px;
	background: var(--tt-white);
	border-radius: var(--tt-radius-md);
	padding: 14px;
	box-shadow: var(--tt-shadow);
}
.tt-quick-tile__icon {
	width: 38px; height: 38px;
	border-radius: 11px;
	background: var(--tt-c);
	color: var(--tt-white);
	display: flex; align-items: center; justify-content: center;
	flex-shrink: 0;
}
.tt-quick-tile__icon svg { width: 19px; height: 19px; }
.tt-quick-tile__label { font-size: 13px; font-weight: 600; color: var(--tt-dark); }

/* =========================================================
   Topbar (Unterseiten)
   ========================================================= */
.tt-topbar {
	display: flex;
	align-items: center;
	justify-content: center;
	position: relative;
	padding: 20px 20px;
}
.tt-topbar__title { font-size: 20px; font-weight: 700; }
.tt-topbar__action {
	position: absolute;
	right: 20px;
	width: 34px; height: 34px;
	border-radius: 50%;
	border: 1.5px solid var(--tt-magenta);
	background: transparent;
	color: var(--tt-magenta);
	display: flex; align-items: center; justify-content: center;
}
.tt-topbar__action svg { width: 17px; height: 17px; }
/* Title kept for screen readers only (page.php) */
.tt-visually-hidden {
	position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
	overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* =========================================================
   Segmented Control (Tickets: Aktiv/Alle)
   ========================================================= */
.tt-segmented {
	display: flex;
	background: var(--tt-white);
	border-radius: var(--tt-radius-pill);
	padding: 4px;
	box-shadow: var(--tt-shadow);
}
.tt-segmented__item {
	flex: 1;
	border: none;
	background: transparent;
	padding: 10px 0;
	border-radius: var(--tt-radius-pill);
	font-size: 13.5px;
	font-weight: 600;
	color: var(--tt-text-muted);
}
.tt-segmented__item.is-active { background: var(--tt-magenta); color: var(--tt-white); }

/* =========================================================
   Filter-Chips (Termine)
   ========================================================= */
.tt-filter-row {
	display: flex;
	gap: 8px;
	overflow-x: auto;
	margin: 0 -20px;
	padding: 0 20px;
	scrollbar-width: none;
}
.tt-filter-row::-webkit-scrollbar { display: none; }
.tt-chip {
	flex-shrink: 0;
	border: 1.5px solid var(--tt-line);
	background: var(--tt-white);
	color: var(--tt-text);
	padding: 8px 16px;
	border-radius: var(--tt-radius-pill);
	font-size: 13px;
	font-weight: 600;
}
.tt-chip.is-active { background: var(--tt-dark); border-color: var(--tt-dark); color: var(--tt-white); }

/* =========================================================
   Listen allgemein (Termine, Tickets, Menü)
   ========================================================= */
.tt-list { display: flex; flex-direction: column; gap: 10px; }

/* Termin-Karte */
.tt-termin {
	display: flex;
	align-items: center;
	gap: 14px;
	background: var(--tt-white);
	border-radius: var(--tt-radius-md);
	box-shadow: var(--tt-shadow);
	padding: 14px;
}
.tt-termin__date {
	flex-shrink: 0;
	width: 46px;
	text-align: center;
	color: var(--tt-magenta);
}
.tt-termin__weekday { display: block; font-size: 11px; font-weight: 600; text-transform: uppercase; color: var(--tt-text-muted); }
.tt-termin__day { display: block; font-size: 17px; font-weight: 700; }
.tt-termin__body { flex: 1; display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.tt-termin__label {
	align-self: flex-start;
	font-size: 10.5px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.03em;
	color: var(--tt-magenta);
	background: rgba(142, 22, 86, 0.09);
	padding: 2px 8px;
	border-radius: var(--tt-radius-pill);
	margin-bottom: 2px;
}
.tt-termin__title { font-weight: 600; font-size: 14.5px; }
.tt-termin__meta { font-size: 12.5px; color: var(--tt-text-muted); }
.tt-termin__chevron { color: var(--tt-text-muted); width: 18px; flex-shrink: 0; }

/* =========================================================
   Mehr-Screen: Profilkarte + Menüliste
   ========================================================= */
.tt-profile-card {
	display: flex;
	align-items: center;
	gap: 14px;
	background: var(--tt-white);
	border-radius: var(--tt-radius-md);
	box-shadow: var(--tt-shadow);
	padding: 16px;
}
.tt-profile-card__avatar {
	width: 46px; height: 46px;
	border-radius: 50%;
	background: var(--tt-magenta);
	color: var(--tt-white);
	display: flex; align-items: center; justify-content: center;
	flex-shrink: 0;
}
.tt-profile-card__avatar svg { width: 22px; height: 22px; }
.tt-profile-card__info { flex: 1; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.tt-profile-card__name { font-weight: 700; font-size: 15px; }
.tt-profile-card__number { font-size: 12px; color: var(--tt-text-muted); }
.tt-profile-card__qr {
	width: 38px; height: 38px;
	border-radius: 11px;
	background: var(--tt-cream);
	color: var(--tt-dark);
	display: flex; align-items: center; justify-content: center;
}
.tt-profile-card__qr svg { width: 19px; height: 19px; }

.tt-menu-row {
	display: flex;
	align-items: center;
	gap: 14px;
	background: var(--tt-white);
	border-radius: var(--tt-radius-md);
	box-shadow: var(--tt-shadow);
	padding: 14px 16px;
}
.tt-menu-row__icon { width: 20px; height: 20px; color: var(--tt-magenta); flex-shrink: 0; }
.tt-menu-row__label { flex: 1; font-size: 14px; font-weight: 600; }
.tt-menu-row__chevron { width: 16px; color: var(--tt-text-muted); flex-shrink: 0; }
.tt-menu-row--danger .tt-menu-row__icon,
.tt-menu-row--danger .tt-menu-row__label { color: #B3413B; }

/* Profilkarte, ausgeloggter Zustand: ganze Karte als Link zum Login */
a.tt-profile-card.tt-profile-card--guest { color: inherit; }
.tt-profile-card--guest .tt-profile-card__avatar { background: var(--tt-text-muted); }
.tt-profile-card--guest .tt-profile-card__qr { color: var(--tt-text-muted); }
.tt-profile-card--guest .tt-profile-card__qr svg { width: 16px; height: 16px; }

/* =========================================================
   Mitgliedsausweis ([tt_member_card], M5) – eigene Profilseite mit QR-Code
   ========================================================= */
.tt-member-card {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 18px;
	background: var(--tt-white);
	border-radius: var(--tt-radius-lg);
	box-shadow: var(--tt-shadow);
	padding: 28px 24px 24px;
	text-align: center;
}
.tt-member-card__badge { display: flex; flex-direction: column; gap: 2px; }
.tt-member-card__name { font-family: var(--tt-font-heading); font-weight: 700; font-size: 17px; }
.tt-member-card__number { font-size: 13px; color: var(--tt-text-muted); }
.tt-member-card__qr {
	width: 180px;
	height: 180px;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 10px;
	background: var(--tt-white);
	border: 1.5px solid var(--tt-line);
	border-radius: var(--tt-radius-md);
	color: var(--tt-dark);
}
.tt-member-card__qr svg { width: 100%; height: 100%; }
.tt-member-card__hint { font-size: 12.5px; color: var(--tt-text-muted); max-width: 240px; }

/* =========================================================
   Bottom-Tab-Bar
   ========================================================= */
.tt-tabbar {
	position: fixed;
	left: 50%;
	transform: translateX(-50%);
	bottom: 0;
	width: 100%;
	max-width: var(--tt-max-width);
	height: calc(var(--tt-tabbar-height) + var(--tt-safe-bottom));
	padding-bottom: var(--tt-safe-bottom);
	background: var(--tt-white);
	border-top-left-radius: 22px;
	border-top-right-radius: 22px;
	box-shadow: 0 -6px 20px rgba(59, 46, 69, 0.10);
	display: flex;
	z-index: 50;
}
.tt-tabbar__item {
	flex: 1;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 4px;
	color: var(--tt-text-muted);
}
.tt-tabbar__icon { width: 22px; height: 22px; }
.tt-tabbar__label { font-size: 10.5px; font-weight: 600; }
.tt-tabbar__item.is-active { color: var(--tt-magenta); }
button.tt-tabbar__item { background: none; border: 0; padding: 0; font: inherit; cursor: pointer; }

/* =========================================================
   "Mehr"-Overlay (Bottom-Sheet über der Tab-Bar, 0.23.0)
   Geöffnet vom Tab-Punkt mit URL "#tt-mehr" (template-parts/more-menu.php).
   ========================================================= */
body.tt-more-open { overflow: hidden; }
.tt-more-menu {
	position: fixed;
	inset: 0;
	z-index: 40; /* below the tab bar (50) so the "Mehr" tab stays tappable */
	visibility: hidden;
	pointer-events: none;
}
.tt-more-menu.is-open { visibility: visible; pointer-events: auto; }
.tt-more-menu__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(20, 8, 20, 0.4);
	opacity: 0;
	transition: opacity .25s ease;
}
.tt-more-menu.is-open .tt-more-menu__backdrop { opacity: 1; }
.tt-more-menu__panel {
	position: absolute;
	left: 50%;
	bottom: calc(var(--tt-tabbar-height) + var(--tt-safe-bottom) - 22px);
	width: 100%;
	max-width: var(--tt-max-width);
	max-height: calc(100% - var(--tt-tabbar-height) - var(--tt-safe-top) - 40px);
	overflow-y: auto;
	background: var(--tt-cream);
	border-top-left-radius: 22px;
	border-top-right-radius: 22px;
	padding: 10px 16px 40px;
	transform: translate(-50%, 110%);
	transition: transform .28s ease;
	box-shadow: 0 -8px 30px rgba(0, 0, 0, 0.18);
	-webkit-overflow-scrolling: touch;
}
.tt-more-menu.is-open .tt-more-menu__panel { transform: translate(-50%, 0); }
.tt-more-menu__grip {
	width: 40px;
	height: 4px;
	margin: 0 auto 12px;
	border-radius: 2px;
	background: rgba(59, 46, 69, 0.2);
}
.tt-more-menu__hint { font-size: 13px; color: var(--tt-text-muted); padding: 8px 4px; }

/* =========================================================
   Echter Seiteninhalt (the_content) – normal über WordPress
   gepflegter Text/Blöcke/Shortcodes, z. B. [tt_quicklinks].
   Bekommt einfache, App-passende Grundformatierung.
   ========================================================= */
.tt-page-content {
	display: flex;
	flex-direction: column;
	gap: 16px;
}
.tt-page-content > *:first-child { margin-top: 0; }
.tt-page-content h1,
.tt-page-content h2,
.tt-page-content h3,
.tt-page-content h4 {
	font-family: var(--tt-font-heading);
	color: var(--tt-dark);
	font-size: 16px;
	font-weight: 600;
	margin: 0;
}
.tt-page-content p {
	margin: 0;
	color: var(--tt-text);
	line-height: 1.6;
	font-size: 14px;
}
.tt-page-content a { color: var(--tt-magenta); font-weight: 600; }
/* Plugin buttons (ttplugin/ttworkshop .tt-button--primary, e.g. "Anmelden"):
   the generic link colour above (0,1,1) beat the plugin's button colour (0,1,0)
   -> magenta text on a magenta button. Keep the plugin's contrast colour. */
.tt-page-content a.tt-button--primary,
.tt-page-content a.tt-button--primary:hover,
.tt-page-content a.tt-button--primary:visited { color: var(--tt-color-brand-contrast, var(--tt-white)); }
.tt-page-content img { border-radius: var(--tt-radius-md); }
.tt-page-content ul,
.tt-page-content ol { margin: 0; padding-left: 20px; font-size: 14px; line-height: 1.6; }

/* =========================================================
   App-Footer (Widget-Bereich, Design > Widgets, sidebar
   "tt-app-footer"). Ohne zugewiesenes Widget zeigt
   template-parts/app-footer.php eine Standard-Copyright-Zeile (siehe
   dortiger Code-Fallback) - linksbündig wie der übrige Seiteninhalt,
   passend zum Design-Mockup content-widgets-preview.png.
   ========================================================= */
.tt-app-footer {
	padding: 0 20px 4px;
	margin-top: 28px;
	text-align: left;
}
.tt-footer-widget {
	font-size: 12.5px;
	color: var(--tt-text-muted);
	line-height: 1.6;
}
.tt-footer-widget__title {
	font-family: var(--tt-font-heading);
	font-size: 13px;
	color: var(--tt-dark);
	margin: 0 0 6px;
}
.tt-footer-widget a { color: var(--tt-magenta); }

/* Zwischenraum, falls mehr als ein Widget im Footer-Bereich liegt
   (z. B. Menü-Widget mit Rechtlichem + Text-Widget mit Copyright). */
.tt-app-footer > * + * { margin-top: 12px; }

/* Optionales Menü-Widget im Footer (z. B. Impressum/Datenschutz/AGB) -
   WordPress' Navigationsmenü-Widget gibt <ul class="menu"> aus. Wird als
   schlanke Zeile mit "·"-Trennern dargestellt, ohne eigenen Code nötig -
   Miron kann das Menü unter Design > Menüs frei pflegen. */
.tt-app-footer .menu {
	list-style: none;
	display: flex;
	flex-wrap: wrap;
	margin: 0;
	padding: 0;
	font-size: 12.5px;
}
.tt-app-footer .menu li { display: flex; align-items: center; }
.tt-app-footer .menu li:not(:last-child)::after {
	content: '\00b7';
	margin: 0 8px;
	color: var(--tt-text-muted);
}
.tt-app-footer .menu a { color: var(--tt-text-muted); font-weight: 600; }
/* Icon in front of a footer menu item (CSS class tt-icon-NAME on the menu
   item, rendered by tt_default_menu_item_icon() in inc/nav-walker.php). */
.tt-app-footer .menu a { display: inline-flex; align-items: center; gap: 5px; }
.tt-menu-icon { width: 14px; height: 14px; flex: 0 0 auto; }

/* =========================================================
   Vollflächiges Kopfmenü (Hamburger), bordeauxfarben, aufgerufen über
   den Menü-Button in der Icon-Zeile (template-parts/site-header.php).
   ========================================================= */
body.tt-menu-open { overflow: hidden; }

.tt-header-menu {
	position: fixed;
	inset: 0;
	z-index: 200;
	visibility: hidden;
	pointer-events: none;
}
.tt-header-menu.is-open { visibility: visible; pointer-events: auto; }
.tt-header-menu__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(20, 8, 20, 0.4);
	opacity: 0;
	transition: opacity .25s ease;
}
.tt-header-menu.is-open .tt-header-menu__backdrop { opacity: 1; }
.tt-header-menu__panel {
	position: absolute;
	top: 0;
	left: 50%;
	width: 100%;
	max-width: var(--tt-max-width);
	height: 100%;
	overflow-y: auto;
	background: var(--tt-magenta);
	padding: calc(var(--tt-safe-top) + 22px) 0 24px;
	transform: translateX(-150%);
	transition: transform .28s ease;
	box-shadow: 10px 0 30px rgba(0, 0, 0, 0.25);
	-webkit-overflow-scrolling: touch;
}
.tt-header-menu.is-open .tt-header-menu__panel { transform: translateX(-50%); }

.tt-header-menu__close {
	position: absolute;
	top: calc(var(--tt-safe-top) + 14px);
	right: 18px;
	width: 34px; height: 34px;
	border-radius: 50%;
	border: none;
	background: rgba(255, 255, 255, 0.14);
	color: var(--tt-white);
	display: flex;
	align-items: center;
	justify-content: center;
}
.tt-header-menu__close svg { width: 16px; height: 16px; }

.tt-header-menu__list { display: flex; flex-direction: column; margin-top: 46px; }
.tt-header-menu__item {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 16px 24px;
	color: var(--tt-white);
	font-family: var(--tt-font-heading);
	font-size: 16px;
	font-weight: 600;
	border-bottom: 1px solid rgba(255, 255, 255, 0.16);
}
.tt-header-menu__chevron { width: 16px; height: 16px; color: rgba(255, 255, 255, 0.55); flex-shrink: 0; }
.tt-header-menu__item--danger { color: #F3C9C4; }
/* Optional icon in front of the title (tt-icon-NAME on the menu item). */
.tt-header-menu__label { display: inline-flex; align-items: center; gap: 10px; min-width: 0; }
.tt-header-menu__label svg,
.tt-header-menu__icon { width: 18px; height: 18px; flex-shrink: 0; color: rgba(255, 255, 255, 0.85); }
/* Sub-level items (2nd level and deeper): smaller, indented, tighter. */
.tt-header-menu__item--sub {
	padding: 10px 24px 10px 44px;
	font-size: 14px;
	font-weight: 500;
	color: rgba(255, 255, 255, 0.85);
}
.tt-header-menu__item--sub .tt-header-menu__icon { width: 15px; height: 15px; }
.tt-header-menu__item--sub .tt-header-menu__chevron { width: 14px; height: 14px; }

/* =========================================================
   Sonstige Hilfsklassen (Miron-Wunsch, 04.08.2026)
   ========================================================= */
.nosee { display: none; }

/* Tanzlehrer-Namen im Seiteninhalt ausblenden, erst bei Hover als
   Tooltip einblenden. Markup im WP-Editor (Text/HTML-Block):
   <span class="tanzlehrer">Sichtbarer Text<span>Tanzlehrer-Name</span></span>
   1:1 von Miron uebernommen (identische Werte wie auf der Hauptseite
   www.traumtaenzer.de), nur Farbwerte durch --tt-magenta ersetzt (exakt
   derselbe Hex-Wert #851159, keine optische Aenderung). */
span.tanzlehrer {
	position: relative;
	z-index: 11;
	text-decoration: none;
}
span.tanzlehrer:hover { z-index: 12; }
span.tanzlehrer span { display: none; }
span.tanzlehrer:hover span {
	display: block;
	position: absolute;
	top: 20em;
	left: 20em;
	min-width: 12em;
	border: 1px solid var(--tt-magenta);
	background-color: #fdef6d;
	color: #000;
	text-align: center;
	padding: 5px;
	font-size: .8em;
	-moz-box-shadow: 5px 5px 15px var(--tt-magenta);
	-webkit-box-shadow: 5px 5px 15px var(--tt-magenta);
	box-shadow: 5px 5px 15px var(--tt-magenta);
}

/* =========================================================
   [tt_latest_posts] – Beiträge-Anbindung www.traumtaenzer.de (M8)
   Eigener Theme-Shortcode (inc/rest-api.php), kein ttmember-Reskin.
   ========================================================= */
.tt-post-list { display: flex; flex-direction: column; gap: 10px; }
.tt-post-card {
	display: flex;
	align-items: center;
	gap: 12px;
	background: var(--tt-white);
	border-radius: var(--tt-radius-md);
	box-shadow: var(--tt-shadow);
	padding: 10px;
	color: var(--tt-text);
}
.tt-post-card:hover { opacity: 0.9; color: inherit; }
.tt-post-card__img {
	flex-shrink: 0;
	width: 56px;
	height: 56px;
	border-radius: 10px;
	background-color: var(--tt-cream);
	background-size: cover;
	background-position: center;
}
.tt-post-card__body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.tt-post-card__title {
	font-family: var(--tt-font-heading);
	font-weight: 600;
	font-size: 13.5px;
	line-height: 1.3;
	overflow-wrap: break-word;
}
.tt-post-card__date { font-size: 11px; color: var(--tt-text-muted); }
.tt-post-card__excerpt {
	font-size: 12px;
	line-height: 1.4;
	color: var(--tt-text-muted);
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

/* =========================================================
   Größere Bildschirme: App-Karte bleibt telefonbreit & zentriert
   ========================================================= */
@media (min-width: 640px) {
	body { background: #DCD5CB; }
	.tt-app { box-shadow: 0 20px 60px rgba(0,0,0,0.15); min-height: 100vh; }
}


/* =========================================================
   Tickets ([tt_tickets], M19 / 1.1.0) – Liste, Vollbild-Detail,
   Einlösen-Overlay mit QR-Code (assets/js/tickets.js)
   ========================================================= */
.tt-tickets { display: flex; flex-direction: column; gap: 12px; }
.tt-tickets__title { font-size: 16px; font-weight: 600; }
.tt-tickets__empty { font-size: 14px; color: var(--tt-text-muted); background: var(--tt-white); border-radius: var(--tt-radius-md); padding: 14px 16px; }
.tt-tickets__list { display: flex; flex-direction: column; gap: 10px; }

/* "Alte Tickets anzeigen" – reiner CSS-Schalter, gleiche Optik wie bei ttmember */
.tt-tickets__old-toggle { position: absolute; opacity: 0; width: 0; height: 0; pointer-events: none; }
.tt-tickets__old-label {
	position: relative;
	display: inline-flex;
	align-items: center;
	gap: 10px;
	align-self: flex-start;
	padding-left: 44px;
	min-height: 24px;
	font-size: 13.5px;
	color: var(--tt-text-muted);
	cursor: pointer;
	user-select: none;
}
.tt-tickets__old-label::before {
	content: "";
	position: absolute;
	left: 0; top: 50%;
	transform: translateY(-50%);
	width: 36px; height: 22px;
	border-radius: 11px;
	background: var(--tt-line);
	transition: background .2s ease;
}
.tt-tickets__old-label::after {
	content: "";
	position: absolute;
	left: 3px; top: 50%;
	transform: translateY(-50%);
	width: 16px; height: 16px;
	border-radius: 50%;
	background: var(--tt-white);
	box-shadow: 0 1px 3px rgba(0,0,0,0.25);
	transition: transform .2s ease, left .2s ease;
}
.tt-tickets__old-toggle:checked + .tt-tickets__old-label::before { background: var(--tt-magenta); }
.tt-tickets__old-toggle:checked + .tt-tickets__old-label::after { left: 17px; }
.tt-tickets__old-toggle:not(:checked) ~ .tt-tickets__list .tt-tk--old { display: none; }
.tt-tickets__old-toggle:focus-visible + .tt-tickets__old-label::before { outline: 2px solid var(--tt-magenta); outline-offset: 2px; }

/* Ticket-Karte */
.tt-tk {
	display: flex;
	align-items: center;
	gap: 12px;
	background: var(--tt-white);
	border-radius: var(--tt-radius-md);
	box-shadow: var(--tt-shadow);
	padding: 10px 12px 10px 10px;
	min-height: 68px;
}
.tt-tickets a.tt-tk { color: var(--tt-text); } /* outranks .tt-page-content a */
.tt-tk--old { opacity: 0.55; }
.tt-tk__pic {
	flex: 0 0 auto;
	width: 56px; height: 56px;
	border-radius: 8px;
	overflow: hidden;
	background: var(--tt-magenta);
	display: flex; align-items: center; justify-content: center;
	color: var(--tt-white);
}
.tt-tk__pic img { width: 100%; height: 100%; object-fit: cover; }
.tt-tk__icon { width: 26px; height: 26px; }
.tt-tk__body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.tt-tk__type { font-size: 12px; color: var(--tt-text-muted); text-transform: uppercase; letter-spacing: .02em; }
.tt-tk__name { font-family: var(--tt-font-heading); font-weight: 600; font-size: 14.5px; line-height: 1.3; }
.tt-tk__meta { font-size: 12.5px; color: var(--tt-success); font-weight: 600; }
.tt-tk--old .tt-tk__meta { color: var(--tt-text-muted); }
.tt-tk__chevron { flex: 0 0 auto; width: 18px; color: var(--tt-text-muted); }
.tt-tk__chevron svg { width: 18px; height: 18px; }

/* Vollbild-Detail */
body.tt-ticket-open { overflow: hidden; }
.tt-tk-detail[hidden], .tt-tk-redeem[hidden] { display: none !important; }
.tt-tk-detail {
	position: fixed;
	inset: 0;
	z-index: 210; /* above header menu (200) and tab bar */
	display: flex;
	flex-direction: column;
	background: var(--tt-cream);
	max-width: var(--tt-max-width);
	margin: 0 auto;
	box-shadow: 0 0 40px rgba(0,0,0,0.25);
}
.tt-tk-detail__bar {
	flex: 0 0 auto;
	display: flex;
	align-items: center;
	background: var(--tt-magenta);
	color: var(--tt-white);
	padding: calc(var(--tt-safe-top) + 6px) 8px 6px;
	min-height: calc(var(--tt-safe-top) + 50px);
}
.tt-tk-detail__back {
	display: inline-flex;
	align-items: center;
	gap: 2px;
	background: none;
	border: none;
	color: inherit;
	font-size: 16px;
	font-weight: 500;
	padding: 8px 10px 8px 4px;
	cursor: pointer;
}
.tt-tk-detail__back-icon { width: 22px; height: 22px; transform: rotate(180deg); }
.tt-tk-detail__scroll {
	flex: 1 1 auto;
	overflow-y: auto;
	-webkit-overflow-scrolling: touch;
	padding: 18px 16px calc(var(--tt-safe-bottom) + 32px);
	display: flex;
	flex-direction: column;
	gap: 16px;
}
.tt-tk-detail__title { font-size: 20px; font-weight: 700; line-height: 1.25; }
.tt-tk-detail__title span { display: block; font-size: 15px; font-weight: 500; color: var(--tt-text-muted); margin-top: 4px; }
.tt-tk-detail__pic {
	position: relative;
	border-radius: var(--tt-radius-md);
	overflow: hidden;
	background: var(--tt-magenta);
	box-shadow: var(--tt-shadow);
	aspect-ratio: 1 / 1; /* ticket images are always square */
	width: min(62%, 240px);
	margin: 0 auto;
}
.tt-tk-detail__pic img { width: 100%; height: 100%; object-fit: cover; }
.tt-tk-detail__pic-fallback { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: rgba(255,255,255,0.6); }
.tt-tk-detail__pic-icon { width: 56px; height: 56px; }
.tt-tk-detail__valid {
	position: absolute;
	left: 10px; bottom: 8px;
	font-family: var(--tt-font-heading);
	font-style: italic;
	font-size: 12px;
	line-height: 1.25;
	color: var(--tt-white);
	text-shadow: 0 1px 3px rgba(0,0,0,0.55);
}
.tt-tk-detail--old .tt-tk-detail__pic { filter: grayscale(1); opacity: 0.7; }
.tt-tk-detail__facts {
	margin: 0;
	background: var(--tt-white);
	border-radius: var(--tt-radius-md);
	padding: 4px 14px;
}
.tt-tk-detail__facts > div { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--tt-line); font-size: 14px; }
.tt-tk-detail__facts > div:last-child { border-bottom: none; }
.tt-tk-detail__facts dt { color: var(--tt-text-muted); }
.tt-tk-detail__facts dd { margin: 0; font-weight: 600; text-align: right; }
.tt-tk-detail__actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.tt-tk-detail__actions .tt-btn { padding: 13px 12px; font-size: 15px; width: 100%; cursor: pointer; }
.tt-tk-detail__actions a.tt-btn--magenta { color: var(--tt-white); } /* outranks .tt-page-content a */
.tt-btn--outline { background: transparent; color: var(--tt-magenta); border: 1.5px solid var(--tt-magenta); }
.tt-btn--disabled { background: var(--tt-line); color: var(--tt-text-muted); cursor: default; }
.tt-tk-detail__history-title { font-size: 15px; font-weight: 600; margin-top: 4px; }
.tt-tk-detail__history-empty { font-size: 13.5px; color: var(--tt-text-muted); }
.tt-tk-detail__history { list-style: none; margin: 0; padding: 0 14px; background: var(--tt-white); border-radius: var(--tt-radius-md); }
.tt-tk-detail__history li { display: flex; gap: 14px; padding: 10px 0; border-bottom: 1px solid var(--tt-line); font-size: 13.5px; }
.tt-tk-detail__history li:last-child { border-bottom: none; }
.tt-tk-detail__history-date { flex: 0 0 76px; display: flex; flex-direction: column; font-weight: 600; }
.tt-tk-detail__history-date small, .tt-tk-detail__history-what small { display: block; font-size: 12px; font-weight: 400; color: var(--tt-text-muted); }
.tt-tk-detail__history-what { flex: 1; min-width: 0; }

/* Einlösen-Overlay (QR) */
.tt-tk-redeem {
	position: fixed;
	inset: 0;
	z-index: 220;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: calc(var(--tt-safe-top) + 16px) 16px calc(var(--tt-safe-bottom) + 16px);
	background: rgba(20, 8, 20, 0.55);
}
.tt-tk-redeem__panel {
	width: 100%;
	max-width: 360px;
	max-height: 100%;
	overflow-y: auto;
	background: var(--tt-white);
	border-radius: var(--tt-radius-lg);
	padding: 24px 20px 20px;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 14px;
	text-align: center;
	box-shadow: 0 20px 50px rgba(0,0,0,0.35);
}
.tt-tk-redeem__label { font-size: 13px; color: var(--tt-text-muted); }
.tt-tk-redeem__code { font-family: var(--tt-font-heading); font-size: 30px; font-weight: 700; letter-spacing: .04em; color: var(--tt-dark); }
.tt-tk-redeem__qr {
	width: min(62vw, 240px);
	height: min(62vw, 240px);
	display: flex; align-items: center; justify-content: center;
	background: var(--tt-white);
	color: #000;
	font-size: 18px;
	font-weight: 700;
}
.tt-tk-redeem__qr svg { width: 100%; height: 100%; }
.tt-tk-redeem__close { min-width: 160px; padding: 13px 24px; font-size: 15px; cursor: pointer; }
@media (max-height: 640px) {
	.tt-tk-redeem__qr { width: min(50vw, 190px); height: min(50vw, 190px); }
	.tt-tk-redeem__code { font-size: 24px; }
	.tt-tk-redeem__panel { gap: 10px; padding: 18px 16px 16px; }
}
