/*
 * Frontend-Styles com_reservierung.
 * Hausfarben Hinode: Weinrot #9b1b1b, Gold #c9a24b / #e8c87a.
 * Edle Anmutung: Serifen-Titel, Papier-Karte, Gold-Linien.
 * Keine externen Fonts (DSGVO) - hochwertiger System-Serif-Stack.
 */

.resv-form-wrap {
	--resv-wine: #9b1b1b;
	--resv-wine-dark: #7d1414;
	--resv-gold: #c9a24b;
	--resv-gold-light: #e8c87a;
	--resv-ink: #2b2b2b;
	--resv-paper: #fcfaf6;
	--resv-line: #ddd3c0;
	--resv-serif: Georgia, 'Palatino Linotype', 'Book Antiqua', 'Times New Roman', serif;

	max-width: 760px;
	margin: 0 auto;
	padding: 10px 0 40px;
	color: var(--resv-ink);
	font-size: 16px;
	line-height: 1.55;
}

/* ---------- Titel ---------- */

.resv-title {
	font-family: var(--resv-serif);
	font-weight: 400;
	letter-spacing: 0.04em;
	color: var(--resv-wine);
	text-align: center;
	margin-bottom: 6px;
}

.resv-title::after {
	content: '';
	display: block;
	width: 72px;
	height: 2px;
	margin: 14px auto 0;
	background: linear-gradient(90deg, transparent, var(--resv-gold), transparent);
}

.resv-subtitle {
	font-family: var(--resv-serif);
	font-weight: 400;
	letter-spacing: 0.03em;
	color: var(--resv-wine);
	margin: 30px 0 12px;
	font-size: 1.3em;
}

/* ---------- Hinweis-/Statusboxen ---------- */

.resv-notice {
	background: #f7f4ef;
	border-left: 4px solid var(--resv-gold);
	padding: 14px 18px;
	margin: 18px 0;
	border-radius: 0 6px 6px 0;
	color: var(--resv-ink);
}

.resv-notice p:last-child {
	margin-bottom: 0;
}

/* Mitteilung am Seitenende (unter dem Formular) */
.resv-notice-bottom {
	margin-top: 22px;
}

.resv-error {
	background: #fdf0f0;
	border-left: 4px solid var(--resv-wine);
	color: #7a1515;
	padding: 14px 18px;
	margin: 18px 0;
	border-radius: 0 6px 6px 0;
}

.resv-success {
	background: #f0f7f0;
	border-left: 4px solid #3d8b40;
	color: #285c2a;
	padding: 14px 18px;
	margin: 18px 0;
	border-radius: 0 6px 6px 0;
}

/* ---------- Formular-Karte ---------- */

.resv-form {
	background: var(--resv-paper);
	border: 1px solid var(--resv-line);
	border-radius: 10px;
	box-shadow: 0 10px 30px rgba(40, 25, 10, 0.08);
	padding: 28px clamp(18px, 4vw, 36px) 30px;
	margin-top: 18px;
}

.resv-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 18px 22px;
	margin-bottom: 16px;
}

.resv-field {
	display: flex;
	flex-direction: column;
	position: relative;
}

.resv-field-wide {
	grid-column: 1 / -1;
}

.resv-field > label,
.resv-notify-label {
	font-family: var(--resv-serif);
	font-size: 15px;
	letter-spacing: 0.05em;
	text-transform: uppercase;
	color: #6d6353;
	margin-bottom: 6px;
}

.resv-field input[type="text"],
.resv-field input[type="email"],
.resv-field input[type="tel"],
.resv-field input[type="number"],
.resv-field select,
.resv-field textarea {
	padding: 11px 14px;
	border: 1px solid var(--resv-line);
	border-radius: 6px;
	font-size: 16px;
	background: #fff;
	color: var(--resv-ink);
	width: 100%;
	box-sizing: border-box;
	transition: border-color 0.15s, box-shadow 0.15s;
}

/* Selects gegen Template-Styles (rt_clarity) normalisieren: feste Hoehe,
   vertikal zentrierter Text, eigener goldener Pfeil. */
