/*
 * Storno-Formular: klarer Top-Down-Wizard.
 * Fertige Schritte = kompakte, abgedunkelte Karten oben.
 * Aktiver Schritt  = hervorgehobene Karte in der Mitte.
 * Naechster Schritt = dezente Ankuendigung darunter.
 *
 * Farben: Die Werte unten sind die Rueckfallwerte. Gesetzt werden sie ueber
 * Storno-Formular > Einstellungen > Farben; von dort kommt ein kleiner
 * Style-Block, der dieselben Eigenschaften auf .snf-app ueberschreibt.
 */

.snf-app {
	--snf-accent: #2e7d32;
	--snf-accent-dark: #1b5e20;
	--snf-on-accent: #ffffff;
	--snf-accent-soft: #e6f4ea;
	--snf-surface: #f8f9fa;
	--snf-on-surface: #1d2327;
	--snf-border: #c6ccd3;

	max-width: 720px;
	margin: 0 auto;
	font-size: 16px;
	line-height: 1.5;
}

/*
 * Grundfarbe fuer alles Klickbare im Formular.
 *
 * Themes setzen haeufig "body button { color: #fff }". Elemente, die hier nur
 * einen hellen Hintergrund bekommen, waeren damit weiss auf hell - also
 * unlesbar.
 *
 * Das :where() ist der Kern: Die Regel zaehlt dadurch nur so viel wie
 * ".snf-app" allein. Das genuegt, um die Theme-Regel zu schlagen, laesst aber
 * jeder spaeteren Regel im Formular den Vortritt - etwa dem Hauptbutton, der
 * weisse Schrift auf der Primaerfarbe braucht. Ohne :where() waere diese
 * Regel staerker als die spezifischen und wuerde sie ueberstimmen.
 *
 * Sie muss deshalb oben stehen, vor den Regeln, die sie ueberschreiben.
 */
