/**
 * Pinselschwert Tischreservierung – Frontend
 * Farben/Typo folgen den Elementor-Globals des Themes (mit Fallbacks).
 */

.psb {
	--psb-primary: var(--e-global-color-primary, #7a675a);
	--psb-primary-hover: var(--e-global-color-primary_hover, #c2aea1);
	--psb-ink: var(--e-global-color-afc46e9, #252525);
	--psb-text: var(--e-global-color-text, #5a5a5a);
	--psb-muted: var(--e-global-color-text_light, #a3a3a3);
	--psb-line: var(--e-global-color-border, #dedede);
	--psb-cream: var(--e-global-color-background_light, #f1ece7);
	--psb-bg: var(--e-global-color-background, #ffffff);
	--psb-head-font: var(--e-global-typography-primary-font-family, "Anton"), "Oswald", Impact, sans-serif;
	--psb-body-font: var(--e-global-typography-text-font-family, "Unbounded"), -apple-system, "Segoe UI", Roboto, sans-serif;
	--psb-radius: 18px;
	--psb-shadow: 0 18px 50px -30px rgba(37, 37, 37, 0.45);

	box-sizing: border-box;
	display: block;
	width: 100%;
	max-width: 760px;
	margin: 0 auto;
	padding: 0 4px;
	color: var(--psb-text);
	font-family: var(--psb-body-font);
	font-size: 16px;
	font-weight: 300;
	line-height: 1.6;
	text-align: left;
}

.psb *,
.psb *::before,
.psb *::after {
	box-sizing: border-box;
}

/* ------------------------------------------------------------------ Kopf */

.psb__head {
	margin-bottom: 22px;
	text-align: center;
}

.psb__kicker {
	margin: 0 0 8px;
	color: var(--psb-primary);
	font-family: var(--psb-head-font);
	font-size: 13px;
	letter-spacing: 0.16em;
	text-transform: uppercase;
}

.psb__title {
	margin: 0 0 10px;
	color: var(--psb-ink);
	font-family: var(--psb-head-font);
	font-size: clamp(28px, 7vw, 44px);
	font-weight: 400;
	line-height: 1.05;
	text-transform: uppercase;
}

.psb__intro {
	margin: 0 auto;
	max-width: 46ch;
	color: var(--psb-text);
	font-size: 15px;
}

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

.psb__card {
	position: relative;
	background: var(--psb-bg);
	border: 1px solid var(--psb-line);
	border-radius: var(--psb-radius);
	box-shadow: var(--psb-shadow);
	overflow: hidden;
}

/* --------------------------------------------------------------- Stepper */

.psb__steps {
	display: flex;
	margin: 0;
	padding: 16px 12px 14px;
	background: var(--psb-cream);
	border-bottom: 1px solid var(--psb-line);
	list-style: none;
	gap: 4px;
}

.psb__step {
	position: relative;
	flex: 1 1 0;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 6px;
	margin: 0;
	padding: 0;
	color: var(--psb-muted);
	font-size: 11px;
	letter-spacing: 0.04em;
	text-align: center;
	text-transform: uppercase;
	list-style: none;
}

.psb__step::before {
	content: "";
	position: absolute;
	top: 15px;
	left: -50%;
	width: 100%;
	height: 2px;
	background: var(--psb-line);
}

.psb__step:first-child::before {
	display: none;
}

.psb__step-dot {
	position: relative;
	z-index: 1;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 30px;
	height: 30px;
	background: var(--psb-bg);
	border: 2px solid var(--psb-line);
	border-radius: 50%;
	color: var(--psb-muted);
	font-family: var(--psb-head-font);
	font-size: 14px;
	transition: background 0.25s ease, border-color 0.25s ease, color 0.25s ease;
}

.psb__step-label {
	max-width: 9ch;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.psb__step.is-active {
	color: var(--psb-ink);
	font-weight: 500;
}

.psb__step.is-active .psb__step-dot {
	background: var(--psb-ink);
	border-color: var(--psb-ink);
	color: #fff;
}

.psb__step.is-done .psb__step-dot {
	background: var(--psb-primary);
	border-color: var(--psb-primary);
	color: #fff;
}

.psb__step.is-done::before,
.psb__step.is-active::before {
	background: var(--psb-primary);
}

.psb__step.is-done .psb__step-dot::after {
	content: "✓";
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	background: inherit;
	border-radius: 50%;
	font-size: 15px;
}

/* ----------------------------------------------------------------- Panes */

.psb__body {
	position: relative;
	padding: 22px 18px 0;
}

.psb__pane {
	animation: psb-in 0.35s ease both;
}

@keyframes psb-in {
	from {
		opacity: 0;
		transform: translateY(10px);
	}
	to {
		opacity: 1;
		transform: none;
	}
}

.psb__pane-title {
	margin: 0 0 4px;
	color: var(--psb-ink);
	font-family: var(--psb-head-font);
	font-size: 20px;
	font-weight: 400;
	line-height: 1.2;
	text-transform: uppercase;
}

.psb__pane-hint {
	margin: 0 0 18px;
	color: var(--psb-muted);
	font-size: 13.5px;
}

.psb__block {
	margin-bottom: 22px;
}

.psb__label {
	display: block;
	margin-bottom: 10px;
	color: var(--psb-ink);
	font-size: 13px;
	font-weight: 500;
	letter-spacing: 0.06em;
	text-transform: uppercase;
}

/* --------------------------------------------------------- Auswahlkarten */

.psb__grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: 10px;
}

@media (min-width: 540px) {
	.psb__grid {
		grid-template-columns: 1fr 1fr;
	}
}

.psb-option {
	position: relative;
	display: flex;
	align-items: center;
	gap: 12px;
	width: 100%;
	min-height: 56px;
	margin: 0;
	padding: 14px 46px 14px 16px;
	background: var(--psb-bg);
	border: 1px solid var(--psb-line);
	border-radius: 14px;
	color: var(--psb-ink);
	font-family: inherit;
	font-size: 15px;
	font-weight: 400;
	line-height: 1.3;
	text-align: left;
	cursor: pointer;
	transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
	-webkit-appearance: none;
	appearance: none;
}

.psb-option:hover {
	border-color: var(--psb-primary);
	transform: translateY(-1px);
}

.psb-option.is-selected {
	background: var(--psb-cream);
	border-color: var(--psb-primary);
	box-shadow: inset 0 0 0 1px var(--psb-primary);
}

.psb-option__check {
	position: absolute;
	top: 50%;
	right: 14px;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 22px;
	height: 22px;
	background: transparent;
	border: 1.5px solid var(--psb-line);
	border-radius: 50%;
	color: transparent;
	font-size: 12px;
	transform: translateY(-50%);
	transition: all 0.2s ease;
}

.psb-option.is-selected .psb-option__check {
	background: var(--psb-primary);
	border-color: var(--psb-primary);
	color: #fff;
}

/* ------------------------------------------------------------ Spielerzahl */

.psb-stepper {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 14px;
	padding: 12px 14px;
	background: var(--psb-cream);
	border-radius: 14px;
}

.psb-stepper__btn {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 46px;
	height: 46px;
	flex: 0 0 46px;
	background: var(--psb-bg);
	border: 1px solid var(--psb-line);
	border-radius: 50%;
	color: var(--psb-ink);
	font-family: inherit;
	font-size: 22px;
	line-height: 1;
	cursor: pointer;
	transition: border-color 0.2s ease, color 0.2s ease;
}

.psb-stepper__btn:hover:not(:disabled) {
	border-color: var(--psb-primary);
	color: var(--psb-primary);
}

.psb-stepper__btn:disabled {
	opacity: 0.4;
	cursor: not-allowed;
}

.psb-stepper__value {
	flex: 1 1 auto;
	color: var(--psb-ink);
	font-family: var(--psb-head-font);
	font-size: 26px;
	line-height: 1.1;
	text-align: center;
}

.psb-stepper__value small {
	display: block;
	color: var(--psb-muted);
	font-family: var(--psb-body-font);
	font-size: 12px;
	font-weight: 300;
	letter-spacing: 0.04em;
	text-transform: uppercase;
}

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

.psb-cal__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 12px;
}

.psb-cal__month {
	color: var(--psb-ink);
	font-family: var(--psb-head-font);
	font-size: 17px;
	text-transform: uppercase;
}

.psb-cal__nav {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	background: var(--psb-bg);
	border: 1px solid var(--psb-line);
	border-radius: 50%;
	color: var(--psb-ink);
	font-size: 16px;
	line-height: 1;
	cursor: pointer;
	transition: border-color 0.2s ease, color 0.2s ease;
}

.psb-cal__nav:hover:not(:disabled) {
	border-color: var(--psb-primary);
	color: var(--psb-primary);
}

.psb-cal__nav:disabled {
	opacity: 0.35;
	cursor: not-allowed;
}

.psb-cal__grid {
	display: grid;
	grid-template-columns: repeat(7, 1fr);
	gap: 4px;
}

.psb-cal__dow {
	padding: 4px 0;
	color: var(--psb-muted);
	font-size: 11px;
	letter-spacing: 0.06em;
	text-align: center;
	text-transform: uppercase;
}

.psb-cal__day {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	aspect-ratio: 1 / 1;
	min-height: 42px;
	padding: 0;
	background: var(--psb-bg);
	border: 1px solid transparent;
	border-radius: 12px;
	color: var(--psb-ink);
	font-family: inherit;
	font-size: 15px;
	cursor: pointer;
	transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}

.psb-cal__day.is-free {
	background: var(--psb-cream);
	font-weight: 400;
}

.psb-cal__day.is-free::after {
	content: "";
	position: absolute;
	bottom: 6px;
	left: 50%;
	width: 4px;
	height: 4px;
	background: var(--psb-primary);
	border-radius: 50%;
	transform: translateX(-50%);
}

.psb-cal__day.is-free:hover {
	border-color: var(--psb-primary);
}

.psb-cal__day:disabled {
	color: var(--psb-muted);
	cursor: not-allowed;
	opacity: 0.55;
}

.psb-cal__day.is-full {
	color: var(--psb-muted);
	text-decoration: line-through;
}

.psb-cal__day.is-selected {
	background: var(--psb-ink);
	border-color: var(--psb-ink);
	color: #fff;
	opacity: 1;
}

.psb-cal__day.is-selected::after {
	background: #fff;
}

.psb-cal__empty {
	aspect-ratio: 1 / 1;
}

.psb-cal__legend {
	display: flex;
	flex-wrap: wrap;
	gap: 14px;
	margin: 14px 0 0;
	color: var(--psb-muted);
	font-size: 12px;
}

.psb-cal__legend span {
	display: inline-flex;
	align-items: center;
	gap: 6px;
}

.psb-cal__legend i {
	width: 14px;
	height: 14px;
	border-radius: 4px;
}

.psb-cal__legend i.free {
	background: var(--psb-cream);
	border: 1px solid var(--psb-primary);
}

.psb-cal__legend i.off {
	background: repeating-linear-gradient(-45deg, #fff 0 3px, var(--psb-line) 3px 5px);
	border: 1px solid var(--psb-line);
}

/* ------------------------------------------------------------------ Chips */

.psb-chips {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
	gap: 8px;
}

.psb-chip {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 2px;
	min-height: 52px;
	padding: 9px 8px;
	background: var(--psb-bg);
	border: 1px solid var(--psb-line);
	border-radius: 12px;
	color: var(--psb-ink);
	font-family: inherit;
	font-size: 15px;
	cursor: pointer;
	transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.psb-chip small {
	color: var(--psb-muted);
	font-size: 11px;
	letter-spacing: 0.02em;
}

.psb-chip:hover:not(:disabled) {
	border-color: var(--psb-primary);
}

.psb-chip.is-selected {
	background: var(--psb-ink);
	border-color: var(--psb-ink);
	color: #fff;
}

.psb-chip.is-selected small {
	color: rgba(255, 255, 255, 0.7);
}

.psb-chip:disabled {
	background: #fafafa;
	color: var(--psb-muted);
	cursor: not-allowed;
	opacity: 0.65;
	text-decoration: line-through;
}

.psb-chip:disabled small {
	text-decoration: none;
}

/* ----------------------------------------------------------------- Felder */

.psb-field {
	margin-bottom: 14px;
}

.psb-field label {
	display: block;
	margin-bottom: 6px;
	color: var(--psb-ink);
	font-size: 13px;
	font-weight: 400;
}

.psb-field input,
.psb-field textarea {
	width: 100%;
	padding: 13px 14px;
	background: var(--psb-bg);
	border: 1px solid var(--psb-line);
	border-radius: 12px;
	color: var(--psb-ink);
	font-family: inherit;
	font-size: 16px;
	font-weight: 300;
	line-height: 1.4;
	transition: border-color 0.2s ease, box-shadow 0.2s ease;
	-webkit-appearance: none;
	appearance: none;
}

.psb-field textarea {
	min-height: 92px;
	resize: vertical;
}

.psb-field input:focus,
.psb-field textarea:focus {
	border-color: var(--psb-primary);
	box-shadow: 0 0 0 3px rgba(122, 103, 90, 0.15);
	outline: none;
}

.psb-field.has-error input,
.psb-field.has-error textarea {
	border-color: #b3261e;
}

.psb-field__error {
	display: block;
	margin-top: 5px;
	color: #b3261e;
	font-size: 12.5px;
}

.psb-field--hp {
	position: absolute;
	left: -9999px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

.psb-row {
	display: grid;
	grid-template-columns: 1fr;
	gap: 0;
}

@media (min-width: 540px) {
	.psb-row {
		grid-template-columns: 1fr 1fr;
		gap: 14px;
	}
}

.psb-check {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	margin: 4px 0 0;
	font-size: 13.5px;
	line-height: 1.5;
}

.psb-check input {
	flex: 0 0 20px;
	width: 20px;
	height: 20px;
	margin-top: 2px;
	accent-color: var(--psb-primary);
}

.psb-check a {
	color: var(--psb-primary);
	text-decoration: underline;
}

.psb-check.has-error {
	color: #b3261e;
}

/* ------------------------------------------------------------- Übersicht */

.psb-summary {
	margin: 0 0 18px;
	padding: 16px;
	background: var(--psb-cream);
	border-radius: 14px;
}

.psb-summary__row {
	display: flex;
	justify-content: space-between;
	gap: 14px;
	padding: 7px 0;
	border-bottom: 1px solid rgba(122, 103, 90, 0.14);
	font-size: 14px;
}

.psb-summary__row:last-child {
	border-bottom: 0;
}

.psb-summary__row dt {
	margin: 0;
	color: var(--psb-text);
}

.psb-summary__row dd {
	margin: 0;
	color: var(--psb-ink);
	font-weight: 500;
	text-align: right;
}

/* -------------------------------------------------------------- Navigation */

.psb__nav {
	position: sticky;
	bottom: 0;
	z-index: 2;
	display: flex;
	gap: 10px;
	margin: 22px -18px 0;
	padding: 14px 18px;
	background: linear-gradient(to top, var(--psb-bg) 72%, rgba(255, 255, 255, 0));
	border-top: 1px solid var(--psb-line);
}

.psb-btn {
	flex: 1 1 auto;
	min-height: 52px;
	padding: 14px 20px;
	border: 1px solid transparent;
	border-radius: 999px;
	font-family: var(--psb-head-font);
	font-size: 15px;
	letter-spacing: 0.06em;
	text-align: center;
	text-transform: uppercase;
	cursor: pointer;
	transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, opacity 0.2s ease;
	-webkit-appearance: none;
	appearance: none;
}

.psb-btn--primary {
	background: var(--psb-ink);
	color: #fff;
}

.psb-btn--primary:hover:not(:disabled) {
	background: var(--psb-primary);
}

.psb-btn--ghost {
	flex: 0 0 auto;
	min-width: 108px;
	background: transparent;
	border-color: var(--psb-line);
	color: var(--psb-ink);
}

.psb-btn--ghost:hover {
	border-color: var(--psb-primary);
	color: var(--psb-primary);
}

.psb-btn:disabled {
	cursor: not-allowed;
	opacity: 0.45;
}

.psb-btn.is-busy {
	color: transparent;
	position: relative;
}

.psb-btn.is-busy::after {
	content: "";
	position: absolute;
	top: 50%;
	left: 50%;
	width: 18px;
	height: 18px;
	margin: -9px 0 0 -9px;
	border: 2px solid rgba(255, 255, 255, 0.4);
	border-top-color: #fff;
	border-radius: 50%;
	animation: psb-spin 0.7s linear infinite;
}

/* ------------------------------------------------------- Status & Meldungen */

.psb__error {
	margin: 0 0 16px;
	padding: 12px 14px;
	background: #fdecea;
	border-left: 3px solid #b3261e;
	border-radius: 8px;
	color: #8a1f1f;
	font-size: 14px;
}

.psb__loading {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	min-height: 180px;
	color: var(--psb-muted);
	font-size: 14px;
}

.psb__spinner {
	display: inline-block;
	width: 20px;
	height: 20px;
	border: 2px solid var(--psb-line);
	border-top-color: var(--psb-primary);
	border-radius: 50%;
	animation: psb-spin 0.7s linear infinite;
}

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

.psb__hint {
	margin: 12px 0 0;
	color: var(--psb-muted);
	font-size: 12.5px;
}

/* -------------------------------------------------------------- Erfolg */

.psb-success {
	padding: 12px 0 24px;
	text-align: center;
}

.psb-success__icon {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 68px;
	height: 68px;
	margin: 0 auto 18px;
	background: var(--psb-cream);
	border-radius: 50%;
	color: var(--psb-primary);
	font-size: 30px;
	animation: psb-pop 0.4s ease both;
}

@keyframes psb-pop {
	from {
		opacity: 0;
		transform: scale(0.7);
	}
	to {
		opacity: 1;
		transform: none;
	}
}

.psb-success__title {
	margin: 0 0 8px;
	color: var(--psb-ink);
	font-family: var(--psb-head-font);
	font-size: 26px;
	font-weight: 400;
	text-transform: uppercase;
}

.psb-success__text {
	margin: 0 auto 16px;
	max-width: 42ch;
	font-size: 15px;
}

.psb-success__box {
	display: inline-block;
	margin: 0 auto 14px;
	padding: 12px 20px;
	background: var(--psb-cream);
	border-radius: 14px;
	color: var(--psb-ink);
	font-size: 14.5px;
}

.psb-success__ref {
	display: block;
	margin-top: 4px;
	color: var(--psb-muted);
	font-size: 12.5px;
	letter-spacing: 0.06em;
	text-transform: uppercase;
}

.psb-success__again {
	background: none;
	border: 0;
	color: var(--psb-primary);
	font-family: inherit;
	font-size: 14px;
	text-decoration: underline;
	cursor: pointer;
}

.psb__noscript {
	margin-top: 16px;
	padding: 14px;
	background: var(--psb-cream);
	border-radius: 12px;
	font-size: 14px;
}

/* ------------------------------------------------------------ Seitenlayout */

.psb-page__inner {
	padding: 48px 16px 64px;
}

@media (min-width: 768px) {
	.psb-page__inner {
		padding: 72px 24px 96px;
	}

	.psb__body {
		padding: 28px 28px 0;
	}

	.psb__nav {
		margin: 26px -28px 0;
		padding: 16px 28px;
	}

	.psb__steps {
		padding: 20px 24px 16px;
	}
}

/* Fokus sichtbar halten (Tastatur) */
.psb button:focus-visible,
.psb input:focus-visible,
.psb textarea:focus-visible,
.psb a:focus-visible {
	outline: 2px solid var(--psb-primary);
	outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
	.psb *,
	.psb *::after,
	.psb *::before {
		animation-duration: 0.001s !important;
		transition-duration: 0.001s !important;
	}
}
