/* AM Booking — Form prenotazione
   Gli stili "base" sono inline nel template (massima priorità su temi/Elementor).
   Questo file gestisce SOLO ciò che inline non può fare:
   - stati di classe (.is-active, .is-selected, .is-done, ecc.)
   - pseudo-classi (:hover, :focus, :disabled, ::placeholder)
   - pseudo-elementi (::after per freccia select, check)
   - animazioni / transizioni
   - responsive (media query)
   Tutto con !important per battere l'inline base quando deve cambiare stato. */

/* HIDDEN ENFORCEMENT */
.am-booking [hidden] { display: none !important; }

/* ACCENT — testo con gradient arancione (Inter, italic) */
.am-booking__accent {
	font-family: Inter, system-ui, -apple-system, Arial, sans-serif !important;
	font-style: italic !important;
	font-weight: 600 !important;
	background-image: linear-gradient(135deg, #FFB13C 0%, #FF6A1F 55%, #E0541A 100%) !important;
	background-clip: text !important;
	-webkit-background-clip: text !important;
	color: transparent !important;
	-webkit-text-fill-color: transparent !important;
}

/* INPUT / SELECT / TEXTAREA — placeholder + focus + autofill */
.am-booking input::placeholder,
.am-booking textarea::placeholder {
	color: #bcbaba !important;
	-webkit-text-fill-color: #bcbaba !important;
	opacity: 1 !important;
}
.am-booking input::-webkit-input-placeholder,
.am-booking textarea::-webkit-input-placeholder {
	color: #bcbaba !important;
	-webkit-text-fill-color: #bcbaba !important;
	opacity: 1 !important;
}
.am-booking input::-moz-placeholder,
.am-booking textarea::-moz-placeholder {
	color: #bcbaba !important;
	opacity: 1 !important;
}
.am-booking input:focus,
.am-booking select:focus,
.am-booking textarea:focus {
	border-color: #FF6A1F !important;
	box-shadow: 0 0 0 3px rgba(255,106,31,0.18) !important;
}
.am-booking input[aria-invalid="true"],
.am-booking select[aria-invalid="true"],
.am-booking textarea[aria-invalid="true"] {
	border-color: #ff8a8a !important;
}
.am-booking input:-webkit-autofill,
.am-booking input:-webkit-autofill:hover,
.am-booking input:-webkit-autofill:focus,
.am-booking textarea:-webkit-autofill,
.am-booking select:-webkit-autofill {
	-webkit-text-fill-color: #ffffff !important;
	-webkit-box-shadow: 0 0 0 1000px #0B1B2E inset !important;
	caret-color: #ffffff !important;
}

/* SELECT — freccia personalizzata (arancione) */
.am-booking__select-wrap::after {
	content: "" !important;
	position: absolute !important;
	right: 18px !important;
	top: 50% !important;
	width: 10px !important;
	height: 10px !important;
	transform: translateY(-65%) rotate(45deg) !important;
	border-right: 2px solid #FF6A1F !important;
	border-bottom: 2px solid #FF6A1F !important;
	pointer-events: none !important;
}

/* CHECKBOX — stato checked tramite pseudo-elemento sul box */
.am-booking__check input:checked + .am-booking__check-box {
	background: #FF6A1F !important;
	border-color: #FF6A1F !important;
}
.am-booking__check input:checked + .am-booking__check-box::after {
	content: "" !important;
	position: absolute !important;
	left: 5px !important;
	top: 1px !important;
	width: 6px !important;
	height: 11px !important;
	border-right: 2px solid #ffffff !important;
	border-bottom: 2px solid #ffffff !important;
	transform: rotate(45deg) !important;
}

/* STEPPER — chip attivo / completato */
.am-booking__chip.is-active {
	background: rgba(255,106,31,0.12) !important;
	border-color: rgba(255,106,31,0.5) !important;
	color: #ffffff !important;
}
.am-booking__chip.is-active .am-booking__chip-n {
	background: #FF6A1F !important;
	color: #ffffff !important;
}
.am-booking__chip.is-done {
	background: rgba(37,192,139,0.12) !important;
	border-color: rgba(37,192,139,0.4) !important;
	color: #ffffff !important;
}
.am-booking__chip.is-done .am-booking__chip-n {
	background: #25c08b !important;
	color: #ffffff !important;
}

/* STEP TRANSITIONS */
.am-booking__step {
	transition: opacity 200ms cubic-bezier(0.22, 0.61, 0.36, 1) !important;
}
.am-booking__step.is-fading-out { opacity: 0 !important; }
.am-booking__step.is-fading-in {
	opacity: 0 !important;
	animation: amBookingIn 200ms cubic-bezier(0.22, 0.61, 0.36, 1) forwards !important;
}
@keyframes amBookingIn { from { opacity: 0; } to { opacity: 1; } }

/* BUTTONS — hover / disabled / loading */
.am-booking__btn {
	transition: transform 240ms ease, background 240ms ease, box-shadow 240ms ease, opacity 240ms ease !important;
}
.am-booking__btn--primary:hover:not(:disabled) {
	transform: translateY(-2px) !important;
	background: #F47B27 !important;
	box-shadow: 0 18px 38px -10px rgba(255,106,31,0.75) !important;
}
.am-booking__btn--ghost:hover:not(:disabled) {
	background: rgba(255,255,255,0.06) !important;
}
.am-booking__btn:disabled,
.am-booking__btn[disabled] {
	opacity: 0.5 !important;
	cursor: not-allowed !important;
	transform: none !important;
}
.am-booking__btn.is-loading {
	pointer-events: none !important;
	opacity: 0.7 !important;
}

/* CAL ARROW — frecce navigazione mese: aspetto identico cross-browser */
.am-booking__cal-arrow {
	outline: none !important;
	box-shadow: none !important;
	-webkit-appearance: none !important;
	appearance: none !important;
	padding: 0 !important;
	display: inline-flex !important;
	align-items: center !important;
	justify-content: center !important;
	transition: background 200ms ease, border-color 200ms ease !important;
}
.am-booking__cal-arrow:hover:not(:disabled) {
	background: rgba(255,255,255,0.06) !important;
	border-color: rgba(255,255,255,0.22) !important;
}
.am-booking__cal-arrow:focus,
.am-booking__cal-arrow:focus-visible {
	outline: none !important;
	box-shadow: 0 0 0 2px rgba(255,106,31,0.35) !important;
	border-color: rgba(255,106,31,0.55) !important;
}
.am-booking__cal-arrow:disabled {
	opacity: 0.35 !important;
	cursor: not-allowed !important;
}

/* CAL DAYS — generato dal JS, quindi solo CSS qui.
   Altezza esplicita + flex centratura per evitare quirks di aspect-ratio cross-browser. */
.am-booking__cal-day {
	height: 40px !important;
	width: 100% !important;
	display: inline-flex !important;
	align-items: center !important;
	justify-content: center !important;
	background: transparent !important;
	border: 1px solid transparent !important;
	color: #ffffff !important;
	font-size: 14px !important;
	font-weight: 500 !important;
	font-family: inherit !important;
	border-radius: 10px !important;
	cursor: pointer !important;
	box-sizing: border-box !important;
	padding: 0 !important;
	outline: none !important;
	transition: background 200ms ease, border-color 200ms ease, color 200ms ease !important;
}
.am-booking__cal-day:focus-visible {
	box-shadow: 0 0 0 2px rgba(255,106,31,0.35) !important;
}
.am-booking__cal-day.is-out { color: rgba(255,255,255,0.18) !important; cursor: default !important; border-color: transparent !important; background: transparent !important; }
.am-booking__cal-day.is-disabled, .am-booking__cal-day[disabled] { color: rgba(255,255,255,0.22) !important; cursor: not-allowed !important; }
.am-booking__cal-day.is-has-slots { border-color: rgba(255,106,31,0.55) !important; color: #ffffff !important; }
.am-booking__cal-day.is-has-slots:hover { background: rgba(255,106,31,0.14) !important; border-color: #FF6A1F !important; }
.am-booking__cal-day.is-today { border-color: rgba(255,255,255,0.38) !important; }
.am-booking__cal-day.is-selected {
	background: #FF6A1F !important;
	color: #ffffff !important;
	border-color: #FF6A1F !important;
	font-weight: 700 !important;
	box-shadow: 0 6px 14px -4px rgba(255,106,31,0.55) !important;
}
.am-booking__cal-day.is-selected:hover { background: #F47B27 !important; }

/* SLOTS — generati dal JS */
.am-booking__slot {
	display: flex !important;
	align-items: center !important;
	justify-content: space-between !important;
	gap: 10px !important;
	padding: 12px 14px !important;
	background: transparent !important;
	border: 1px solid rgba(255,255,255,0.10) !important;
	border-radius: 12px !important;
	color: #ffffff !important;
	cursor: pointer !important;
	font-size: 14px !important;
	font-weight: 600 !important;
	font-family: inherit !important;
	width: 100% !important;
	box-sizing: border-box !important;
	transition: background 240ms ease, border-color 240ms ease !important;
}
.am-booking__slot:hover { background: rgba(255,106,31,0.08) !important; border-color: rgba(255,106,31,0.35) !important; }
.am-booking__slot.is-selected {
	background: #FF6A1F !important;
	border-color: #FF6A1F !important;
	color: #ffffff !important;
}
.am-booking__slot-time { color: inherit !important; }
.am-booking__slot-min {
	font-size: 11px !important;
	font-weight: 500 !important;
	padding: 2px 8px !important;
	border-radius: 999px !important;
	background: rgba(255,255,255,0.08) !important;
	color: rgba(255,255,255,0.72) !important;
}
.am-booking__slot.is-selected .am-booking__slot-min {
	background: rgba(255,255,255,0.2) !important;
	color: #ffffff !important;
}
.am-booking__slots-empty {
	padding: 18px !important;
	border-radius: 12px !important;
	background: rgba(255,255,255,0.03) !important;
	color: rgba(255,255,255,0.55) !important;
	font-size: 13px !important;
	text-align: center !important;
	list-style: none !important;
}

/* SUMMARY — generato dal JS */
.am-booking__sum-row {
	display: flex !important;
	justify-content: space-between !important;
	gap: 12px !important;
	flex-wrap: wrap !important;
	padding-bottom: 12px !important;
	border-bottom: 1px solid rgba(255,255,255,0.06) !important;
}
.am-booking__sum-row:last-child { border-bottom: 0 !important; padding-bottom: 0 !important; }
.am-booking__sum-k {
	font-size: 11px !important;
	letter-spacing: 0.16em !important;
	text-transform: uppercase !important;
	color: rgba(255,255,255,0.55) !important;
	font-weight: 600 !important;
}
.am-booking__sum-v {
	font-size: 15px !important;
	font-weight: 600 !important;
	color: #ffffff !important;
	text-align: right !important;
	max-width: 60% !important;
}

/* TOAST */
.am-booking__toast {
	transition: opacity 200ms ease, transform 200ms ease !important;
}
.am-booking__toast.is-visible {
	opacity: 1 !important;
	transform: translateX(-50%) translateY(0) !important;
	pointer-events: auto !important;
}
.am-booking__toast.is-error { background: #c62828 !important; }
.am-booking__toast.is-success { background: #1e8e3e !important; }

/* SCROLLBAR slots list (webkit) */
.am-booking__slots-list::-webkit-scrollbar { width: 6px; }
.am-booking__slots-list::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.15); border-radius: 999px; }
.am-booking__slots-list::-webkit-scrollbar-track { background: transparent; }

/* RESPONSIVE */
@media (max-width: 720px) {
	.am-booking {
		padding: 20px !important;
		border-radius: 14px !important;
	}
	.am-booking__title { font-size: 22px !important; }
	.am-booking__grid { grid-template-columns: 1fr !important; }
	.am-booking__cal-body { grid-template-columns: 1fr !important; }
	.am-booking__nav { flex-direction: column !important; align-items: stretch !important; }
	.am-booking__nav .am-booking__btn { width: 100% !important; }
	.am-booking__hint { order: 2 !important; text-align: center !important; }
}
