/* ============================================================
   Schiffahoi - Angebotsseite (eigene Angebote, /alle-angebote/...)
   v1, Entwurf 15.10.2026
   Template: templates/traveloffer/offer/default/detail.htpl
   Skript:   js/angebot-2026.js (Deals erkennen, Anfrage mit Deal-Auswahl,
             feste Leiste auf dem Handy, leere Bereiche ausblenden)
   ============================================================ */

/* Farb-Variablen kommen aus bausteine-2026.css (:root) - dort pflegen. */
.ang {
	padding: 124px 0 40px; /* Platz fuer den festen Kopf (92 px) */
	background: #ffffff;
	color: var(--ang-text);
	font-family: "Source Sans Pro", Arial, sans-serif;
}
.ang *, .ang *::before, .ang *::after { box-sizing: border-box; }

/* ---------- Raster: links Inhalt, rechts mitlaufender Anfrage-Kasten ---------- */
.ang-raster {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 360px;
	grid-template-areas:
		"kopf karte"
		"banner karte"
		"inhalt karte";
	column-gap: 40px;
	align-items: start;
}
.ang-kopf { grid-area: kopf; }
.ang-banner { grid-area: banner; }
.ang-karte { grid-area: karte; }
.ang-inhalt { grid-area: inhalt; min-width: 0; }

/* ---------- Titel ---------- */
.ang .ang-titel {
	margin: 0 0 12px;
	font-family: "Source Sans Pro", Arial, sans-serif !important;
	font-size: 34px;
	font-weight: 700;
	line-height: 1.15;
	letter-spacing: -.2px;
	color: var(--ang-dunkel);
	text-transform: none;
}
.ang-meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
	margin: 0 0 20px;
}
.ang-chip {
	display: inline-flex;
	align-items: center;
	padding: 4px 11px;
	border-radius: 999px;
	background: var(--ang-hell);
	border: 1px solid var(--ang-linie);
	color: var(--ang-grau);
	font-size: 14px;
	font-weight: 600;
	line-height: 1.3;
}
.ang-chip:empty { display: none; }
.ang-sterne:empty { display: none; }
.ang .offer-stars {
	display: inline-block;
	height: 14px;
	background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23f2a900' d='M12 2.5l2.9 6.3 6.9.7-5.2 4.6 1.5 6.8L12 17.4l-6.1 3.5 1.5-6.8-5.2-4.6 6.9-.7z'%3E%3C/path%3E%3C/svg%3E") repeat-x left center / 14px 14px;
	vertical-align: middle;
	position: static;
}

/* ---------- Banner (immer komplett sichtbar) ---------- */
.ang-banner { margin: 0 0 28px; }
.ang .ang-bild {
	display: block;
	width: 100%;
	height: auto;
	border-radius: 16px;
	background: var(--ang-hell);
	box-shadow: 0 10px 30px rgba(11, 31, 51, .10);
}
.ang-galerie { margin-top: 12px; }
.ang-galerie .gallery-bg { position: static; min-height: 0; background: none; }
.ang-galerie .gallery-bg .container { padding: 0; }
.ang-galerie #links { float: none; margin: 0; text-align: left; display: flex; flex-wrap: wrap; gap: 8px; }
.ang-galerie #links .item { float: none; width: 96px; margin: 0; }
.ang-galerie #links img { height: 64px !important; border-radius: 8px; }