.resv-form-wrap .resv-field select {
	-webkit-appearance: none;
	-moz-appearance: none;
	appearance: none;
	height: 48px;
	line-height: normal;
	padding: 0 40px 0 14px;
	margin: 0;
	background-color: #fff;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23c9a24b' d='M1.4 0 6 4.6 10.6 0 12 1.4l-6 6-6-6z'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 14px center;
}

.resv-form-wrap .resv-field select::-ms-expand {
	display: none;
}

.resv-field input:focus,
.resv-field select:focus,
.resv-field textarea:focus {
	border-color: var(--resv-gold);
	outline: none;
	box-shadow: 0 0 0 3px rgba(201, 162, 75, 0.22);
}

.resv-field-hint {
	font-size: 13px;
	color: var(--resv-wine);
	margin-top: 5px;
	min-height: 15px;
}

/* Informativer Hinweis (kein Fehler) - dezent grau */
.resv-sms-info {
	color: #8a8070;
}

/* ---------- Live-Validierung ---------- */

.resv-field input.is-valid,
.resv-field select.is-valid {
	border-color: #3d8b40;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3E%3Cpath fill='%233d8b40' d='M6.4 12.2 2.2 8l1.4-1.4 2.8 2.8 6-6L13.8 4.8z'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 12px center;
	padding-right: 38px;
}

.resv-field input.is-invalid,
.resv-field select.is-invalid {
	border-color: var(--resv-wine);
	box-shadow: 0 0 0 3px rgba(155, 27, 27, 0.12);
}

.resv-field-msg {
	font-size: 13px;
	color: var(--resv-wine);
	margin-top: 5px;
}

.resv-field-msg:empty {
	display: none;
}

/* ---------- Datum / Kalender ---------- */

.resv-date-display {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 10px;
	width: 100%;
	padding: 11px 14px;
	border: 1px solid var(--resv-line);
	border-radius: 6px;
	background: #fff;
	color: #8a8070;
	font-size: 16px;
	text-align: left;
	cursor: pointer;
	transition: border-color 0.15s, box-shadow 0.15s;
}

.resv-date-display.has-value {
	color: var(--resv-ink);
	font-weight: 600;
}

.resv-date-display:hover,
.resv-date-display:focus,
.resv-date-display.is-open {
	border-color: var(--resv-gold);
	outline: none;
	box-shadow: 0 0 0 3px rgba(201, 162, 75, 0.22);
}

.resv-date-display.is-invalid {
	border-color: var(--resv-wine);
}

.resv-date-display-caret {
	color: var(--resv-gold);
	font-size: 13px;
}

.resv-calendar {
	position: absolute;
	z-index: 50;
	top: calc(100% - 14px);
	left: 0;
	min-width: 308px;
	max-width: 100%;
	background: #fff;
	border: 1px solid var(--resv-line);
	border-top: 3px solid var(--resv-gold);
	border-radius: 8px;
	box-shadow: 0 16px 40px rgba(40, 25, 10, 0.22);
	padding: 14px 14px 10px;
}

.resv-cal-head {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 10px;
}

.resv-cal-title {
	font-family: var(--resv-serif);
	font-size: 17px;
	letter-spacing: 0.04em;
	color: var(--resv-wine);
}

.resv-cal-nav {
	width: 34px;
	height: 34px;
	border: 1px solid var(--resv-line);
	border-radius: 50%;
	background: #fff;
	color: var(--resv-wine);
	font-size: 19px;
	line-height: 1;
	cursor: pointer;
	transition: background 0.15s, color 0.15s;
}

.resv-cal-nav:hover:not(:disabled) {
	background: var(--resv-wine);
	color: #fff;
	border-color: var(--resv-wine);
}

.resv-cal-nav:disabled {
	opacity: 0.3;
	cursor: default;
}

.resv-cal-grid {
	display: grid;
	grid-template-columns: repeat(7, 1fr);
	gap: 3px;
}

.resv-cal-dow {
	text-align: center;
	font-size: 11px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	color: #a3987f;
	padding: 4px 0 6px;
}

.resv-cal-day {
	appearance: none;
	border: none;
	background: transparent;
	width: 100%;
	aspect-ratio: 1;
	min-height: 36px;
	border-radius: 50%;
	font-size: 14px;
	color: var(--resv-ink);
	cursor: pointer;
	position: relative;
	transition: background 0.12s, color 0.12s;
}

