/*
 * Customer-facing availability guidance. These styles intentionally decorate
 * server-authoritative Booking Plus states; they do not make a booking valid.
 */

.asal-pay-now,
.asal-dashboard-hold {
	align-items: center;
	display: inline-flex !important;
	gap: 8px;
}

.asal-pay-now [data-asal-countdown] {
	background: rgba(45, 212, 191, .15);
	border-radius: 999px;
	color: #10766c;
	font-size: 12px;
	font-variant-numeric: tabular-nums;
	line-height: 1;
	padding: 5px 7px;
}

.asal-dashboard-hold {
	background: #fff8e7;
	border: 1px solid #f1d28a;
	border-radius: 999px;
	color: #825707;
	font-size: 12px;
	font-weight: 600;
	padding: 8px 10px;
}

.asal-dashboard-hold [data-asal-countdown] {
	font-variant-numeric: tabular-nums;
}

.asal-pay-now.asal-hold-expired,
.asal-hold-expired {
	background: #f2f4f6 !important;
	color: #68737e !important;
	cursor: not-allowed !important;
	opacity: .8;
}

.asal-payment-hold {
	align-items: center;
	background: #effcf9 !important;
	border-left-color: #2dd4bf !important;
	display: flex;
	flex-wrap: wrap;
	gap: 8px 12px;
	margin-bottom: 22px !important;
}

.asal-payment-hold > strong:first-child {
	color: #106c62;
}

.asal-payment-countdown {
	background: #10766c;
	border-radius: 6px;
	color: #fff;
	font-size: 19px;
	font-variant-numeric: tabular-nums;
	letter-spacing: .03em;
	padding: 6px 10px;
}

.asal-countdown--warning [data-asal-countdown] {
	background-color: #fff1d6 !important;
	color: #a85d00 !important;
}

.asal-countdown--urgent [data-asal-countdown] {
	background-color: #fff0f0 !important;
	color: #b42318 !important;
}

.asal-holder-banner {
	align-items: center;
	background: #effcf9;
	border: 1px solid #a2ede2;
	border-left: 4px solid #2dd4bf;
	border-radius: 10px;
	color: #145e58;
	display: flex;
	flex-wrap: wrap;
	font-size: 13px;
	gap: 5px;
	margin: 0 0 14px;
	padding: 12px 14px;
}

.asal-holder-banner-title {
	color: #0e665d;
	flex-basis: 100%;
	font-size: 14px;
}

.asal-holder-banner [data-asal-countdown] {
	background: #dffaf5;
	border-radius: 5px;
	color: #075e55;
	font-variant-numeric: tabular-nums;
	padding: 2px 5px;
}

.asal-holder-banner-action {
	background: #1dbfaf;
	border-radius: 6px;
	color: #fff !important;
	font-size: 12px;
	font-weight: 700;
	margin-left: auto;
	padding: 8px 11px;
	text-decoration: none !important;
}

.asal-live-status {
	color: #60707a;
	font-size: 12px;
	height: 0;
	margin: 0;
	overflow: hidden;
	transition: height .3s ease, margin .3s ease, opacity .3s ease;
}

.asal-live-status.is-visible {
	height: 18px;
	margin: 0 0 7px;
}

/* Slot state labels remain textual so colour is never the only signal. */
#lbp-time-slots .calendar-slot {
	transition: background-color .32s ease, border-color .32s ease, color .32s ease, opacity .32s ease, transform .32s ease;
}

#lbp-time-slots .calendar-slot.asal-slot--available {
	border-color: #80d9bf !important;
}

#lbp-time-slots .calendar-slot.asal-slot--reserved,
#lbp-time-slots .calendar-slot.asal-slot--yours,
#lbp-time-slots .calendar-slot.asal-slot--booked,
#lbp-time-slots .calendar-slot.asal-slot--past,
#lbp-time-slots .calendar-slot.asal-slot--unavailable {
	opacity: 1 !important;
	position: relative;
}

#lbp-time-slots .calendar-slot.asal-slot--reserved {
	background: #fff9e9 !important;
	border-color: #efd080 !important;
	color: #7b5706 !important;
}

#lbp-time-slots .calendar-slot.asal-slot--yours {
	background: #edf6ff !important;
	border-color: #9bc7f4 !important;
	color: #145ea6 !important;
}

#lbp-time-slots .calendar-slot.asal-slot--booked {
	background: #fff3f2 !important;
	border-color: #f1aaa5 !important;
	color: #a72d24 !important;
}

