/* Treffpunkt Places — Paketauswahl (0.9.22)
 *
 * Eigene Datei, weil die Auswahl eine andere Aufgabe hat als die
 * Restaurantseite: sie unterbricht bewusst. Sie laedt keine Schrift,
 * kein Bild und keine Fremdressource; die Farben sind dieselben
 * Token wie ueberall (Dunkelpetrol, Petrol, Terrakotta, Creme, Gold,
 * Salbeigruen, Grau, Hellgraugruen, Weiss).
 */

/* Der Dialog rechnet in eigenen Kasten. Ohne das laeuft ein Knopf mit
 * width:100% plus Rahmen und Innenabstand aus seiner Karte heraus —
 * genau das hat der visuelle Test bei 390 px und bei 1280 px gezeigt. */
.tp-pkg,
.tp-pkg *,
.tp-pkg *::before,
.tp-pkg *::after { box-sizing: border-box; }

.tp-pkg {
	position: fixed;
	inset: 0;
	z-index: 9000;
	display: flex;
	align-items: flex-end;
	justify-content: center;
}
.tp-pkg[hidden] { display: none; }

.tp-pkg__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(27, 47, 55, .62);
}

.tp-pkg__box {
	position: relative;
	width: 100%;
	max-height: 92vh;
	overflow-y: auto;
	-webkit-overflow-scrolling: touch;
	background: #FFFFFF;
	border-radius: 14px 14px 0 0;
	box-shadow: 0 -8px 40px rgba(27, 47, 55, .28);
}