@media (hover: hover) {
	.resv-cal-day.is-open:hover {
		background: var(--resv-gold-light);
		color: var(--resv-ink);
	}

	.resv-cal-day.is-selected:hover {
		background: var(--resv-wine);
		color: #fff;
	}
}

.resv-cal-day.is-selected {
	background: var(--resv-wine);
	color: #fff;
	font-weight: 700;
}

.resv-cal-day.is-today:not(.is-selected) {
	box-shadow: inset 0 0 0 1px var(--resv-gold);
}

.resv-cal-day.is-closed {
	color: #c5bca9;
	text-decoration: line-through;
	cursor: not-allowed;
	background: repeating-linear-gradient(135deg, transparent, transparent 3px, rgba(197, 188, 169, 0.18) 3px, rgba(197, 188, 169, 0.18) 5px);
	border-radius: 6px;
}

.resv-cal-day.is-out {
	color: #ddd6c8;
	cursor: default;
}

.resv-cal-empty {
	min-height: 36px;
}

.resv-cal-legend {
	display: flex;
	gap: 16px;
	justify-content: center;
	margin-top: 10px;
	padding-top: 8px;
	border-top: 1px solid #f0ebe0;
	font-size: 12px;
	color: #8a8070;
}

.resv-cal-dot {
	display: inline-block;
	width: 10px;
	height: 10px;
	border-radius: 50%;
	margin-right: 5px;
	vertical-align: baseline;
}

.resv-cal-dot.is-open {
	background: var(--resv-gold);
}

.resv-cal-dot.is-closed {
	background: #c5bca9;
}

/* ---------- Uhrzeiten als Klick-Liste ---------- */

.resv-time-list {
	border: 1px solid var(--resv-line);
	border-radius: 8px;
	background: #fff;
	max-height: 300px;
	overflow-y: auto;
	-webkit-overflow-scrolling: touch;
}

.resv-time-empty {
	margin: 0;
	padding: 18px 16px;
	color: #8a8070;
	text-align: center;
}

.resv-time-group {
	position: sticky;
	top: 0;
	z-index: 1;
	background: #f3efe8;
	color: #6d6353;
	font-family: var(--resv-serif);
	font-size: 13px;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	padding: 7px 16px;
	border-bottom: 1px solid var(--resv-line);
}

.resv-time-slot {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	width: 100%;
	appearance: none;
	border: none;
	border-bottom: 1px solid #f0ebe0;
	background: #fff;
	color: var(--resv-ink);
	text-align: left;
	padding: 13px 16px;
	font-size: 16px;
	cursor: pointer;
	transition: background 0.12s, color 0.12s, padding-left 0.12s;
}

.resv-time-slot:last-child {
	border-bottom: none;
}

.resv-time-val {
	font-weight: 600;
}

/* Hover nur auf echten Zeigergeraeten: auf Touch bleibt :hover sonst nach
   dem Tippen kleben und ueberdeckt (hoehere Spezifitaet) die Auswahl-Markierung. */
@media (hover: hover) {
	.resv-time-slot:hover:not(.is-disabled) {
		background: #faf6ee;
		padding-left: 22px;
	}

	/* Gewaehlter Slot bleibt weinrot, auch wenn der Mauszeiger darueber liegt. */
	.resv-time-slot.is-selected:hover {
		background: var(--resv-wine);
		padding-left: 16px;
	}
}

.resv-time-slot.is-selected {
	background: var(--resv-wine);
	color: #fff;
}

.resv-time-slot.is-selected .resv-time-val::before {
	content: '✓ ';
	color: var(--resv-gold-light);
}

.resv-time-slot.is-disabled {
	color: #b8b0a0;
	cursor: not-allowed;
	background: #fcfaf6;
}

.resv-time-slot.is-disabled .resv-time-val {
	text-decoration: line-through;
	font-weight: 400;
}

.resv-time-note {
	font-size: 12px;
	color: #b8a48a;
	white-space: nowrap;
	text-transform: uppercase;
	letter-spacing: 0.04em;
}

/* ---------- Angebotsarten ---------- */

.resv-types {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
}

.resv-type-option {
	flex: 1 1 200px;
	border: 1px solid var(--resv-line);
	border-radius: 8px;
	padding: 14px 16px;
	cursor: pointer;
	background: #fff;
	color: var(--resv-ink);
	transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
	position: relative;
}

