/*
 * LTD Booking — CSS מבני בלבד.
 * צבעים/פונטים/רדיוסים יורשים מה-theme המארח דרך CSS variables (--wp--preset--*),
 * עם fallbacks נייטרליים לאתרים בלי block theme.
 */

.ltd-booking {
	--ltd-border: var(--wp--preset--color--border, #d8d2c7);
	--ltd-surface: var(--wp--preset--color--white, #ffffff);
	--ltd-accent: var(--wp--preset--color--cta-deep, var(--wp--preset--color--primary, #3a5a40));
	--ltd-text: var(--wp--preset--color--contrast, #222222);
	--ltd-radius: 16px;
	max-width: 720px;
	color: var(--ltd-text);
}

.ltd-booking__title {
	margin-bottom: clamp(1rem, 3vw, 1.6rem);
}

/* ---- שלבים ---- */

.ltd-step {
	border: 1px solid var(--ltd-border);
	border-radius: var(--ltd-radius);
	background: var(--ltd-surface);
	padding: clamp(1rem, 3vw, 1.5rem);
	margin: 0 0 1.25rem;
	transition: opacity 0.2s ease;
}

.ltd-step[disabled] {
	opacity: 0.45;
}

.ltd-step legend {
	font-weight: 600;
	font-size: 1.1em;
	padding-inline: 0.4rem;
}

.ltd-step__num {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	inline-size: 1.7em;
	block-size: 1.7em;
	border-radius: 50%;
	background: var(--ltd-accent);
	color: var(--wp--preset--color--white, #fff);
	font-size: 0.85em;
	margin-inline-end: 0.45em;
}

/* ---- אפשרויות (שירות / מטפלת / שעה) ---- */

.ltd-options {
	display: flex;
	flex-wrap: wrap;
	gap: 0.6rem;
	margin-top: 0.5rem;
}

.ltd-option {
	position: relative;
}

.ltd-option input {
	position: absolute;
	opacity: 0;
	inset: 0;
	cursor: pointer;
}

.ltd-option label {
	display: inline-block;
	border: 1.5px solid var(--ltd-border);
	border-radius: 999px;
	padding: 0.55rem 1.15rem;
	cursor: pointer;
	background: transparent;
	line-height: 1.3;
	transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.ltd-option label:hover {
	border-color: var(--ltd-accent);
}

.ltd-option input:checked + label {
	background: var(--ltd-accent);
	border-color: var(--ltd-accent);
	color: var(--wp--preset--color--white, #fff);
}

.ltd-option input:focus-visible + label {
	outline: 2px solid var(--ltd-accent);
	outline-offset: 3px;
}

.ltd-option__meta {
	opacity: 0.75;
	font-size: 0.85em;
	margin-inline-start: 0.35em;
}

.ltd-option input:checked + label .ltd-option__meta {
	opacity: 0.9;
}

/* ---- שדות ---- */

.ltd-field {
	display: flex;
	flex-direction: column;
	gap: 0.35rem;
	margin: 0 0 1.1rem;
	max-width: 420px;
}

.ltd-field label {
	font-weight: 600;
	font-size: 0.95em;
}

.ltd-field input {
	border: 1.5px solid var(--ltd-border);
	border-radius: 10px;
	padding: 0.65rem 0.9rem;
	font: inherit;
	background: var(--ltd-surface);
	color: inherit;
}

.ltd-field input:focus-visible {
	outline: 2px solid var(--ltd-accent);
	outline-offset: 1px;
	border-color: var(--ltd-accent);
}

/* Honeypot — מוסתר ויזואלית אך קיים בדום */
.ltd-hp {
	position: absolute !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	clip-path: inset(50%);
	white-space: nowrap;
}

/* ---- סלוטים ---- */

.ltd-slots__hint {
	margin: 0.4rem 0 0;
	opacity: 0.75;
}

.ltd-options--slots {
	max-height: 260px;
	overflow-y: auto;
	padding: 2px;
}

/* ---- שגיאה / הצלחה ---- */

.ltd-error {
	color: #9b1c1c;
	background: #fdf2f2;
	border: 1px solid #f3c5c5;
	border-radius: 10px;
	padding: 0.7rem 1rem;
	margin: 0 0 1rem;
}

.ltd-success {
	border: 1.5px solid var(--ltd-accent);
	border-radius: var(--ltd-radius);
	background: var(--ltd-surface);
	padding: clamp(1.2rem, 4vw, 2rem);
}

.ltd-success:focus {
	outline: none;
}

.ltd-success__title {
	margin-top: 0;
	color: var(--ltd-accent);
}

.ltd-success__details {
	display: grid;
	grid-template-columns: auto 1fr;
	gap: 0.4rem 1rem;
	margin: 1rem 0 0;
}

.ltd-success__details dt {
	font-weight: 600;
}

.ltd-success__details dd {
	margin: 0;
}

/* ---- שליחה ---- */

.ltd-submit-wrap {
	margin-top: 0.5rem;
}

.ltd-submit[disabled] {
	opacity: 0.5;
	cursor: not-allowed;
}

/* ---- מובייל ---- */

@media (max-width: 600px) {
	.ltd-options--slots {
		max-height: 220px;
	}

	.ltd-option label {
		padding: 0.5rem 0.95rem;
	}
}

/* כיבוד העדפת תנועה מופחתת */
@media (prefers-reduced-motion: reduce) {
	.ltd-step,
	.ltd-option label {
		transition: none;
	}
}