/* ---------- Anfrage-Kasten ---------- */
.ang-karte {
	position: sticky;
	top: 112px;
	padding: 22px 22px 18px;
	border: 1px solid var(--ang-linie);
	border-radius: 16px;
	background: #ffffff;
	box-shadow: 0 16px 44px rgba(11, 31, 51, .12);
}
.ang-karte-preis:empty { display: none; }
.ang-preis { margin: 0 0 10px; line-height: 1.1; }
.ang-preis-vor { font-size: 16px; font-weight: 600; color: var(--ang-grau); }
.ang-preis-wert { font-size: 36px; font-weight: 700; color: var(--ang-rot2); letter-spacing: -.5px; }
.ang-preis-pp { display: block; margin-top: 4px; font-size: 14px; color: var(--ang-grau); }
.ang-preis-vor:empty, .ang-preis-pp:empty { display: none; }
.ang-karte-kurz {
	margin: 0 0 16px;
	font-size: 15.5px;
	line-height: 1.45;
	color: var(--ang-text);
}
.ang-karte-kurz:empty { display: none; }
.ang .ang-knopf {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	width: 100%;
	min-height: 50px;
	margin: 0 0 10px;
	padding: 12px 16px;
	border-radius: 12px;
	font-size: 17px;
	font-weight: 700;
	line-height: 1.2;
	text-align: center;
	text-decoration: none;
	transition: background .15s ease, box-shadow .15s ease, color .15s ease;
}
.ang .ang-knopf svg { flex: 0 0 auto; }
.ang .ang-knopf-anfrage {
	background: linear-gradient(180deg, var(--ang-rot1), var(--ang-rot2));
	color: #ffffff;
	box-shadow: 0 8px 20px rgba(194, 6, 42, .28);
}
.ang .ang-knopf-anfrage:hover,
.ang .ang-knopf-anfrage:focus-visible { color: #ffffff; text-decoration: none; box-shadow: 0 10px 26px rgba(194, 6, 42, .38); }
.ang .ang-knopf:focus-visible { outline: 3px solid rgba(0, 90, 165, .35); outline-offset: 2px; }
.ang-karte-hinweis {
	margin: 4px 0 0;
	font-size: 14px;
	line-height: 1.4;
	color: var(--ang-grau);
	text-align: center;
}
.ang-karte-hinweis:empty { display: none; }

/* ---------- Beschreibung (Text aus dem CMS) ---------- */
.ang-text {
	font-size: 16px;
	line-height: 1.6;
	color: var(--ang-text);
	overflow-wrap: break-word;
	word-wrap: break-word;
}
.ang-text p { margin: 0 0 1em; font-size: inherit; }
.ang-text img { max-width: 100%; height: auto; }
.ang-text a { overflow-wrap: anywhere; }
.ang-text hr {
	height: 0;
	margin: 24px 0;
	border: 0;
	border-top: 1px solid var(--ang-linie);
}
.ang-text h2, .ang-text h3, .ang-text h4 { color: var(--ang-dunkel); line-height: 1.25; }
.ang-text table { max-width: 100%; }

/* Ein Deal = Abschnitt zwischen zwei Trennlinien mit Link (per Skript als Karte) */
/* Deal-Box-/Knopf-/Checklisten-Stile stehen in bausteine-2026.css. */

/* ---------- Weitere Bereiche (werden ausgeblendet, wenn leer) ---------- */
.ang-block {
	margin: 24px 0 0;
	padding: 18px 20px;
	border: 1px solid var(--ang-linie);
	border-radius: 14px;
	background: #ffffff;
	font-size: 15px;
	line-height: 1.55;
	color: var(--ang-grau);
}
.ang .ang-block-titel {
	margin: 0 0 8px;
	font-family: "Source Sans Pro", Arial, sans-serif !important;
	font-size: 17px;
	font-weight: 700;
	color: var(--ang-dunkel);
	text-transform: none;
}
.ang-block p { margin: 0 0 .6em; }
.ang-block p:last-child { margin-bottom: 0; }
.ang-tabelle { width: 100%; border-collapse: collapse; }
.ang-tabelle td { padding: 8px 0; border-bottom: 1px solid var(--ang-linie); }
.ang-tabelle td.facilities-a { width: 160px; font-weight: 700; color: var(--ang-dunkel); }
.ang-block .periodWrapper { padding: 0 !important; }
.ang-block .date-list .period { margin-bottom: .5rem; padding-bottom: .5rem; border-bottom: 1px dashed var(--ang-linie); }
.ang-dateien { margin-top: 20px; display: flex; flex-wrap: wrap; gap: 10px; }
.ang-karte-unten { margin-top: 24px; }
.ang-karte-unten iframe { width: 100%; min-height: 280px; border: 0; border-radius: 14px; }

/* Brotkrumen */
.ang-pfad { margin-top: 36px; padding-top: 16px; border-top: 1px solid var(--ang-linie); }
.ang-pfad ol { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; font-size: 14px; color: var(--ang-grau); }

/* ---------- Feste Leiste unten (nur Handy/Tablet) ---------- */
.ang-leiste { display: none; }

/* ---------- Auswahl: Wozu haben Sie eine Frage? ---------- */
.ang-wahl[hidden] { display: none !important; }
.ang-wahl {
	position: fixed;
	inset: 0;
	z-index: 1060;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
}
.ang-wahl-hinter { position: absolute; inset: 0; background: rgba(11, 31, 51, .55); }
.ang-wahl-fenster {
	position: relative;
	display: flex;
	flex-direction: column;
	width: 100%;
	max-width: 560px;
	max-height: min(80vh, 720px);
	border-radius: 18px;
	background: #ffffff;
	box-shadow: 0 24px 60px rgba(0, 0, 0, .3);
	overflow: hidden;
}
.ang-wahl-kopf {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 18px 20px 6px;
}
.ang-wahl-titel { margin: 0; font-size: 21px; font-weight: 700; color: var(--ang-dunkel); }
.ang .ang-wahl-zu {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	padding: 0;
	border: 0;
	border-radius: 10px;
	background: var(--ang-hell);
	color: var(--ang-dunkel);
	cursor: pointer;
}
.ang-wahl-unter { margin: 0; padding: 0 20px 12px; font-size: 15px; color: var(--ang-grau); }
.ang .ang-wahl-liste {
	margin: 0;
	padding: 0 12px 14px;
	list-style: none;
	overflow-y: auto;
	-webkit-overflow-scrolling: touch;
}
.ang .ang-wahl-liste > li { margin: 0 0 6px; padding: 0; list-style: none; }
.ang .ang-wahl-liste > li::before { content: none; }
.ang .ang-wahl-liste a {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 12px 14px;
	border: 1px solid var(--ang-linie);
	border-radius: 12px;
	background: #ffffff;
	color: var(--ang-dunkel);
	font-size: 16px;
	font-weight: 600;
	line-height: 1.3;
	text-decoration: none;
}
.ang .ang-wahl-liste a:hover,
.ang .ang-wahl-liste a:focus-visible { border-color: var(--ang-blau); background: #eef5fc; text-decoration: none; }
.ang .ang-wahl-liste .ang-wahl-preis { flex: 0 0 auto; color: var(--ang-rot2); font-weight: 700; white-space: nowrap; }
.ang .ang-wahl-liste .ang-wahl-allg a { background: var(--ang-hell); }
body.ang-wahl-offen { overflow: hidden; }

/* ---------- Laptop ---------- */
@media (max-width: 1199.98px) {
	.ang { padding-top: 87px; } /* Kopf 55 px */
	.ang-raster { grid-template-columns: minmax(0, 1fr) 330px; column-gap: 30px; }
	.ang-karte { top: 75px; }
	.ang .ang-titel { font-size: 30px; }
}

/* ---------- Tablet + Handy: eine Spalte, Kasten nach dem Bild, feste Leiste ---------- */
@media (max-width: 991.98px) {
	.ang-raster {
		grid-template-columns: minmax(0, 1fr);
		grid-template-areas:
			"kopf"
			"banner"
			"karte"
			"inhalt";
	}
	.ang-banner { margin-bottom: 18px; }
	.ang-karte { position: static; margin: 0 0 28px; }
	.ang-leiste {
		position: fixed;
		left: 0;
		right: 0;
		bottom: 0;
		z-index: 1030;
		display: flex;
		align-items: center;
		gap: 10px;
		padding: 10px 14px calc(10px + env(safe-area-inset-bottom, 0px));
		background: #ffffff;
		border-top: 1px solid var(--ang-linie);
		box-shadow: 0 -8px 24px rgba(11, 31, 51, .12);
		transform: translateY(110%);
		visibility: hidden;
		transition: transform .25s ease, visibility 0s linear .25s;
	}
	body.ang-leiste-an .ang-leiste { transform: translateY(0); visibility: visible; transition: transform .25s ease, visibility 0s linear 0s; }
	body.ang-leiste-an #scroll-top { bottom: 84px !important; }
	.ang-leiste-preis { flex: 1 1 auto; min-width: 0; line-height: 1.1; }
	.ang-leiste-preis .ang-preis { margin: 0; white-space: nowrap; }
	.ang-leiste-preis .ang-preis-wert { font-size: 22px; }
	.ang-leiste-preis .ang-preis-pp { display: none; }
	.ang-leiste-preis .ang-preis-vor { font-size: 14px; }
	.ang .ang-leiste-anfrage {
		display: inline-flex;
		flex: 0 0 auto;
		align-items: center;
		justify-content: center;
		height: 48px;
		padding: 0 18px;
		border-radius: 12px;
		background: linear-gradient(180deg, var(--ang-rot1), var(--ang-rot2));
		color: #ffffff;
		font-size: 16px;
		font-weight: 700;
		text-decoration: none;
		white-space: nowrap;
	}
	.ang .ang-leiste-anfrage:hover { color: #ffffff; text-decoration: none; }
	.ang { padding-bottom: 96px; } /* Platz fuer die Leiste */
}

@media (max-width: 767.98px) {
	.ang { padding-top: 67px; } /* Kopf 47 px */
	.ang .ang-titel { font-size: 25px; margin-bottom: 10px; }
	.ang-meta { margin-bottom: 14px; }
	.ang-chip { font-size: 13px; padding: 3px 9px; }
	.ang .ang-bild { border-radius: 12px; }
	.ang-karte { padding: 18px 16px 14px; }
	.ang-preis-wert { font-size: 32px; }
	.ang-text { font-size: 16px; }
	.ang-deal { padding: 14px 14px 12px; }
	.ang-block { padding: 16px; }
	.ang-wahl { align-items: flex-end; padding: 0; }
	.ang-wahl-fenster { max-width: none; max-height: 85vh; border-radius: 18px 18px 0 0; }
	.ang .ang-wahl-liste { padding-bottom: calc(14px + env(safe-area-inset-bottom, 0px)); }
}
@media (max-width: 359.98px) {
	.ang .ang-titel { font-size: 23px; }
	.ang .ang-leiste-anfrage { padding: 0 12px; font-size: 15px; }
	.ang-leiste-preis .ang-preis-wert { font-size: 19px; }
}

@media (prefers-reduced-motion: reduce) {
	.ang-leiste, body.ang-leiste-an .ang-leiste { transition: none; }
}