#lbp-time-slots .calendar-slot.asal-slot--past {
	background: #f5f6f7 !important;
	border-color: #d9dee2 !important;
	color: #69757d !important;
}

#lbp-time-slots .calendar-slot.asal-slot--unavailable {
	background: #f5f6f7 !important;
	border-color: #d6dce0 !important;
	color: #3f4a52 !important;
}

#lbp-time-slots .calendar-slot.asal-slot--updating {
	animation: asal-slot-updated .34s ease both;
}

#lbp-time-slots .calendar-slot .asal-slot-status {
	display: block;
	font-size: 11px;
	font-variant-numeric: tabular-nums;
	font-weight: 700;
	line-height: 1.2;
	margin: 5px 20px 0 0;
	text-align: left;
}

#lbp-time-slots .calendar-slot.asal-slot--available .asal-slot-status {
	color: #108264;
}

#lbp-time-slots .calendar-slot.asal-slot--reserved .asal-slot-status {
	color: #9a6700;
}

#lbp-time-slots .calendar-slot.asal-slot--yours .asal-slot-status {
	color: #176bb6;
}

#lbp-time-slots .calendar-slot.asal-slot--booked .asal-slot-status {
	color: #b42318;
}

#lbp-time-slots .calendar-slot.asal-slot--past .asal-slot-status,
#lbp-time-slots .calendar-slot.asal-slot--unavailable .asal-slot-status {
	color: #65717a;
}

/* Centered, keyboard-accessible availability guidance. */
.asal-alert-overlay[hidden] {
	display: none !important;
}

/*
 * The browser's default `[hidden]` rule is lower priority than some theme
 * display rules. Keep empty countdown/suggestion sections truly hidden so a
 * player never sees a blank "Time remaining" panel.
 */
.asal-alert-countdown[hidden],
.asal-alert-suggestions[hidden] {
	display: none !important;
}

.asal-alert-overlay {
	align-items: center;
	background: rgba(20, 29, 38, .54);
	display: flex;
	inset: 0;
	justify-content: center;
	overflow-y: auto;
	padding: 16px;
	position: fixed;
	z-index: 1000001;
}

.asal-alert-overlay.is-open {
	animation: asal-overlay-in .3s ease both;
}

.asal-alert-dialog {
	background: #fff;
	border-radius: 16px;
	box-shadow: 0 22px 70px rgba(15, 23, 42, .28);
	box-sizing: border-box;
	color: #26343c;
	max-height: calc(100vh - 32px);
	max-width: 420px;
	overflow: auto;
	padding: 32px;
	position: relative;
	text-align: center;
	width: min(420px, 90vw);
}

.asal-alert-overlay.is-open .asal-alert-dialog {
	animation: asal-dialog-in .3s ease both;
}

.asal-alert-close {
	align-items: center;
	appearance: none;
	background: #f4f6f7;
	border: 0;
	border-radius: 50%;
	color: #5c6a73;
	cursor: pointer;
	display: inline-flex;
	font-size: 24px;
	height: 36px;
	justify-content: center;
	line-height: 1;
	padding: 0;
	position: absolute;
	right: 14px;
	top: 14px;
	width: 36px;
}

.asal-alert-close:hover,
.asal-alert-close:focus-visible {
	background: #e9f8f5;
	color: #10766c;
	outline: 2px solid #2dd4bf;
	outline-offset: 2px;
}

.asal-alert-symbol {
	align-items: center;
	background: #eefaf8;
	border-radius: 50%;
	color: #11766c;
	display: inline-flex;
	font-size: 27px;
	font-weight: 800;
	height: 58px;
	justify-content: center;
	margin: 0 auto 16px;
	width: 58px;
}

.asal-alert--reserved .asal-alert-symbol {
	background: #fff7df;
	color: #a36700;
}

.asal-alert--booked .asal-alert-symbol {
	background: #fff0ef;
	color: #b42318;
}

.asal-alert--success .asal-alert-symbol {
	background: #eafaf6;
	color: #07805d;
}

.asal-alert--waiting .asal-alert-symbol,
.asal-alert--checking .asal-alert-symbol {
	background: #eafaf6;
	color: #0d796d;
}

.asal-alert-dialog h2 {
	color: #18242b;
	font-size: 22px;
	line-height: 1.22;
	margin: 0 0 9px;
}

.asal-alert-dialog p {
	color: #5a6872;
	font-size: 15px;
	line-height: 1.5;
	margin: 0;
	white-space: pre-line;
}

