/* ProWP Car — Floating chat buttons (WhatsApp / Messenger).
 *
 * Theme-agnostic: the stack is pinned with logical insets so the chosen side
 * mirrors automatically in right-to-left layouts. The block offset is raised
 * by the measuring script whenever a fixed bottom bar (mobile booking bar,
 * back-to-top, cookie notice) would overlap the buttons.
 */

.pwc-float-actions {
	position: fixed;
	inset-block-end: calc(env(safe-area-inset-bottom, 0px) + var(--pwc-float-bottom, 1rem));
	z-index: 60;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 10px;
	margin: 0;
	padding: 0;
	list-style: none;
	animation: pwc-float-actions-in .45s cubic-bezier(.16, 1, .3, 1) .2s backwards;
}

.pwc-float-actions__list {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 10px;
	max-block-size: 260px;
	opacity: 1;
	transform: translateY(0) scale(1);
	transition:
		opacity .22s ease,
		transform .26s cubic-bezier(.22, 1, .36, 1),
		max-block-size .28s cubic-bezier(.22, 1, .36, 1);
}

.pwc-float-toggle {
	display: none;
}

.pwc-float-actions--bottom-end {
	inset-inline-end: max(1rem, env(safe-area-inset-inline-end, 0px));
}

.pwc-float-actions--bottom-start {
	inset-inline-start: max(1rem, env(safe-area-inset-inline-start, 0px));
}

.pwc-float-action {
	position: relative;
	box-sizing: border-box;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	inline-size: 50px;
	block-size: 50px;
	border: 1px solid rgb(0 0 0 / .12);
	border-radius: 9999px;
	text-decoration: none;
	box-shadow: 0 8px 22px rgb(0 0 0 / .24);
	transition:
		transform .2s cubic-bezier(.16, 1, .3, 1),
		box-shadow .2s ease,
		background-color .2s ease,
		border-color .2s ease,
		color .2s ease;
}

.pwc-float-action--whatsapp {
	background: #25d366;
	color: #ffffff;
}

.pwc-float-action--messenger {
	background: #0084ff;
}

.pwc-float-action__icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	line-height: 0;
}

.pwc-float-action__icon svg {
	display: block;
}

.pwc-float-action:hover {
	transform: translateY(-2px) scale(1.04);
	box-shadow: 0 12px 28px rgb(0 0 0 / .3);
}