.resv-type-option:hover {
	border-color: var(--resv-gold);
	transform: translateY(-1px);
	box-shadow: 0 4px 12px rgba(40, 25, 10, 0.08);
}

.resv-type-option input {
	position: absolute;
	opacity: 0;
	pointer-events: none;
}

.resv-type-title {
	display: block;
	font-family: var(--resv-serif);
	font-size: 17px;
	letter-spacing: 0.03em;
	color: var(--resv-ink);
	padding-right: 26px;
}

.resv-type-option input:checked ~ .resv-type-title {
	color: var(--resv-wine);
}

/* Gewaehlte Karte: Goldrahmen + Haken */
.resv-type-option input:checked ~ .resv-type-title::after {
	content: '✓';
	position: absolute;
	right: 14px;
	top: 12px;
	width: 22px;
	height: 22px;
	border-radius: 50%;
	background: var(--resv-wine);
	color: #fff;
	font-size: 13px;
	line-height: 22px;
	text-align: center;
}

.resv-type-option:has(input:checked),
.resv-type-option.is-checked {
	border-color: var(--resv-gold);
	box-shadow: 0 0 0 1px var(--resv-gold), 0 4px 12px rgba(201, 162, 75, 0.18);
	background: #fffdf8;
}

.resv-type-desc {
	display: block;
	font-size: 13px;
	color: #8a8070;
	margin-top: 4px;
}

.resv-type-disabled {
	opacity: 0.4;
	cursor: not-allowed;
}

.resv-type-disabled:hover {
	transform: none;
	box-shadow: none;
	border-color: var(--resv-line);
}

/* ---------- Telefon-Hinweis grosse Gruppen ---------- */

.resv-phone-fallback {
	background: #f7f4ef;
	border: 2px dashed var(--resv-gold);
	border-radius: 10px;
	padding: 20px 22px;
	margin: 8px 0 16px;
	color: var(--resv-ink);
	text-align: center;
}

.resv-phone-link {
	display: inline-block;
	font-family: var(--resv-serif);
	font-size: 24px;
	font-weight: 700;
	letter-spacing: 0.03em;
	color: var(--resv-wine);
	margin-top: 8px;
	text-decoration: none;
}

.resv-phone-link:hover {
	color: var(--resv-wine-dark);
}

/* ---------- Benachrichtigung / Checkboxen ---------- */

.resv-notify-options {
	justify-content: flex-end;
}

.resv-check {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	font-weight: 400;
	cursor: pointer;
	text-transform: none;
	letter-spacing: 0;
	font-family: inherit;
}

.resv-check input {
	margin-top: 4px;
	width: auto;
	accent-color: var(--resv-wine);
}

/* Honeypot unsichtbar */
.resv-hp {
	position: absolute;
	left: -9999px;
	top: -9999px;
	height: 1px;
	overflow: hidden;
}

.resv-captcha {
	margin-bottom: 14px;
}

.resv-captcha > label {
	white-space: nowrap;
}

.resv-captcha input {
	max-width: 200px;
}

.resv-agb {
	margin: 14px 0 8px;
	padding-top: 14px;
	border-top: 1px solid #f0ebe0;
}

.resv-agb a {
	color: var(--resv-wine);
}

.resv-cutoff-note {
	font-size: 13px;
	color: #8a8070;
}

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

.resv-submit {
	display: inline-block;
	background: var(--resv-wine);
	color: #fff;
	border: 1px solid var(--resv-wine);
	border-radius: 6px;
	padding: 14px 38px;
	font-size: 16px;
	font-weight: 700;
	letter-spacing: 0.05em;
	text-transform: uppercase;
	cursor: pointer;
	text-decoration: none;
	transition: background 0.15s, color 0.15s, box-shadow 0.15s, transform 0.15s;
	box-shadow: 0 4px 14px rgba(155, 27, 27, 0.25);
}

.resv-submit:hover,
.resv-submit:focus {
	background: var(--resv-wine-dark);
	color: var(--resv-gold-light);
	text-decoration: none;
	transform: translateY(-1px);
	box-shadow: 0 6px 18px rgba(155, 27, 27, 0.3);
}

.resv-submit-danger {
	background: #6b6b6b;
	border-color: #6b6b6b;
	box-shadow: none;
}