.tp-pkg__head {
	position: sticky;
	top: 0;
	z-index: 2;
	display: flex;
	align-items: flex-start;
	gap: 12px;
	padding: 18px 16px 12px;
	background: #1B2F37;
	color: #FFFFFF;
	border-radius: 14px 14px 0 0;
}
.tp-pkg__title {
	margin: 0;
	font-size: 1.02rem;
	line-height: 1.35;
	font-weight: 600;
	color: #FFFFFF;
	flex: 1 1 auto;
}
.tp-pkg__x {
	flex: 0 0 auto;
	min-width: 44px;
	min-height: 44px;
	margin: -8px -6px 0 0;
	border: 0;
	border-radius: 8px;
	background: transparent;
	color: #E9E3D8;
	font-size: 1.6rem;
	line-height: 1;
	cursor: pointer;
}
.tp-pkg__x:hover { color: #FFFFFF; }

.tp-pkg__body { padding: 16px; }

/* Ein Schalter, zwei Zustaende. */
.tp-pkg__switch {
	display: flex;
	gap: 4px;
	padding: 4px;
	background: #D5DCD9;
	border-radius: 999px;
}
.tp-pkg__opt {
	flex: 1 1 50%;
	min-height: 44px;
	border: 0;
	border-radius: 999px;
	background: transparent;
	color: #2A3D44;
	font: inherit;
	font-weight: 600;
	cursor: pointer;
}
.tp-pkg__opt.is-active {
	background: #FFFFFF;
	color: #1B2F37;
	box-shadow: 0 1px 3px rgba(27, 47, 55, .18);
}

.tp-pkg__hint {
	margin: 10px 0 0;
	color: #5B6B4C;
	font-size: .88rem;
	font-weight: 600;
}
.tp-pkg__hint[hidden] { display: none; }

.tp-pkg__vat {
	margin: 6px 0 0;
	color: #676C69;
	font-size: .8rem;
}

.tp-pkg__list {
	list-style: none;
	margin: 14px 0 0;
	padding: 0;
	display: grid;
	gap: 12px;
}

/* Karte als Spalte: der Auswahlknopf sitzt IMMER unten, egal wie viele
 * Leistungszeilen darueber stehen. Nebeneinander stehende Karten
 * bekommen dadurch denselben Knopf auf derselben Hoehe. */
.tp-pkg__card {
	position: relative;
	display: flex;
	flex-direction: column;
	gap: 8px;
	padding: 14px;
	border: 1px solid #D5DCD9;
	border-radius: 12px;
	background: #FFFFFF;
}
.tp-pkg__card > * { margin: 0; }
.tp-pkg__card.is-recommended {
	border-color: #B25C3E;
	border-width: 2px;
	padding: 13px;
	background: #FFFDF9;
}
.tp-pkg__flag {
	align-self: flex-start;
	display: inline-block;
	padding: 3px 9px;
	border-radius: 999px;
	background: #B25C3E;
	color: #FFFFFF;
	font-size: .74rem;
	font-weight: 700;
	letter-spacing: .04em;
	text-transform: uppercase;
}
.tp-pkg__name {
	font-size: 1.05rem;
	font-weight: 700;
	color: #1B2F37;
}
.tp-pkg__price {
	margin-top: -2px;
	font-size: 1.35rem;
	font-weight: 700;
	color: #2A3D44;
}
.tp-pkg__price[hidden] { display: none; }
.tp-pkg__per {
	font-size: .82rem;
	font-weight: 500;
	color: #676C69;
}

.tp-pkg__feats {
	list-style: none;
	padding: 6px 0 0;
	border-top: 1px solid #E9E3D8;
}
.tp-pkg__feats li {
	display: flex;
	justify-content: space-between;
	gap: 10px;
	padding: 5px 0;
	font-size: .88rem;
	border-bottom: 1px solid #F2EFE9;
}
.tp-pkg__feats li:last-child { border-bottom: 0; }
.tp-pkg__flabel { color: #676C69; }
.tp-pkg__fval { color: #1B2F37; font-weight: 600; text-align: right; }

/* Der Auswahlknopf traegt seine Farbe SELBST.
 *
 * .tp-btn holt sein Gruen aus --tp-green, und dieses Token ist in
 * tp-place-detail.css am Wurzelelement der Detailseite deklariert.
 * Der Dialog ist ein eigenstaendiges Fenster und darf sich darauf nicht
 * verlassen: faellt das Token aus, stuende hier weisse Schrift auf
 * durchsichtigem Grund — der Knopf waere unsichtbar. Genau das hat der
 * visuelle Test bei 390 px gezeigt. */
.tp-pkg__go {
	margin-top: auto;
	width: 100%;
	min-height: 44px;
	display: flex;
	align-items: center;
	justify-content: center;
	text-align: center;
	background: #2A3D44;
	border: 1px solid #2A3D44;
	color: #FFFFFF;
}
.tp-pkg__go:hover,
.tp-pkg__go:focus {
	background: #1B2F37;
	border-color: #1B2F37;
	color: #FFFFFF;
}
.tp-pkg__card.is-recommended .tp-pkg__go,
.tp-pkg__card.is-recommended .tp-pkg__go:hover,
.tp-pkg__card.is-recommended .tp-pkg__go:focus {
	background: #B25C3E;
	border-color: #B25C3E;
	color: #FFFFFF;
}
/* Auch der Wiederholungsknopf im Fehlerzustand. */
.tp-pkg__retry {
	background: #2A3D44;
	border: 1px solid #2A3D44;
	color: #FFFFFF;
}

.tp-pkg__fail {
	margin: 0 0 12px;
	color: #2A3D44;
}
.tp-pkg__retry { min-height: 44px; }


/* Sichtbarer Fokus ueberall im Dialog — Tastaturbedienung ist hier
   kein Sonderfall, sondern der zweite Hauptweg. */
.tp-pkg :focus-visible,
.tp-pkg-open:focus-visible {
	outline: 3px solid #C2994E;
	outline-offset: 2px;
}

/* Waehrend der Dialog offen ist, scrollt der Hintergrund nicht mit. */
.tp-pkg-locked { overflow: hidden; }

/* Ab Tablet: zentriertes, kompaktes Fenster statt Blatt von unten. */
@media (min-width: 700px) {
	.tp-pkg { align-items: center; padding: 24px; }
	.tp-pkg__box {
		max-width: 940px;
		max-height: 88vh;
		border-radius: 14px;
	}
	.tp-pkg__head { border-radius: 14px 14px 0 0; }
	.tp-pkg__body { padding: 20px; }
	.tp-pkg__list { grid-template-columns: repeat(4, 1fr); align-items: stretch; }
	.tp-pkg__switch { max-width: 320px; }
}

@media (min-width: 700px) and (max-width: 979px) {
	.tp-pkg__list { grid-template-columns: repeat(2, 1fr); }
}

@media (prefers-reduced-motion: no-preference) {
	.tp-pkg__box { animation: tp-pkg-in .18s ease-out; }
	@keyframes tp-pkg-in {
		from { transform: translateY(12px); opacity: .6; }
		to   { transform: none; opacity: 1; }
	}
}