.pwc-float-action:focus-visible,
.pwc-float-toggle:focus-visible {
	outline: 3px solid var(--pwc-gold, #c5a15c);
	outline-offset: 3px;
}

.pwc-float-action__label,
.pwc-float-toggle__label {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	white-space: nowrap;
	padding: .35rem .65rem;
	border-radius: var(--pwc-radius-xs, .45rem);
	border: 1px solid rgb(197 161 92 / .35);
	background: #141215;
	color: #f8f5f2;
	font-family: var(--pwc-font, "Alexandria", "IBM Plex Sans Arabic", "Cairo", "Segoe UI", Tahoma, sans-serif);
	font-size: .75rem;
	font-weight: 700;
	line-height: 1.4;
	box-shadow: 0 8px 20px rgb(0 0 0 / .26);
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
	transition: opacity .18s ease, visibility .18s ease, transform .18s ease;
}

/* Tooltips always expand inward toward viewport center, never off-screen */
.pwc-float-actions--bottom-end .pwc-float-action__label,
.pwc-float-actions--bottom-end .pwc-float-toggle__label {
	inset-inline-end: calc(100% + .65rem);
	inset-inline-start: auto;
}

.pwc-float-actions--bottom-start .pwc-float-action__label,
.pwc-float-actions--bottom-start .pwc-float-toggle__label {
	inset-inline-start: calc(100% + .65rem);
	inset-inline-end: auto;
}

.pwc-float-action:hover .pwc-float-action__label,
.pwc-float-action:focus-visible .pwc-float-action__label,
.pwc-float-toggle:hover .pwc-float-toggle__label,
.pwc-float-toggle:focus-visible .pwc-float-toggle__label,
.pwc-float-actions--always-labels .pwc-float-action__label {
	opacity: 1;
	visibility: visible;
}

.pwc-float-actions--collapsed .pwc-float-toggle__label {
	opacity: 0;
	visibility: hidden;
}

.pwc-float-actions--collapsed .pwc-float-toggle:hover .pwc-float-toggle__label,
.pwc-float-actions--collapsed .pwc-float-toggle:focus-visible .pwc-float-toggle__label {
	opacity: 1;
	visibility: visible;
}

/* The premium mobile menu is a full-screen panel: the buttons step aside. */
body.on-limo-menu-open .pwc-float-actions {
	display: none;
}

@media (max-width: 47.99rem) {
	.pwc-float-action {
		inline-size: 52px;
		block-size: 52px;
	}

	.pwc-float-actions--no-mobile {
		display: none;
	}
}

@media (min-width: 48rem) {
	.pwc-float-actions--no-desktop {
		display: none;
	}
}

@media (prefers-reduced-motion: reduce) {
	.pwc-float-actions {
		animation: none;
	}

	.pwc-float-action {
		transition: none;
	}

	.pwc-float-action:hover {
		transform: none;
	}

	.pwc-float-action__label {
		transition: none;
	}
}

@keyframes pwc-float-actions-in {
	from {
		opacity: 0;
		transform: translateY(10px);
	}

	to {
		opacity: 1;
		transform: translateY(0);
	}
}

/* t91: official brand look & desktop Luxury Hybrid + Collapsible Toggle */
.pwc-float-action--whatsapp { background: #25d366; border-color: #25d366; color: #ffffff; }
.pwc-float-action--messenger { background: #ffffff; border-color: rgb(0 0 0 / .08); }
.pwc-float-action--call { background: var(--pwc-brand, #c91c2b); border-color: var(--pwc-brand, #c91c2b); color: #ffffff; }
.pwc-float-action--book { background: linear-gradient(135deg, var(--pwc-brand, #c91c2b) 0%, #99121e 100%); border-color: var(--pwc-brand, #c91c2b); color: #ffffff; }

@media (min-width: 48rem) {
	.pwc-float-action--mobile-only {
		display: none;
	}

	/* Option A: Luxury Hybrid (Unified Obsidian + Gold Border + Platform Icon Accents) */
	.pwc-float-actions--style-luxury_hybrid .pwc-float-action {
		background: linear-gradient(145deg, #1d181a 0%, #111215 100%);
		border: 1px solid rgb(197 161 92 / .42);
		box-shadow: 0 10px 24px -6px rgb(17 18 21 / .42), 0 0 0 1px rgb(255 255 255 / .05) inset;
	}

	.pwc-float-actions--style-luxury_hybrid .pwc-float-action--whatsapp {
		color: #25d366;
	}

	.pwc-float-actions--style-luxury_hybrid .pwc-float-action--call {
		color: #ff4d5a;
	}

	.pwc-float-actions--style-luxury_hybrid .pwc-float-action--whatsapp:hover,
	.pwc-float-actions--style-luxury_hybrid .pwc-float-action--whatsapp:focus-visible {
		background: #25d366;
		border-color: #25d366;
		color: #ffffff;
		box-shadow: 0 12px 26px rgb(37 211 102 / .42);
	}

	.pwc-float-actions--style-luxury_hybrid .pwc-float-action--call:hover,
	.pwc-float-actions--style-luxury_hybrid .pwc-float-action--call:focus-visible {
		background: linear-gradient(135deg, var(--pwc-brand, #c91c2b) 0%, #99121e 100%);
		border-color: var(--pwc-brand, #c91c2b);
		color: #ffffff;
		box-shadow: 0 12px 26px rgb(201 28 43 / .44);
	}

	.pwc-float-actions--style-luxury_hybrid .pwc-float-action--messenger:hover,
	.pwc-float-actions--style-luxury_hybrid .pwc-float-action--messenger:focus-visible {
		background: #ffffff;
		border-color: rgb(160 51 255 / .45);
		box-shadow: 0 12px 26px rgb(160 51 255 / .34);
	}

	/* Option B: Brand Unified */
	.pwc-float-actions--style-brand .pwc-float-action {
		background: linear-gradient(145deg, #2a0d12 0%, #141215 100%);
		border: 1px solid rgb(197 161 92 / .45);
		color: #ffffff;
	}

	.pwc-float-actions--style-brand .pwc-float-action--messenger svg path {
		fill: #ffffff;
	}

	.pwc-float-actions--style-brand .pwc-float-action:hover,
	.pwc-float-actions--style-brand .pwc-float-action:focus-visible {
		background: linear-gradient(135deg, var(--pwc-brand, #c91c2b) 0%, #8f101c 100%);
		border-color: var(--pwc-gold, #c5a15c);
	}

	/* Desktop Collapsible Toggle Button */
	.pwc-float-actions--collapsible .pwc-float-toggle {
		position: relative;
		box-sizing: border-box;
		display: inline-flex;
		align-items: center;
		justify-content: center;
		inline-size: 36px;
		block-size: 36px;
		padding: 0;
		border-radius: 9999px;
		border: 1px solid rgb(197 161 92 / .48);
		background: #141215;
		color: #e5c784;
		cursor: pointer;
		box-shadow: 0 6px 16px rgb(0 0 0 / .26);
		transition:
			inline-size .24s cubic-bezier(.22, 1, .36, 1),
			block-size .24s cubic-bezier(.22, 1, .36, 1),
			background-color .2s ease,
			border-color .2s ease,
			color .2s ease,
			transform .2s ease,
			box-shadow .2s ease;
	}

	.pwc-float-toggle__icon {
		display: inline-flex;
		align-items: center;
		justify-content: center;
		line-height: 0;
	}

	.pwc-float-toggle__icon--open {
		display: none;
	}

	.pwc-float-actions--collapsible:not(.pwc-float-actions--collapsed) .pwc-float-toggle:hover {
		background: var(--pwc-brand, #c91c2b);
		border-color: var(--pwc-brand, #c91c2b);
		color: #ffffff;
		transform: rotate(90deg);
	}

	.pwc-float-actions--collapsed {
		gap: 0;
	}

	.pwc-float-actions--collapsed .pwc-float-actions__list {
		max-block-size: 0;
		opacity: 0;
		overflow: hidden;
		pointer-events: none;
		transform: translateY(10px) scale(0.86);
	}

	.pwc-float-actions--collapsed .pwc-float-toggle {
		inline-size: 52px;
		block-size: 52px;
		background: linear-gradient(145deg, #2d0a11 0%, #141215 100%);
		border: 1.5px solid var(--pwc-gold, #c5a15c);
		color: #ffffff;
		box-shadow: 0 12px 28px rgb(201 28 43 / .34), 0 0 0 4px rgb(197 161 92 / .16);
	}

	.pwc-float-actions--collapsed .pwc-float-toggle:hover {
		background: linear-gradient(135deg, var(--pwc-brand, #c91c2b) 0%, #8f101c 100%);
		transform: translateY(-2px);
	}

	.pwc-float-actions--collapsed .pwc-float-toggle__icon--close {
		display: none;
	}

	.pwc-float-actions--collapsed .pwc-float-toggle__icon--open {
		display: inline-flex;
	}
}

/* Mobile Docked Bottom Action Bar (controlled from panel) */
@media (max-width: 47.99rem) {
	.pwc-float-actions--mobile-bottom_bar:not(.pwc-float-actions--no-mobile) .pwc-float-actions__list {
		display: contents;
	}

	body:has(.prowpcar-qb-combo__panel:not([hidden]), .prowpcar-booking-form__combo-panel:not([hidden])) .pwc-float-actions--mobile-bottom_bar {
		opacity: 0;
		pointer-events: none;
		transform: translateY(100%);
		transition: opacity .18s ease, transform .2s ease;
	}
	.pwc-float-actions--mobile-bottom_bar:not(.pwc-float-actions--no-mobile) {
		position: fixed;
		inset-block-end: 0;
		inset-inline: 0;
		inset-inline-start: 0;
		inset-inline-end: 0;
		flex-direction: row;
		align-items: center;
		justify-content: stretch;
		gap: 0.35rem;
		padding: 0.5rem 0.5rem calc(0.5rem + env(safe-area-inset-bottom, 0px));
		background: color-mix(in srgb, var(--on-limo-surface, #ffffff) 96%, transparent);
		backdrop-filter: blur(14px) saturate(1.2);
		-webkit-backdrop-filter: blur(14px) saturate(1.2);
		border-block-start: 1px solid var(--on-limo-outline, #e5e7eb);
		box-shadow: 0 -8px 24px rgb(0 0 0 / 0.12);
		animation: none;
	}

	html[data-theme="dark"] .pwc-float-actions--mobile-bottom_bar:not(.pwc-float-actions--no-mobile) {
		background: color-mix(in srgb, var(--on-limo-surface, #151314) 96%, transparent);
		border-block-start-color: rgba(255, 255, 255, 0.12);
	}

	.pwc-float-actions--mobile-bottom_bar:not(.pwc-float-actions--no-mobile) .pwc-float-action {
		flex: 1 1 auto;
		inline-size: auto;
		min-inline-size: 0;
		block-size: 44px;
		min-block-size: 44px;
		border-radius: var(--on-limo-radius-md, 0.75rem);
		padding-inline: 0.4rem;
		gap: 0.28rem;
		box-shadow: none;
	}

	.pwc-float-actions--mobile-bottom_bar:not(.pwc-float-actions--no-mobile) .pwc-float-action--primary {
		flex: 1.2 1 auto;
		box-shadow: var(--on-limo-shadow-accent-md, 0 6px 18px rgba(201, 28, 43, .22));
	}

	.pwc-float-actions--mobile-bottom_bar:not(.pwc-float-actions--no-mobile) .pwc-float-action__icon svg {
		width: 16px;
		height: 16px;
	}

	.pwc-float-actions--mobile-bottom_bar:not(.pwc-float-actions--no-mobile) .pwc-float-action__label {
		position: static;
		top: auto;
		transform: none;
		display: inline-block;
		opacity: 1;
		visibility: visible;
		padding: 0;
		border: 0;
		border-radius: 0;
		background: transparent;
		box-shadow: none;
		color: inherit;
		font-size: clamp(0.68rem, 2.8vw, 0.76rem);
		font-weight: 700;
		white-space: nowrap;
		overflow: visible;
		text-overflow: clip;
	}

	.pwc-float-actions--mobile-bottom_bar:not(.pwc-float-actions--no-mobile) .pwc-float-action--whatsapp .pwc-float-action__label,
	.pwc-float-actions--mobile-bottom_bar:not(.pwc-float-actions--no-mobile) .pwc-float-action--call .pwc-float-action__label,
	.pwc-float-actions--mobile-bottom_bar:not(.pwc-float-actions--no-mobile) .pwc-float-action--book .pwc-float-action__label {
		color: #ffffff;
	}

	.pwc-float-actions--mobile-bottom_bar:not(.pwc-float-actions--no-mobile) .pwc-float-action--messenger .pwc-float-action__label {
		color: #1c1e21;
	}

	body.pwc-has-mobile-action-bar {
		padding-block-end: 4.5rem;
	}

	/* On /book/ with the wizard mobile bar, step aside into a subtle WhatsApp helper bubble */
	body:has([data-prowpcar-booking-root]) .pwc-float-actions--mobile-bottom_bar:not(.pwc-float-actions--no-mobile) {
		inset-inline: auto;
		inset-inline-end: 0.75rem;
		inset-block-end: calc(5.5rem + env(safe-area-inset-bottom, 0px));
		padding: 0;
		background: transparent;
		border: 0;
		box-shadow: none;
		z-index: 55;
	}

	body:has([data-prowpcar-booking-root]) .pwc-float-actions--mobile-bottom_bar .pwc-float-action:not(.pwc-float-action--whatsapp) {
		display: none;
	}

	body:has([data-prowpcar-booking-root]) .pwc-float-actions--mobile-bottom_bar .pwc-float-action--whatsapp {
		flex: 0 0 auto;
		inline-size: 46px;
		block-size: 46px;
		min-inline-size: 46px;
		min-block-size: 46px;
		padding: 0;
		border-radius: 9999px;
		box-shadow: 0 8px 22px rgb(37 211 102 / 0.36);
	}

	body:has([data-prowpcar-booking-root]) .pwc-float-actions--mobile-bottom_bar .pwc-float-action--whatsapp .pwc-float-action__icon svg {
		width: 24px;
		height: 24px;
	}

	body:has([data-prowpcar-booking-root]) .pwc-float-actions--mobile-bottom_bar .pwc-float-action--whatsapp .pwc-float-action__label {
		display: none;
	}

	body:has([data-prowpcar-booking-root]).pwc-has-mobile-action-bar {
		padding-block-end: 5.5rem;
	}
}