.resv-submit-danger:hover {
	background: var(--resv-wine);
	border-color: var(--resv-wine);
}

.resv-btn-inline {
	margin-top: 8px;
}

/* ---------- Zusammenfassung (complete/manage) ---------- */

.resv-summary {
	background: var(--resv-paper);
	border: 2px dashed var(--resv-gold);
	border-radius: 10px;
	padding: 22px 26px;
	margin: 20px 0;
	color: var(--resv-ink);
}

.resv-summary h2 {
	margin-top: 0;
	font-family: var(--resv-serif);
	font-weight: 400;
	letter-spacing: 0.04em;
	color: var(--resv-wine);
	font-size: 1.2em;
}

.resv-summary-list {
	display: grid;
	grid-template-columns: auto 1fr;
	gap: 8px 22px;
	margin: 0;
}

.resv-summary-list dt {
	color: #8a8070;
	font-size: 14px;
	text-transform: uppercase;
	letter-spacing: 0.04em;
}

.resv-summary-list dd {
	margin: 0;
	font-weight: 600;
}

.resv-maps-link {
	color: var(--resv-wine);
	font-weight: 700;
}

/* ---------- Animationen ---------- */

@keyframes resvFadeUp {
	from {
		opacity: 0;
		transform: translateY(14px);
	}

	to {
		opacity: 1;
		transform: none;
	}
}

@keyframes resvCalIn {
	from {
		opacity: 0;
		transform: translateY(-8px) scale(0.97);
	}

	to {
		opacity: 1;
		transform: none;
	}
}

@keyframes resvPop {
	0% {
		opacity: 0;
		transform: scale(0.4);
	}

	70% {
		transform: scale(1.15);
	}

	100% {
		opacity: 1;
		transform: scale(1);
	}
}

@keyframes resvSlotsIn {
	from {
		opacity: 0.2;
	}

	to {
		opacity: 1;
	}
}

/* Sanfter Seiteneinstieg: Titel, Hinweis und Karte nacheinander. */
.resv-title {
	animation: resvFadeUp 0.55s ease-out both;
}

.resv-notice,
.resv-error,
.resv-success {
	animation: resvFadeUp 0.55s ease-out 0.1s both;
}

.resv-form,
.resv-summary {
	animation: resvFadeUp 0.65s ease-out 0.18s both;
}

/* Kalender klappt weich auf. */
.resv-calendar:not([hidden]) {
	animation: resvCalIn 0.22s ease-out;
}

/* Haken der gewaehlten Angebotsart ploppt dezent auf. */
.resv-type-option input:checked ~ .resv-type-title::after {
	animation: resvPop 0.28s ease-out;
}

/* Frisch geladene Uhrzeiten blenden weich ein. */
.resv-field select.resv-slots-in,
.resv-time-list.resv-slots-in {
	animation: resvSlotsIn 0.3s ease-out;
}

/* Validierungsmeldungen gleiten herein. */
.resv-field-msg,
.resv-field-hint {
	transition: opacity 0.2s ease-out;
}

.resv-field-msg:not(:empty) {
	animation: resvFadeUp 0.25s ease-out;
}

/* Bedienhilfe: Animationen fuer empfindliche Nutzer abschalten. */
@media (prefers-reduced-motion: reduce) {
	.resv-form-wrap *,
	.resv-title,
	.resv-notice,
	.resv-error,
	.resv-success,
	.resv-form,
	.resv-summary,
	.resv-calendar:not([hidden]) {
		animation: none !important;
		transition: none !important;
	}
}

/* ---------- Personal-Ergebnisseite ---------- */

.resv-staff-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin-top: 18px;
}

.resv-staff-actions .resv-submit {
	flex: 1 1 auto;
	text-align: center;
}

/* ---------- Responsive ---------- */

@media (max-width: 620px) {
	.resv-grid {
		grid-template-columns: 1fr;
	}

	.resv-form {
		padding: 20px 16px 24px;
	}

	.resv-calendar {
		left: 50%;
		transform: translateX(-50%);
		min-width: 290px;
	}

	.resv-summary-list {
		grid-template-columns: 1fr;
		gap: 2px;
	}

	.resv-summary-list dd {
		margin-bottom: 10px;
	}
}