.asal-alert-countdown {
	align-items: center;
	background: #effcf9;
	border: 1px solid #b8eee4;
	border-radius: 10px;
	display: flex;
	flex-direction: column;
	gap: 7px;
	justify-content: center;
	margin: 22px 0 0;
	padding: 15px;
	text-align: center;
	transition: background-color .32s ease, border-color .32s ease;
}

.asal-alert-countdown > span {
	color: #316e67;
	font-size: 13px;
	font-weight: 700;
}

.asal-alert-countdown [data-asal-countdown] {
	background: #dff8f3;
	border-radius: 6px;
	color: #096a60;
	display: block;
	font-size: 42px;
	font-variant-numeric: tabular-nums;
	letter-spacing: .06em;
	line-height: 1;
	min-width: 148px;
	padding: 9px 14px;
}

/*
 * Countdown visibility hardening. Listeo/theme rules can style `strong` and
 * `span` elements globally, so every Apex Spotz timer gets an explicit text
 * colour, fill colour, weight and visible display. These remain presentation
 * only; all values still come from the existing server-backed hold timer.
 */
body .asal-alert-overlay .asal-alert-dialog .asal-alert-countdown strong[data-asal-countdown] {
	background: #dff8f3 !important;
	background-image: none !important;
	color: #096a60 !important;
	display: block !important;
	font-family: inherit !important;
	font-size: 42px !important;
	font-style: normal !important;
	font-weight: 800 !important;
	letter-spacing: .06em !important;
	line-height: 1 !important;
	opacity: 1 !important;
	text-indent: 0 !important;
	visibility: visible !important;
	-webkit-text-fill-color: #096a60 !important;
}

body .asal-alert-overlay .asal-alert-dialog .asal-alert-countdown.asal-countdown--warning strong[data-asal-countdown] {
	background-color: #fff1d6 !important;
	color: #a85d00 !important;
	-webkit-text-fill-color: #a85d00 !important;
}

body .asal-alert-overlay .asal-alert-dialog .asal-alert-countdown.asal-countdown--urgent strong[data-asal-countdown] {
	background-color: #fff0f0 !important;
	color: #b42318 !important;
	-webkit-text-fill-color: #b42318 !important;
}

body .asal-pay-now [data-asal-countdown],
body .asal-dashboard-hold [data-asal-countdown],
body .asal-holder-banner [data-asal-countdown],
body .asal-payment-hold .asal-payment-countdown,
body #lbp-time-slots .asal-slot-status [data-asal-countdown] {
	background-image: none !important;
	display: inline-block !important;
	font-family: inherit !important;
	font-style: normal !important;
	font-weight: 800 !important;
	line-height: 1.15 !important;
	opacity: 1 !important;
	text-indent: 0 !important;
	visibility: visible !important;
}

body .asal-pay-now [data-asal-countdown],
body .asal-holder-banner [data-asal-countdown],
body #lbp-time-slots .asal-slot-status [data-asal-countdown] {
	color: #075e55 !important;
	-webkit-text-fill-color: #075e55 !important;
}

body .asal-dashboard-hold [data-asal-countdown] {
	color: #825707 !important;
	-webkit-text-fill-color: #825707 !important;
}

body .asal-payment-hold .asal-payment-countdown {
	color: #ffffff !important;
	-webkit-text-fill-color: #ffffff !important;
}

body .asal-payment-hold.asal-countdown--warning .asal-payment-countdown {
	color: #a85d00 !important;
	-webkit-text-fill-color: #a85d00 !important;
}

body .asal-payment-hold.asal-countdown--urgent .asal-payment-countdown {
	color: #b42318 !important;
	-webkit-text-fill-color: #b42318 !important;
}

.asal-alert-countdown.asal-countdown--warning {
	background: #fff9ed;
	border-color: #efc36b;
}

.asal-alert-countdown.asal-countdown--urgent {
	background: #fff5f4;
	border-color: #ee9b94;
}

.asal-alert-suggestions {
	border-top: 1px solid #e9edef;
	margin-top: 20px;
	padding-top: 18px;
	text-align: left;
}

.asal-alert-suggestions-title {
	color: #43535e;
	display: block;
	font-size: 13px;
	font-weight: 700;
	margin-bottom: 9px;
}

.asal-alert-alternatives {
	display: grid;
	gap: 8px;
	grid-template-columns: repeat(3, minmax(0, 1fr));
}

.asal-alert-alternative {
	background: #f0fbf8;
	border: 1px solid #9de5d8;
	border-radius: 8px;
	color: #0d786c;
	cursor: pointer;
	font-size: 12px;
	font-weight: 700;
	min-height: 42px;
	padding: 7px 5px;
}