.snf-app :where( button, .snf-button, a.snf-button ) {
	color: var( --snf-on-surface, #1d2327 );
}

/*
 * Dasselbe fuer die Zustaende. Die weisse Schrift der Themes kommt haeufig
 * erst beim Ueberfahren ("body button:hover { color: #fff }"), und durch das
 * :hover zaehlt eine solche Regel mehr als die Grundregel darueber - und
 * mehr als jede einfache Klasse des Formulars.
 *
 * Das :is( :hover, … ) hebt die Grundregel deshalb um genau diesen einen
 * Schritt an: stark genug gegen das Theme, aber immer noch schwaecher als
 * eine Regel, die fuer denselben Zustand eine eigene Farbe setzt. Buttons
 * mit eigener Zustandsfarbe stehen weiter unten und behalten den Vortritt -
 * sie muessen den Zustand aber ausdruecklich benennen.
 */
.snf-app :where( button, .snf-button, a.snf-button ):is( :hover, :focus, :focus-visible, :active ) {
	color: var( --snf-on-surface, #1d2327 );
}

.snf-header {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 1rem;
	margin-bottom: 1rem;
}

.snf-title {
	margin: 0;
}

.snf-autosave {
	font-size: 0.8125rem;
	color: #4b8a3f;
	min-height: 1.25em;
}

.snf-autosave-error {
	color: #b32d2e;
}

/* --- Anbieter-Kontaktbox (oberhalb des Formulars) --- */

.snf-provider-box {
	max-width: 720px;
	margin: 0 auto 1.25rem;
	padding: 1rem 1.25rem;
	border: 1px solid #d7dbe0;
	border-left: 4px solid var( --snf-accent, #2e7d32 );
	border-radius: 10px;
	background: #f8fafc;
}

.snf-provider-head {
	display: flex;
	align-items: baseline;
	flex-wrap: wrap;
	gap: 0.5rem 0.75rem;
	margin-bottom: 0.75rem;
	padding-bottom: 0.5rem;
	border-bottom: 1px solid #e6e9ed;
}

.snf-provider-title {
	font-size: 0.72rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	color: var( --snf-accent, #2e7d32 );
}

.snf-provider-name {
	font-weight: 700;
	color: #1d2530;
}

.snf-provider-badge {
	font-size: 0.72rem;
	font-weight: 600;
	padding: 0.1rem 0.55rem;
	border-radius: 999px;
	background: var( --snf-accent-soft, #e6f4ea );
	color: var( --snf-accent-dark, #1b5e20 );
}

.snf-provider-grid {
	display: grid;
	grid-template-columns: 11em 1fr;
	gap: 0.35rem 1rem;
	margin: 0;
	font-size: 0.9rem;
}

.snf-provider-grid dt {
	color: #7a828c;
	font-weight: 600;
}

.snf-provider-grid dd {
	margin: 0;
	color: #333;
}

.snf-provider-grid dd a {
	color: var( --snf-accent, #2e7d32 );
}

@media ( max-width: 520px ) {
	.snf-provider-grid {
		grid-template-columns: 1fr;
		gap: 0.1rem;
	}

	.snf-provider-grid dd {
		margin-bottom: 0.5rem;
	}
}

/* --- Hinweise / Login --- */

.snf-notice {
	padding: 1.25rem 1.5rem;
	border: 1px solid #d7dbe0;
	border-radius: 10px;
	background: #f8f9fa;
}

/* Anmeldung direkt auf der Seite (wp_login_form). Das Markup kommt von
   WordPress, deshalb wird hier ueber den umgebenden Kasten gestylt. */
.snf-login {
	max-width: 24rem;
	margin: 1rem 0 0;
	padding: 1rem;
	border: 1px solid var( --snf-border, #c6ccd3 );
	border-radius: 8px;
	background: #ffffff;
}

.snf-login p {
	margin: 0 0 0.75rem;
}

.snf-login label {
	display: block;
	margin-bottom: 0.25rem;
	font-size: 0.85rem;
	font-weight: 600;
}

.snf-login input[type="text"],
.snf-login input[type="password"] {
	width: 100%;
	padding: 0.65rem 0.85rem;
	border: 1px solid var( --snf-border, #c6ccd3 );
	border-radius: 8px;
	font-size: 1rem;
	box-sizing: border-box;
}

.snf-login .login-remember label {
	display: inline;
	font-weight: 400;
}

.snf-login .login-submit {
	margin-bottom: 0;
}

.snf-login input[type="submit"] {
	display: inline-block;
	padding: 0.65rem 1.4rem;
	border: none;
	border-radius: 8px;
	background: var( --snf-accent, #2e7d32 );
	color: var( --snf-on-accent, #ffffff );
	font-size: 1rem;
	cursor: pointer;
}

.snf-login input[type="submit"]:is( :hover, :focus, :focus-visible, :active ) {
	background: var( --snf-accent-dark, #1b5e20 );
	color: var( --snf-on-accent, #ffffff );
}

.snf-login-error {
	margin: 1rem 0 0;
	padding: 0.65rem 0.85rem;
	border: 1px solid #e2b4b4;
	border-radius: 8px;
	background: #fdf0f0;
	color: #b32d2e;
	font-size: 0.9rem;
}

.snf-login-links {
	margin-top: 1rem;
	font-size: 0.9rem;
}

.snf-login-links a {
	color: var( --snf-accent-dark, #1b5e20 );
}

.snf-login-register {
	margin-top: 0.75rem;
}

/* --- Offene Entwuerfe --- */

.snf-drafts {
	margin-bottom: 1.5rem;
	padding: 1rem 1.25rem;
	border: 1px dashed #b8c0c9;
	border-radius: 10px;
	background: #fbfcfd;
}

.snf-drafts h3 {
	margin: 0 0 0.5rem;
	font-size: 1rem;
}

.snf-drafts ul {
	margin: 0;
	padding-left: 1.25rem;
}

/* --- Fertige Schritte (laufen nach oben raus) --- */

.snf-done-card {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	padding: 0.5rem 1rem;
	margin-bottom: 0.4rem;
	border: 1px solid #d3d9e0;
	border-radius: 8px;
	background: #f2f4f7;
	color: #3c4450;
	font-size: 0.9rem;
}

/* Der Schritt, der unten gerade geöffnet ist: gleiche Blautöne wie der
   aktive Block, damit der Zusammenhang sofort erkennbar ist. Der Ring wird
   per box-shadow gezogen, damit die Zeile nicht um 1px verspringt.
   Gegenstück ist .snf-done-closed (alle übrigen Zeilen), zusätzlich trägt
   jede Karte data-key und data-state für eigene Anpassungen. */
.snf-done-open {
	border-color: var( --snf-accent, #2e7d32 );
	box-shadow: 0 0 0 1px var( --snf-accent, #2e7d32 );
	background: var( --snf-accent-soft, #e6f4ea );
	color: #16324f;
	font-weight: 500;
}

.snf-done-open .snf-done-label {
	color: var( --snf-accent-dark, #1b5e20 );
}

/* "wird bearbeitet" als kleiner Marker rechts neben dem Wert. */
.snf-done-state {
	flex: 0 0 auto;
	padding: 0.1rem 0.5rem;
	border-radius: 999px;
	background: var( --snf-accent, #2e7d32 );
	color: #ffffff;
	font-size: 0.72rem;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.03em;
	white-space: nowrap;
}

@media ( max-width: 640px ) {
	/* Auf schmalen Bildschirmen zählt der Platz für den Wert mehr als der
	   Marker - die Einfärbung der Zeile bleibt als Hinweis. */
	.snf-done-state {
		display: none;
	}
}

.snf-done-label {
	flex: 0 0 8.5em;
	font-weight: 600;
	text-transform: uppercase;
	font-size: 0.72rem;
	letter-spacing: 0.03em;
	color: #5a6473;
}

.snf-done-value {
	flex: 1 1 auto;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.snf-done-edit {
	flex: 0 0 auto;
	border: none;
	background: none;
	color: var( --snf-accent-dark, #1b5e20 );
	cursor: pointer;
	font-size: 0.85rem;
	text-decoration: underline;
	padding: 0.15rem 0.3rem;
}

/* --- Aktiver Schritt --- */

.snf-step {
	margin: 1rem 0;
	padding: 1.5rem;
	border: 2px solid var( --snf-accent, #2e7d32 );
	border-radius: 12px;
	background: #ffffff;
	box-shadow: 0 6px 18px rgba( 20, 40, 60, 0.08 );
}

.snf-step-title {
	margin: 0 0 1rem;
	font-size: 1.2rem;
}

/* --- Hinweis, falls das Formular-Skript nicht laeuft --- */

.snf-js-warning {
	margin-top: 0.75rem;
	padding: 0.75rem 1rem;
	border: 1px solid #f0c36d;
	border-radius: 8px;
	background: #fdf6e3;
	color: #8a6d1a;
	font-size: 0.85rem;
}

/* --- Naechster Schritt (Vorschau) --- */

.snf-upcoming-card {
	padding: 0.75rem 1.25rem;
	border: 1px dashed #ccd2d9;
	border-radius: 10px;
	color: #9aa1aa;
	font-size: 0.9rem;
	background: #fafbfc;
}

/* --- Produkttyp-Buttons (quadratisch) --- */

.snf-type-grid {
	display: grid;
	grid-template-columns: repeat( auto-fill, minmax( 140px, 1fr ) );
	gap: 0.9rem;
}

.snf-type-button {
	aspect-ratio: 1 / 1;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 0.6rem;
	padding: 0.75rem;
	border: 1px solid #d0d5db;
	border-radius: 12px;
	background: #ffffff;
	cursor: pointer;
	transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.1s ease;
	text-align: center;
}

.snf-type-button:is( :hover, :focus-visible ) {
	border-color: var( --snf-accent, #2e7d32 );
	box-shadow: 0 4px 12px rgba( 20, 40, 60, 0.15 );
	transform: translateY( -2px );
}

/* --- Produkttyp mit Hintergrundbild (formatfüllend, zentriert) --- */

.snf-type-button.snf-type-image {
	background-size: cover;
	background-position: center;
	background-repeat: no-repeat;
	justify-content: flex-end;
	padding: 0;
	border-color: transparent;
	overflow: hidden;
	position: relative;
}

/* Abdunklung nach unten, damit die Beschriftung lesbar bleibt. */
.snf-type-button.snf-type-image::after {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	top: 0;
	background: linear-gradient( to top, rgba( 0, 0, 0, 0.7 ) 0%, rgba( 0, 0, 0, 0.25 ) 45%, rgba( 0, 0, 0, 0 ) 75% );
}

.snf-type-button.snf-type-image .snf-type-name {
	position: relative;
	z-index: 1;
	width: 100%;
	padding: 0.5rem 0.6rem 0.6rem;
	color: #ffffff;
	text-shadow: 0 1px 3px rgba( 0, 0, 0, 0.65 );
}

.snf-type-button.snf-type-image:is( :hover, :focus-visible ) {
	border-color: var( --snf-accent, #2e7d32 );
}

.snf-type-placeholder {
	width: 56px;
	height: 56px;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 8px;
	background: var( --snf-accent-soft, #e6f4ea );
	color: var( --snf-accent, #2e7d32 );
	font-size: 1.5rem;
	font-weight: 700;
}

.snf-type-name {
	font-size: 0.85rem;
	font-weight: 600;
	color: #333;
}

.snf-type-disabled {
	opacity: 0.45;
	cursor: not-allowed;
}

.snf-type-disabled:is( :hover, :focus-visible ) {
	transform: none;
	border-color: #d0d5db;
	box-shadow: none;
}

/* --- Eingaben & Suche --- */

.snf-input,
.snf-textarea {
	width: 100%;
	padding: 0.65rem 0.85rem;
	border: 1px solid var( --snf-border, #c6ccd3 );
	border-radius: 8px;
	font-size: 1rem;
	box-sizing: border-box;
}

.snf-textarea {
	margin-bottom: 0.75rem;
	resize: vertical;
}

/* Gesperrtes Feld - etwa der Preisnachlass, wenn eine Versicherung vorliegt.
   Der Wert bleibt lesbar, die Flaeche zeigt, dass hier nichts einzugeben
   ist. */
.snf-input:disabled,
.snf-textarea:disabled {
	background: var( --snf-surface, #f8f9fa );
	color: #6a727c;
	cursor: not-allowed;
}

.snf-search-status {
	margin: 0.5rem 0;
	font-size: 0.875rem;
	color: #7a828c;
	min-height: 1.25em;
}

.snf-results {
	list-style: none;
	margin: 0;
	padding: 0;
	max-height: 320px;
	overflow-y: auto;
}

.snf-result-button {
	display: block;
	width: 100%;
	text-align: left;
	padding: 0.55rem 0.85rem;
	margin-bottom: 0.25rem;
	border: 1px solid #e2e5e9;
	border-radius: 8px;
	background: var( --snf-surface, #f8f9fa );
	color: var( --snf-on-surface, #1d2327 );
	cursor: pointer;
	font-size: 0.95rem;
}

.snf-result-button:is( :hover, :focus-visible ) {
	background: var( --snf-accent-soft, #e6f4ea );
	border-color: var( --snf-accent, #2e7d32 );
	/* Die Schriftfarbe bleibt dieselbe wie im Ruhezustand: Ein Treffer soll
	   beim Ueberfahren nicht ploetzlich die Farbe wechseln. */
	color: var( --snf-on-surface, #1d2327 );
}

.snf-manual {
	margin-top: 0.9rem;
	padding-top: 0.9rem;
	border-top: 1px dashed #d7dbe0;
}

.snf-manual-hint {
	margin: 0 0 0.5rem;
	font-size: 0.85rem;
	color: #7a828c;
}

/* --- Hotel-Detailkarte (GIATA) --- */

.snf-hotel-preview {
	margin: 0.5rem 0 1rem;
}

.snf-hotel-preview:empty {
	display: none;
}

.snf-note-label {
	display: block;
	margin-bottom: 0.35rem;
	font-size: 0.85rem;
	color: #555c66;
	font-weight: 600;
}

.snf-summary-detail {
	margin-top: 1.25rem;
}

/* Kreuzfahrt: Auszug des XML-Teams unter der Zusammenfassung. */
.snf-summary-cruise-title {
	margin: 0 0 0.5rem;
}

.snf-summary-cruise-text {
	margin: 0 0 0.75rem;
	white-space: pre-line;
}

.snf-summary-cruise-route {
	margin-top: 0.5rem;
}

/* --- Verpflegung --- */

.snf-meal-grid {
	display: flex;
	flex-wrap: wrap;
	gap: 0.6rem;
}

.snf-meal-button {
	padding: 0.6rem 1.1rem;
	border: 1px solid var( --snf-border, #c6ccd3 );
	border-radius: 999px;
	background: #ffffff;
	cursor: pointer;
	font-size: 0.95rem;
}

.snf-meal-button:is( :hover, :focus-visible ),
.snf-meal-selected,
.snf-meal-selected:is( :hover, :focus-visible ) {
	border-color: var( --snf-accent, #2e7d32 );
	background: var( --snf-accent-soft, #e6f4ea );
	color: var( --snf-accent-dark, #1b5e20 );
}

/* --- Zimmer: Chip-Auswahlgruppen --- */

.snf-room-group {
	margin-bottom: 1.25rem;
	padding-bottom: 1rem;
	border-bottom: 1px solid #eceef0;
}

.snf-room-group:last-of-type {
	border-bottom: none;
}

.snf-room-group .snf-flight-heading {
	margin-bottom: 0.6rem;
}

.snf-chip-grid {
	display: flex;
	flex-wrap: wrap;
	gap: 0.4rem;
}

.snf-chip {
	padding: 0.4rem 0.85rem;
	border: 1px solid var( --snf-border, #c6ccd3 );
	border-radius: 999px;
	background: #ffffff;
	cursor: pointer;
	font-size: 0.875rem;
	line-height: 1.3;
	color: #333;
	transition: border-color 0.12s ease, background 0.12s ease;
}

.snf-chip:is( :hover, :focus-visible ) {
	border-color: var( --snf-accent, #2e7d32 );
	background: var( --snf-accent-soft, #e6f4ea );
	color: var( --snf-accent-dark, #1b5e20 );
}

.snf-chip-selected {
	border-color: var( --snf-accent, #2e7d32 );
	background: var( --snf-accent, #2e7d32 );
	color: var( --snf-on-accent, #ffffff );
	font-weight: 600;
}

.snf-chip.snf-chip-selected,
.snf-chip.snf-chip-selected:is( :focus, :active ) {
	border-color: var( --snf-accent, #2e7d32 );
	background: var( --snf-accent, #2e7d32 );
	color: var( --snf-on-accent, #ffffff );
}

.snf-chip.snf-chip-selected:is( :hover, :focus-visible ) {
	background: var( --snf-accent-dark, #1b5e20 );
	color: var( --snf-on-accent, #ffffff );
}

/* --- Beschriftete Formularfelder --- */

.snf-field {
	margin-bottom: 0.85rem;
}

.snf-field-label {
	display: block;
	margin-bottom: 0.3rem;
	font-size: 0.85rem;
	font-weight: 600;
	color: #555c66;
}

.snf-hint {
	margin: 0 0 0.75rem;
	font-size: 0.875rem;
	color: #7a828c;
}

/* Hinweis unter einem einzelnen Feld - sitzt dichter als .snf-hint, weil er
   zum Feld darueber gehoert und nicht zum Schritt. */
.snf-percent-calc {
	margin: 0 0 0.6rem;
	padding: 0.75rem;
	border: 1px dashed var( --snf-border, #c6ccd3 );
	border-radius: 8px;
	background: var( --snf-surface, #f8f9fa );
}

.snf-percent-caption {
	margin: 0 0 0.5rem;
	font-size: 0.85rem;
	color: #5f6872;
}

.snf-percent-row {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	align-items: stretch;
}

.snf-percent-row select.snf-input {
	flex: 1 1 12rem;
	width: auto;
	min-height: 2.75rem;
	background-color: #ffffff;
}

.snf-percent-row .snf-button {
	flex: 0 0 auto;
	min-height: 2.75rem;
	padding-top: 0;
	padding-bottom: 0;
	font-size: 0.95rem;
	white-space: nowrap;
}

.snf-field-hint {
	margin: 0.3rem 0 0;
	font-size: 0.85rem;
	color: #7a828c;
}

/* Meldung am Kopf eines Schritts - erklaert, warum er noch einmal offen
   steht. Faellt deutlicher aus als ein Hinweis am Feld. */
.snf-step-notice {
	margin: 0 0 1rem;
	padding: 0.65rem 0.85rem;
	border: 1px solid var( --snf-accent, #2e7d32 );
	border-radius: 8px;
	background: var( --snf-accent-soft, #e6f4ea );
	color: var( --snf-accent-dark, #1b5e20 );
	font-size: 0.9rem;
}

.snf-child-ages {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
}

.snf-child-ages .snf-field {
	flex: 0 0 120px;
	margin-bottom: 0.35rem;
}

/* --- Kombinierte Region-Auswahl (Zielgebiet + Ort) --- */

.snf-region-part {
	margin-bottom: 1.25rem;
}

.snf-region-part .snf-flight-heading {
	margin-bottom: 0.5rem;
}

.snf-region-city:empty {
	display: none;
}

/* --- Flüge --- */

.snf-flight-group {
	margin-bottom: 1.25rem;
	padding: 1rem;
	border: 1px solid #e2e5e9;
	border-radius: 10px;
	background: #fbfcfd;
}

.snf-flight-heading {
	margin: 0 0 0.75rem;
	font-size: 1rem;
}

.snf-segment {
	padding: 0.75rem;
	margin-bottom: 0.75rem;
	border: 1px solid #e2e5e9;
	border-radius: 8px;
	background: #fff;
}

.snf-segment-title {
	font-size: 0.75rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.03em;
	color: #9aa1aa;
	margin-bottom: 0.5rem;
}

/* Je Zeile: Flughafen 50 %, Datum 35 %, Uhrzeit 15 %. */
.snf-segment-grid {
	display: grid;
	/* Die Datumsspalte traegt ‹ Feld › und den Kalender-Button und
	   braucht deshalb mehr Platz als die reine Textspalte. */
	grid-template-columns: 40fr 44fr 16fr;
	gap: 0.6rem;
}

.snf-segment-grid .snf-field {
	margin-bottom: 0;
	min-width: 0;
}

/* Flugnummer über die volle Breite. */
.snf-segment-grid .snf-field-full {
	grid-column: 1 / -1;
}

@media ( max-width: 640px ) {
	.snf-segment-grid {
		grid-template-columns: 1fr;
	}
}

/* --- Flugblöcke (Hinflug / Zwischenflug / Rückflug) --- */

.snf-block-head .snf-flight-heading {
	margin: 0;
}

.snf-flight-chooser {
	margin-bottom: 1.25rem;
}

.snf-flight-chooser[hidden] {
	display: none;
}

.snf-flight-chooser-hint {
	margin: 0 0 0.5rem;
	color: #50575e;
}

.snf-flight-chooser-buttons {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
}

/* --- Abschnitts-Kopf mit Entfernen-Button --- */

.snf-segment-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.5rem;
	margin-bottom: 0.5rem;
}

.snf-segment-head .snf-segment-title {
	margin-bottom: 0;
}

.snf-segment-remove {
	flex: 0 0 auto;
	width: 1.6rem;
	height: 1.6rem;
	line-height: 1;
	padding: 0;
	border: 1px solid #e2b4b4;
	border-radius: 50%;
	background: #fff;
	color: #b32d2e;
	font-size: 1rem;
	cursor: pointer;
}

.snf-segment-remove:is( :hover, :focus-visible ) {
	background: #b32d2e;
	border-color: #b32d2e;
	color: #fff;
}

.snf-segment-remove[hidden] {
	display: none;
}

/* --- Datum mit Tages-Schrittschaltern --- */

.snf-date-stepper {
	display: flex;
	align-items: stretch;
	gap: 0.25rem;
}

.snf-date-stepper .snf-input {
	flex: 1 1 auto;
	min-width: 0;
}

/* In den schmalen Spalten Platz für die Werte schaffen: kompaktere
   Innenabstände; beim Uhrzeitfeld entfällt das native Icon, da darunter
   die eigene Schnellauswahl aufklappt. */
.snf-segment-grid .snf-input {
	padding-left: 0.45rem;
	padding-right: 0.3rem;
	font-size: 0.95rem;
}

.snf-segment-grid input[type="time"]::-webkit-calendar-picker-indicator {
	display: none;
}

.snf-segment-grid input[type="date"]::-webkit-calendar-picker-indicator {
	margin-left: 0;
	padding-left: 0;
}

.snf-date-step {
	flex: 0 0 auto;
	width: 1.4rem;
	border: 1px solid var( --snf-border, #c6ccd3 );
	border-radius: 6px;
	background: #f4f5f7;
	color: #555c66;
	font-size: 1rem;
	line-height: 1;
	cursor: pointer;
}

.snf-date-step:is( :hover, :focus-visible ) {
	border-color: var( --snf-accent, #2e7d32 );
	background: var( --snf-accent-soft, #e6f4ea );
	color: var( --snf-accent-dark, #1b5e20 );
}

/* --- Uhrzeit-Schnellauswahl --- */

.snf-timepicker-field {
	position: relative;
}

.snf-timepicker {
	position: absolute;
	left: 0;
	top: 100%;
	z-index: 40;
	display: flex;
	gap: 0.25rem;
	padding: 0.25rem;
	min-width: 8.5rem;
	background: #fff;
	border: 1px solid var( --snf-border, #c6ccd3 );
	border-radius: 8px;
	box-shadow: 0 6px 18px rgba( 20, 40, 60, 0.15 );
}

.snf-timepicker[hidden] {
	display: none;
}

.snf-time-col {
	max-height: 11rem;
	overflow-y: auto;
	display: flex;
	flex-direction: column;
	gap: 1px;
	flex: 1 1 0;
}

.snf-time-head {
	position: sticky;
	top: 0;
	background: #f4f5f7;
	color: #7a828c;
	font-size: 0.7rem;
	font-weight: 700;
	text-align: center;
	padding: 0.15rem 0;
	border-radius: 4px;
}

.snf-time-item {
	border: none;
	background: none;
	padding: 0.25rem 0.4rem;
	font-size: 0.85rem;
	text-align: center;
	cursor: pointer;
	border-radius: 4px;
	color: #333;
}

.snf-time-item:is( :hover, :focus-visible ) {
	background: var( --snf-accent-soft, #e6f4ea );
	color: var( --snf-accent-dark, #1b5e20 );
}

.snf-time-selected {
	background: var( --snf-accent, #2e7d32 );
	color: var( --snf-on-accent, #ffffff );
	font-weight: 600;
}

/* Die gewaehlte Uhrzeit behaelt ihre Flaeche auch beim Ueberfahren - sonst
   stuende die weisse Schrift auf dem hellen Hover-Hintergrund. */
.snf-time-selected:is( :hover, :focus-visible ) {
	background: var( --snf-accent-dark, #1b5e20 );
	color: var( --snf-on-accent, #ffffff );
}

/* --- Flughafen-Autovervollständigung --- */

.snf-autocomplete-field {
	position: relative;
}

.snf-autocomplete {
	list-style: none;
	margin: 0;
	padding: 0;
	position: absolute;
	left: 0;
	right: 0;
	top: 100%;
	z-index: 30;
	max-height: 240px;
	overflow-y: auto;
	background: #fff;
	border: 1px solid var( --snf-border, #c6ccd3 );
	border-radius: 8px;
	box-shadow: 0 6px 18px rgba( 20, 40, 60, 0.12 );
}

.snf-autocomplete-item {
	padding: 0.5rem 0.75rem;
	cursor: pointer;
	font-size: 0.9rem;
	border-bottom: 1px solid #f0f1f3;
}

.snf-autocomplete-item:last-child {
	border-bottom: none;
}

.snf-autocomplete-item:hover {
	background: var( --snf-accent-soft, #e6f4ea );
}

.snf-ac-name {
	display: block;
}

.snf-ac-ctx {
	display: block;
	font-size: 0.78rem;
	color: #7a828c;
}

/* --- Reisedauer --- */

.snf-duration-result {
	margin: 0.75rem 0 1rem;
	padding: 0.75rem 1rem;
	border-radius: 8px;
	background: var( --snf-accent-soft, #e6f4ea );
	color: var( --snf-accent-dark, #1b5e20 );
	font-weight: 600;
}

/* --- Preiskalkulation --- */

.snf-calc-panel {
	margin: 1rem 0;
	display: flex;
	flex-wrap: wrap;
	gap: 1rem;
}

.snf-calc-table {
	flex: 1 1 260px;
	border-collapse: collapse;
	font-size: 0.9rem;
}

.snf-calc-table td {
	padding: 0.4rem 0.6rem;
	border-bottom: 1px solid #eceef0;
}

.snf-calc-table td:last-child {
	text-align: right;
	white-space: nowrap;
	font-variant-numeric: tabular-nums;
}

.snf-calc-total td {
	border-top: 2px solid var( --snf-border, #c6ccd3 );
	border-bottom: none;
	font-weight: 700;
	color: var( --snf-accent-dark, #1b5e20 );
}

/* Erklaerung unter einer Zeile der Aufstellung: kleiner und zurueckhaltender
   als die Bezeichnung darueber - auch in der hervorgehobenen Summenzeile. */
.snf-calc-note {
	display: block;
	margin-top: 0.1rem;
	font-size: 0.8rem;
	font-weight: 400;
	color: #7a828c;
}

/* Laufende Aktion (reduzierte Provision) über der Aufstellung. */
.snf-calc-promo {
	margin: 0 0 0.75rem;
	padding: 0.6rem 0.8rem;
	border-left: 4px solid var( --snf-accent, #2e7d32 );
	border-radius: 6px;
	background: var( --snf-accent-soft, #e6f4ea );
	color: var( --snf-accent-dark, #1b5e20 );
	font-weight: 600;
}

/* --- Ja/Nein-Auswahl --- */

.snf-choice {
	display: flex;
	gap: 0.6rem;
	margin-bottom: 1rem;
}

.snf-choice-button {
	padding: 0.55rem 1.5rem;
	border: 1px solid var( --snf-border, #c6ccd3 );
	border-radius: 999px;
	background: #fff;
	cursor: pointer;
	font-size: 0.95rem;
}

.snf-choice-button:is( :hover, :focus-visible ),
.snf-choice-selected,
.snf-choice-selected:is( :hover, :focus-visible ) {
	border-color: var( --snf-accent, #2e7d32 );
	background: var( --snf-accent-soft, #e6f4ea );
	color: var( --snf-accent-dark, #1b5e20 );
	font-weight: 600;
}

.snf-conditional[hidden] {
	display: none;
}

/* --- Buttons allgemein --- */

.snf-button {
	display: inline-block;
	padding: 0.65rem 1.4rem;
	border: none;
	border-radius: 8px;
	background: var( --snf-accent, #2e7d32 );
	color: var( --snf-on-accent, #ffffff );
	font-size: 1rem;
	cursor: pointer;
	text-decoration: none;
}

/* Haupt- und Nebenbutton benennen alle Zustaende ausdruecklich: Ohne das
   greift die Grundregel oben und der Hauptbutton bekaeme beim Ueberfahren
   oder im Tastaturfokus dunkle Schrift auf dunklem Gruen. */
.snf-button:is( :hover, :focus, :focus-visible, :active ) {
	background: var( --snf-accent-dark, #1b5e20 );
	color: var( --snf-on-accent, #ffffff );
}

/* Weiter-Buttons: nie direkt an der letzten Auswahl kleben. */
.snf-button-next {
	margin-top: 10px;
}

.snf-button-secondary {
	background: #f0f1f3;
	color: #333;
	border: 1px solid var( --snf-border, #c6ccd3 );
}

.snf-button-secondary:is( :hover, :focus, :focus-visible, :active ) {
	background: #e2e5e9;
	color: #333;
}

/* --- Zusammenfassung --- */

.snf-summary {
	margin-top: 1.5rem;
	padding: 1.5rem;
	border: 2px solid #4b8a3f;
	border-radius: 12px;
	background: #ffffff;
}

.snf-summary-table {
	width: 100%;
	border-collapse: collapse;
	margin-bottom: 1.25rem;
}

.snf-summary-table th,
.snf-summary-table td {
	text-align: left;
	vertical-align: top;
	padding: 0.55rem 0.75rem;
	border-bottom: 1px solid #eceef0;
}

.snf-summary-table th {
	width: 30%;
	color: #7a828c;
	font-size: 0.8rem;
	text-transform: uppercase;
	letter-spacing: 0.03em;
}

/* Mehrzeilige Zusammenfassungen (Flüge, Preise, Versicherung) mit
   erhaltenen Zeilenumbrüchen darstellen. */
.snf-summary-table td {
	white-space: pre-line;
}

/* Wieder geöffnetes Formular: Hinweis und Haken "Beschreibung neu aufbauen". */
.snf-update {
	margin: 1rem 0;
	padding: 0.75rem 1rem;
	border: 1px solid #4b8a3f;
	border-radius: 8px;
	background: #f2f9f0;
}

.snf-update[hidden],
.snf-update-rebuild[hidden],
.snf-update-hint[hidden] {
	display: none;
}

.snf-update p {
	margin: 0 0 0.5rem;
}

.snf-update-rebuild {
	display: block;
	font-weight: 600;
}

.snf-update-hint {
	margin: 0.25rem 0 0;
	font-size: 0.9rem;
	opacity: 0.8;
}

.snf-summary-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
}

.snf-final-message {
	padding: 1.5rem;
	border: 2px solid #4b8a3f;
	border-radius: 12px;
	background: #f2f9f0;
	font-size: 1.05rem;
}

/* --- Druckansicht: nur die Zusammenfassung drucken --- */

@media print {
	body.snf-printing * {
		visibility: hidden;
	}

	body.snf-printing .snf-summary,
	body.snf-printing .snf-summary * {
		visibility: visible;
	}

	body.snf-printing .snf-summary {
		position: absolute;
		left: 0;
		top: 0;
		width: 100%;
		border: none;
	}

	body.snf-printing .snf-summary-actions {
		display: none;
	}
}

/* ================================================================
 * Dashboard: Übersicht der gespeicherten Formulare
 * ================================================================ */

.snf-dashboard {
	max-width: 900px;
	margin: 0 auto;
	font-size: 16px;
}

.snf-dashboard-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	flex-wrap: wrap;
	margin-bottom: 1rem;
}

.snf-dashboard-head .snf-title {
	margin: 0;
}

.snf-dashboard-hint {
	margin: 0 0 1rem;
	padding: 0.6rem 0.9rem;
	background: #eef4fb;
	border-radius: 8px;
	font-size: 0.875rem;
	color: var( --snf-accent-dark, #1b5e20 );
}

.snf-dashboard-empty {
	padding: 1.5rem;
	border: 1px dashed var( --snf-border, #c6ccd3 );
	border-radius: 10px;
	color: #7a828c;
	text-align: center;
}

.snf-dashboard-table {
	width: 100%;
	border-collapse: collapse;
	background: #fff;
	border: 1px solid #e2e5e9;
	border-radius: 10px;
	overflow: hidden;
}

.snf-dashboard-table th,
.snf-dashboard-table td {
	text-align: left;
	padding: 0.7rem 0.9rem;
	border-bottom: 1px solid #eceef0;
	vertical-align: middle;
}

.snf-dashboard-table thead th {
	background: #f4f5f7;
	font-size: 0.75rem;
	text-transform: uppercase;
	letter-spacing: 0.03em;
	color: #7a828c;
}

.snf-dashboard-table tbody tr:last-child td {
	border-bottom: none;
}

.snf-dashboard-table tbody tr:hover {
	background: #f9fbfd;
}

.snf-dashboard-muted {
	color: #9aa1aa;
	font-size: 0.85rem;
}

.snf-badge {
	display: inline-block;
	padding: 0.15rem 0.6rem;
	border-radius: 999px;
	font-size: 0.78rem;
	font-weight: 600;
}

.snf-badge-draft {
	background: #fdf1d6;
	color: #8a6d1a;
}

.snf-badge-submitted {
	background: #e6f4ea;
	color: #1e7e34;
}

.snf-badge-archived {
	background: #e2e5e9;
	color: #555c66;
}

.snf-button-small {
	padding: 0.4rem 0.9rem;
	font-size: 0.875rem;
}

/* Responsive: Tabelle auf schmalen Screens als Karten stapeln. */
@media ( max-width: 640px ) {
	.snf-dashboard-table,
	.snf-dashboard-table tbody,
	.snf-dashboard-table tr,
	.snf-dashboard-table td {
		display: block;
		width: 100%;
	}

	.snf-dashboard-table thead {
		display: none;
	}

	.snf-dashboard-table tr {
		border-bottom: 1px solid #e2e5e9;
		padding: 0.5rem 0;
	}

	.snf-dashboard-table td {
		border: none;
		padding: 0.35rem 0.9rem;
	}

	.snf-dashboard-table td::before {
		content: attr( data-label ) ": ";
		font-weight: 600;
		color: #7a828c;
	}
}

/* ----------------------------------------------------------------
 * Verarbeitungs-Overlay beim Absenden
 * ---------------------------------------------------------------- */
.snf-processing {
	position: fixed;
	inset: 0;
	z-index: 100000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 1.5rem;
	background: rgba( 15, 23, 42, 0.55 );
}

.snf-processing-box {
	max-width: 26rem;
	width: 100%;
	background: #ffffff;
	border-radius: 12px;
	padding: 2rem 1.75rem;
	text-align: center;
	box-shadow: 0 12px 40px rgba( 0, 0, 0, 0.25 );
}

.snf-processing-spinner {
	width: 44px;
	height: 44px;
	margin: 0 auto 1rem;
	border: 4px solid var( --snf-accent-soft, #e6f4ea );
	border-top-color: var( --snf-accent, #2e7d32 );
	border-radius: 50%;
	animation: snf-spin 0.9s linear infinite;
}

@keyframes snf-spin {
	to { transform: rotate( 360deg ); }
}

.snf-processing-title {
	font-size: 1.1rem;
	font-weight: 700;
	color: #1f2937;
	margin-bottom: 0.5rem;
}

.snf-processing-status {
	color: var( --snf-accent, #2e7d32 );
	font-weight: 600;
	min-height: 1.4em;
	transition: opacity 0.2s ease;
}

.snf-processing-hint {
	margin-top: 0.75rem;
	font-size: 0.85rem;
	color: #7a828c;
}

@media ( prefers-reduced-motion: reduce ) {
	.snf-processing-spinner { animation-duration: 2.4s; }
}

/* Kleiner Rotator in den Statuszeilen der Suchen. */
.snf-spinner {
	display: inline-block;
	width: 0.95em;
	height: 0.95em;
	margin-right: 0.15em;
	vertical-align: -0.12em;
	border: 2px solid var( --snf-accent-soft, #e6f4ea );
	border-top-color: var( --snf-accent, #2e7d32 );
	border-radius: 50%;
	animation: snf-spin 0.8s linear infinite;
}

@media ( prefers-reduced-motion: reduce ) {
	.snf-spinner { animation-duration: 2.4s; }
}

/* Ortssuche: die Felder darunter sind gesperrt, solange gesucht wird. */
.snf-place-fields {
	position: relative;
}

.snf-place-fields.snf-is-busy::after {
	content: '';
	position: absolute;
	inset: 0;
	z-index: 5;
	border-radius: 8px;
	background: rgba( 255, 255, 255, 0.7 );
	cursor: progress;
}

.snf-place-fields.snf-is-busy::before {
	content: '';
	position: absolute;
	top: 1.4rem;
	left: 50%;
	z-index: 6;
	width: 30px;
	height: 30px;
	margin-left: -15px;
	border: 3px solid var( --snf-accent-soft, #e6f4ea );
	border-top-color: var( --snf-accent, #2e7d32 );
	border-radius: 50%;
	animation: snf-spin 0.8s linear infinite;
}

/* ----------------------------------------------------------------
 * Pflichtfelder: Markierung, Legende und Fehlerhinweis
 * ---------------------------------------------------------------- */
.snf-required {
	color: #b32d2e;
	font-weight: 700;
}

.snf-required-legend {
	margin: 1rem 0 0;
	font-size: 0.85rem;
	color: #7a828c;
}

.snf-field-error {
	margin: 0.5rem 0 0.75rem;
	padding: 0.5rem 0.75rem;
	border-left: 4px solid #b32d2e;
	background: #fcf0f1;
	color: #b32d2e;
	font-size: 0.9rem;
	font-weight: 600;
}

.snf-input-invalid,
input.snf-input-invalid,
textarea.snf-input-invalid {
	border-color: #b32d2e;
	box-shadow: 0 0 0 1px #b32d2e;
}

/* ----------------------------------------------------------------
 * Übergreifende Ortssuche im Reiseziel-Schritt
 * ---------------------------------------------------------------- */
.snf-place-search {
	margin-bottom: 1.25rem;
	padding: 1rem;
	border: 1px solid #d6e2ee;
	border-radius: 8px;
	background: #f6fafd;
}

.snf-place-search .snf-hint {
	margin-top: 0;
}

.snf-region-part-holder + .snf-region-part-holder {
	margin-top: 0.5rem;
}

/* ------------------------------------------------------------------
   Datumsfelder (maskierte Texteingabe tt.mm.jjjj)
   ------------------------------------------------------------------ */

.snf-date-input {
	font-variant-numeric: tabular-nums;
}

/* Datumsfeld mit Kalender-Button daneben. */
.snf-date-wrap {
	position: relative;
	display: flex;
	align-items: stretch;
	gap: 0.25rem;
}

.snf-date-wrap .snf-date-input {
	flex: 1 1 auto;
	min-width: 0;
}

/* Das native Datumsfeld dient nur als Auslöser für die Browser-Auswahl
   und ist unsichtbar - display:none würde showPicker() in manchen Browsern
   blockieren.

   Der Browser hängt seine Kalenderauswahl an dieses Element. Es liegt
   deshalb als flache Leiste über die volle Feldbreite am unteren Rand,
   damit der Kalender direkt UNTER dem Datumsfeld aufgeht und nicht
   seitlich daneben. */
.snf-date-native {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	width: auto;
	height: 1px;
	min-width: 0;
	padding: 0;
	border: 0;
	opacity: 0;
	pointer-events: none;
}

/* Kalender-Button: bewusst gross genug fuer Touch und sichtbar am Feld
   angesetzt, damit die Auswahl per Klick nicht uebersehen wird. */
.snf-date-picker-button {
	flex: 0 0 auto;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 2.75rem;
	min-height: 2.75rem;
	padding: 0;
	color: #1d3f6e;
	background: #eef2f7;
	border: 1px solid #b9c4d1;
	border-radius: 4px;
	cursor: pointer;
}

.snf-date-picker-button:is( :hover, :focus-visible ) {
	background: #dde5ee;
	border-color: #8ea3bb;
	color: #1d3f6e;
}

.snf-date-picker-button:focus-visible {
	outline: 2px solid #1d3f6e;
	outline-offset: 1px;
}

/* Browser ohne showPicker(): natives Datumsfeld als zweite Eingabemoeglichkeit. */
.snf-date-fallback {
	flex: 0 0 auto;
	width: auto;
	max-width: 11rem;
}

/* Hinweis unter einem Feld, wenn ein Wert automatisch angepasst wurde
   (z. B. Angebotsgültigkeit auf Reisebeginn - 1 zurückgezogen). */
.snf-field-note {
	margin-top: 0.3rem;
	font-size: 0.88rem;
	color: #1d3f6e;
}

.snf-field-note[hidden] {
	display: none;
}

/* Angebotsgültigkeit nutzt denselben Aufbau wie die Flugabschnitte,
   braucht aber nur zwei Spalten: Datum und Uhrzeit. */
.snf-validity-grid {
	grid-template-columns: 60fr 40fr;
	max-width: 30rem;
}

/* Die Flugabschnitte nutzen denselben Kalender-Button wie die uebrigen
   Datumsfelder - in den schmalen Spalten kompakter, damit ‹ Feld › und
   Kalender nebeneinander passen. */
.snf-date-stepper {
	position: relative;
}

.snf-segment-grid .snf-date-stepper {
	gap: 0.15rem;
}

.snf-segment-grid .snf-date-picker-button {
	width: 1.9rem;
	min-height: 0;
	align-self: stretch;
}

.snf-segment-grid .snf-date-picker-button svg {
	width: 16px;
	height: 16px;
}

/* ------------------------------------------------------------------
   Termin-/Routenauswahl der Kreuzfahrt (Kreuzfahrt-Manager, XMLteam)
   ------------------------------------------------------------------ */

.snf-route-box {
	margin: 0.75rem 0 1rem;
	padding: 0.75rem;
	border: 1px solid #d3d9e0;
	border-radius: 8px;
	background: #f7f9fb;
}

.snf-route-box[hidden] {
	display: none;
}

.snf-route-list {
	display: flex;
	flex-direction: column;
	gap: 0.3rem;
	max-height: 16rem;
	overflow: auto;
	margin-top: 0.4rem;
}

.snf-route-item {
	text-align: left;
	padding: 0.45rem 0.6rem;
	border: 1px solid #ccd3da;
	border-radius: 6px;
	background: #ffffff;
	cursor: pointer;
	font-size: 0.92rem;
}

.snf-route-item:is( :hover, :focus-visible ) {
	border-color: var( --snf-accent, #2e7d32 );
	background: var( --snf-accent-soft, #e6f4ea );
}

.snf-route-selected,
.snf-route-selected:is( :hover, :focus-visible ) {
	border-color: var( --snf-accent, #2e7d32 );
	background: var( --snf-accent-soft, #e6f4ea );
	font-weight: 600;
}

/* Vorschau des Reiseverlaufs - das Markup kommt fertig aus dem
   Kreuzfahrt-Manager und bringt seine eigenen Stile mit. */
.snf-route-preview {
	margin-top: 0.75rem;
}

.snf-route-html {
	max-height: 26rem;
	overflow: auto;
	padding: 0.5rem;
	border: 1px solid #e2e5e9;
	border-radius: 6px;
	background: #ffffff;
}

/* Schiffsauswahl im Schritt "Reederei & Schiff" – erscheint erst, wenn eine
   Reederei gewählt ist. */
.snf-ship-box {
	margin-top: 1rem;
	padding-top: 0.75rem;
	border-top: 1px solid #e2e5e9;
}

.snf-ship-box[hidden] {
	display: none;
}

/* Kabinenvarianten aus den Schiffsdaten (Kreuzfahrt-Manager). */
.snf-variant-box {
	margin-bottom: 1rem;
	padding: 0.75rem;
	border: 1px solid #d3d9e0;
	border-radius: 8px;
	background: #f7f9fb;
}

.snf-variant-box[hidden] {
	display: none;
}

/* Rückfrage nach dem Veranstalter, wenn beim Hotel ein GIATA-Kürzel fehlt. */
.snf-provider-ask {
	margin-top: 1rem;
	padding: 0.75rem;
	border: 1px solid #b9c4d1;
	border-radius: 8px;
	background: #f7f9fb;
}

/* Bei beliebten Hotels sind es schnell 20 Veranstalter - die Chips bekommen
   deshalb eine feste Höhe. */
.snf-provider-ask .snf-chip-grid {
	max-height: 14rem;
	overflow: auto;
	margin-top: 0.4rem;
}

/* ------------------------------------------------------------------
   Reiseverlauf der Rundreise: ein Block je Tag
   ------------------------------------------------------------------ */

.snf-day {
	margin-bottom: 0.9rem;
	padding: 0.75rem;
	border: 1px solid #d3d9e0;
	border-radius: 8px;
	background: #f9fafb;
}

.snf-day-grid {
	display: grid;
	grid-template-columns: 40fr 60fr;
	gap: 0.6rem;
}

.snf-day-grid .snf-field {
	margin-bottom: 0;
	min-width: 0;
}

@media ( max-width: 640px ) {
	.snf-day-grid {
		grid-template-columns: 1fr;
	}
}

/* Einfacher Formatierungs-Editor für die Tagesbeschreibung. */
.snf-richtext-bar {
	display: flex;
	gap: 0.25rem;
	margin-bottom: 0.3rem;
}

.snf-richtext-button {
	width: 2rem;
	height: 2rem;
	border: 1px solid #ccd3da;
	border-radius: 4px;
	background: #f4f6f8;
	cursor: pointer;
	font-size: 0.9rem;
	line-height: 1;
}

.snf-richtext-button:is( :hover, :focus-visible ) {
	background: #e8ecef;
	border-color: #8ea3bb;
}

.snf-richtext-area {
	min-height: 6rem;
	height: auto;
	overflow: auto;
	text-align: left;
	white-space: normal;
}

.snf-richtext-area:empty::before {
	content: attr(data-placeholder);
	color: #8b949e;
}

.snf-richtext-area p {
	margin: 0 0 0.5em;
}

/* Reiseverlauf im Produkt. */
.snf-itinerary .snf-day-text {
	margin-top: 0.2em;
}

/* Katalogsuche für Rundreisen. */
.snf-tour-box {
	margin-bottom: 1.2rem;
	padding: 0.75rem;
	border: 1px solid #d3d9e0;
	border-radius: 8px;
	background: #f7f9fb;
}

.snf-tour-chosen[hidden] {
	display: none;
}

.snf-tour-title {
	margin: 0.4rem 0;
	font-weight: 600;
}

.snf-tour-html {
	max-height: 26rem;
	overflow: auto;
	margin-top: 0.6rem;
	padding: 0.5rem;
	border: 1px solid #e2e5e9;
	border-radius: 6px;
	background: #ffffff;
}

/* Titelbild der Rundreise: Vorschlaege, Suche und kleine Galerie. */
.snf-chips {
	display: flex;
	flex-wrap: wrap;
	gap: 0.4rem;
	margin: 0 0 0.6rem;
}

/* Scoped to .snf-chips: the room and cabin step uses .snf-chip too (.snf-chip-grid)
   and keeps its own selected state. */
.snf-chips .snf-chip {
	padding: 0.3rem 0.8rem;
	border: 1px solid var( --snf-border, #c6ccd3 );
	border-radius: 999px;
	background: #fff;
	color: #333;
	font-size: 0.9rem;
	cursor: pointer;
}

.snf-chips .snf-chip:is( :hover, :focus, :focus-visible, :active ),
.snf-chips .snf-chip.is-active {
	border-color: var( --snf-accent, #2e7d32 );
	background: var( --snf-accent-soft, #e6f4ea );
	color: var( --snf-accent-dark, #1b5e20 );
}

.snf-image-search {
	display: flex;
	gap: 0.5rem;
	margin: 0 0 0.5rem;
}

.snf-image-search .snf-input {
	flex: 1 1 auto;
}

.snf-imggrid {
	display: grid;
	grid-template-columns: repeat( auto-fill, minmax( 120px, 1fr ) );
	gap: 0.5rem;
	margin: 0.5rem 0;
	padding: 0;
	list-style: none;
}

.snf-imgcard {
	position: relative;
	display: block;
	width: 100%;
	padding: 0;
	border: 2px solid transparent;
	border-radius: 6px;
	background: #f0f1f3;
	overflow: hidden;
	cursor: pointer;
}

.snf-imgcard img {
	display: block;
	width: 100%;
	height: 84px;
	object-fit: cover;
}

.snf-imgcard-license {
	display: block;
	padding: 0.15rem 0.3rem;
	font-size: 0.7rem;
	color: #555;
	text-align: left;
}

/* Alle Zustaende ausdruecklich: Ein Theme faerbt Buttons beim Ueberfahren
   gern gruen mit gruener Schrift - dann waere die Lizenzzeile unlesbar. */
.snf-imgcard:is( :hover, :focus, :focus-visible, :active ) {
	border-color: var( --snf-border, #c6ccd3 );
	background: #f0f1f3;
	color: #555;
	box-shadow: none;
}

.snf-imgcard:is( :hover, :focus, :focus-visible, :active ) .snf-imgcard-license {
	background: transparent;
	color: #555;
}

.snf-imgcard.is-selected,
.snf-imgcard.is-selected:is( :hover, :focus, :focus-visible, :active ) {
	border-color: var( --snf-accent, #2e7d32 );
	box-shadow: 0 0 0 1px var( --snf-accent, #2e7d32 );
}

.snf-image-chosen {
	margin: 0.5rem 0 0;
}

.snf-image-credit {
	margin: 0 0 0.3rem;
	font-size: 0.9rem;
}

.snf-image-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
}

/* Titelbild und Tagesbild: Fotosuche oder eigener Upload. */
.snf-image-modes {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	margin: 0 0 0.8rem;
}

.snf-image-mode,
.snf-image-mode:is( :hover, :focus, :focus-visible, :active ) {
	padding: 0.45rem 0.9rem;
	border: 1px solid var( --snf-border, #c6ccd3 );
	border-radius: 6px;
	background: #fff;
	color: #1d2327;
	font-size: 0.95rem;
	cursor: pointer;
	box-shadow: none;
}

.snf-image-mode.is-active,
.snf-image-mode.is-active:is( :hover, :focus, :focus-visible, :active ) {
	border-color: var( --snf-accent, #2e7d32 );
	background: var( --snf-accent-soft, #e6f4ea );
	box-shadow: 0 0 0 1px var( --snf-accent, #2e7d32 );
}

.snf-upload {
	margin: 0.5rem 0 1rem;
}

.snf-upload-preview,
.snf-upload-done {
	display: block;
	max-width: 100%;
	max-height: 200px;
	margin: 0 0 0.8rem;
	border-radius: 6px;
	object-fit: contain;
}

.snf-upload-terms {
	max-height: 11rem;
	margin: 0.4rem 0 0.8rem;
	padding: 0.6rem 0.8rem;
	overflow-y: auto;
	border: 1px solid var( --snf-border, #c6ccd3 );
	border-radius: 6px;
	background: #f6f7f7;
	color: #1d2327;
	font-size: 0.85rem;
}

.snf-upload-terms p {
	margin: 0 0 0.45rem;
}

.snf-upload-terms .snf-upload-term-head {
	margin-top: 0.7rem;
	font-weight: 600;
}

.snf-upload-check {
	display: flex;
	align-items: flex-start;
	gap: 0.5rem;
	margin: 0 0 0.6rem;
	font-size: 0.92rem;
	cursor: pointer;
}

.snf-upload-check input {
	flex: 0 0 auto;
	margin-top: 0.2rem;
}

/* Zustimmung zur Anzeige der Vorschaubilder (Titelbild). */
.snf-consent {
	margin: 0 0 1rem;
	padding: 0.85rem 1rem;
	border: 1px solid var( --snf-accent, #2e7d32 );
	border-radius: 8px;
	background: var( --snf-accent-soft, #e6f4ea );
	color: #1d2327;
	font-size: 0.95rem;
}

.snf-consent p {
	margin: 0 0 0.6rem;
}

.snf-consent-title {
	font-weight: 600;
}

.snf-image-revoke {
	margin: 0.8rem 0 0;
}

.snf-link-button,
.snf-link-button:is( :hover, :focus, :focus-visible, :active ) {
	padding: 0;
	border: none;
	background: none;
	color: #555;
	font-size: 0.85rem;
	text-decoration: underline;
	cursor: pointer;
	box-shadow: none;
}

/* Optionales Bild zu einem Reisetag (Reiseverlauf). */
.snf-day-image {
	margin: 0.6rem 0 0;
}

.snf-day-image-chosen {
	display: flex;
	gap: 0.8rem;
	align-items: flex-start;
}

.snf-day-image-chosen img {
	flex: 0 0 auto;
	width: 140px;
	max-width: 35%;
	height: auto;
	border-radius: 6px;
}

.snf-day-image-info {
	flex: 1 1 auto;
	min-width: 0;
}

.snf-day-image-info .snf-image-credit {
	margin: 0 0 0.5rem;
}

@media ( max-width: 560px ) {
	.snf-day-image-chosen {
		flex-direction: column;
	}

	.snf-day-image-chosen img {
		max-width: 60%;
	}
}

/* Anzahl Tage je Eintrag im Reiseverlauf. */
.snf-day-span-field {
	margin-top: 0.6rem;
	margin-bottom: 0;
}

.snf-day-span-field .snf-day-span {
	width: 6rem;
}

.snf-day-span-field .snf-hint {
	margin: 0.25rem 0 0;
}