.asal-alert-alternative:hover,
.asal-alert-alternative:focus-visible {
	background: #dcf8f2;
	border-color: #2dd4bf;
	outline: 2px solid #2dd4bf;
	outline-offset: 2px;
}

.asal-alert-actions {
	display: grid;
	gap: 9px;
	margin-top: 24px;
}

.asal-alert-button {
	align-items: center;
	border: 1px solid transparent;
	border-radius: 9px;
	box-sizing: border-box;
	cursor: pointer;
	display: flex;
	font-size: 15px;
	font-weight: 700;
	justify-content: center;
	min-height: 48px;
	padding: 11px 16px;
	text-align: center;
	text-decoration: none !important;
	width: 100%;
}

.asal-alert-button--primary {
	background: #22c7b5;
	color: #fff !important;
}

.asal-alert-button--primary:hover,
.asal-alert-button--primary:focus-visible {
	background: #14ad9d;
	color: #fff !important;
	outline: 2px solid #087d70;
	outline-offset: 2px;
}

.asal-alert-button--secondary {
	background: #fff;
	border-color: #ccd6d9;
	color: #40505a;
}

.asal-alert-button--secondary:hover,
.asal-alert-button--secondary:focus-visible {
	background: #f6f9f9;
	border-color: #8fa4aa;
	outline: 2px solid #2dd4bf;
	outline-offset: 2px;
}

.asal-availability-toast {
	background: #24343c;
	border-radius: 999px;
	bottom: 24px;
	box-shadow: 0 10px 25px rgba(15, 23, 42, .2);
	color: #fff;
	font-size: 13px;
	left: 50%;
	opacity: 0;
	padding: 11px 16px;
	pointer-events: none;
	position: fixed;
	transform: translate(-50%, 12px);
	transition: opacity .3s ease, transform .3s ease;
	z-index: 1000002;
}

.asal-availability-toast.is-visible {
	opacity: 1;
	transform: translate(-50%, 0);
}

.asal-booking-progress {
	align-items: center;
	background: rgba(20, 29, 38, .36);
	display: none;
	inset: 0;
	justify-content: center;
	position: fixed;
	z-index: 1000000;
}

.asal-booking-progress.is-visible {
	display: flex;
}

.asal-booking-progress > div {
	align-items: center;
	background: #fff;
	border-radius: 11px;
	box-shadow: 0 16px 44px rgba(15, 23, 42, .22);
	color: #33444d;
	display: flex;
	font-size: 14px;
	font-weight: 700;
	gap: 10px;
	padding: 15px 18px;
}

.asal-progress-spinner {
	animation: asal-spin .8s linear infinite;
	border: 3px solid #c9f2eb;
	border-radius: 50%;
	border-top-color: #22c7b5;
	display: inline-block;
	height: 18px;
	width: 18px;
}

@keyframes asal-overlay-in {
	from { opacity: 0; }
	to { opacity: 1; }
}

@keyframes asal-dialog-in {
	from { opacity: 0; transform: scale(.97) translateY(5px); }
	to { opacity: 1; transform: scale(1) translateY(0); }
}

@keyframes asal-slot-updated {
	0% { opacity: .55; transform: scale(.985); }
	100% { opacity: 1; transform: scale(1); }
}

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

@media (max-width: 640px) {
	.asal-payment-hold { align-items: flex-start; flex-direction: column; }
	.asal-holder-banner-action { margin-left: 0; }
	.asal-alert-dialog {
		max-height: calc(100vh - 24px);
		overscroll-behavior: contain;
		padding: 30px 20px 22px;
		-webkit-overflow-scrolling: touch;
		width: 90vw;
	}
	.asal-alert-dialog h2 { font-size: 21px; }
	.asal-alert-countdown { margin-top: 20px; padding: 16px; }
	.asal-alert-countdown [data-asal-countdown],
	body .asal-alert-overlay .asal-alert-dialog .asal-alert-countdown strong[data-asal-countdown] { font-size: 44px !important; min-width: 168px; padding: 10px 14px; }
	.asal-alert-alternatives { grid-template-columns: 1fr; }
	.asal-alert-alternative { font-size: 14px; min-height: 46px; }
	.asal-alert-button { min-height: 52px; }
}

@media (prefers-reduced-motion: reduce) {
	.asal-alert-overlay,
	.asal-alert-overlay.is-open .asal-alert-dialog,
	.asal-availability-toast,
	.asal-live-status,
	.asal-progress-spinner,
	#lbp-time-slots .calendar-slot {
		animation: none !important;
		transition: none !important;
	}
}
