/**
 * Structural behavior for the manually designed Booking Bar.
 * Elementor owns width/max-width/content/colors; Core owns floating position
 * and visible/hidden state on the frontend.
 *
 * First-paint safeguard: the bar must not occupy its Elementor layout slot
 * while deferred JS is still loading. Otherwise its initial in-flow layout
 * animates into the fixed bottom dock on mobile refresh.
 */
body:not(.elementor-editor-active) [data-idx-booking-bar]:not(.is-idx-editor-preview),
[data-idx-booking-bar].is-idx-managed {
	position: fixed !important;
	top: auto !important;
	right: auto !important;
	bottom: var(--idx-booking-bar-bottom, max(16px, env(safe-area-inset-bottom))) !important;
	left: 50% !important;
	z-index: 95;
	translate: -50% 0;
}

/* Hidden by default even before booking-bar.js adds any state classes. */
body:not(.elementor-editor-active) [data-idx-booking-bar]:not(.is-idx-editor-preview):not(.is-idx-visible):not([aria-hidden="false"]),
[data-idx-booking-bar][aria-hidden="true"],
[data-idx-booking-bar].is-idx-hidden {
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
}

body:not(.elementor-editor-active) [data-idx-booking-bar]:not(.is-idx-editor-preview):not(.is-idx-visible):not([aria-hidden="false"]),
[data-idx-booking-bar].is-idx-managed[aria-hidden="true"],
[data-idx-booking-bar].is-idx-managed.is-idx-hidden {
	translate: -50% calc(100% + 32px);
}

[data-idx-booking-bar][aria-hidden="false"],
[data-idx-booking-bar].is-idx-visible,
[data-idx-booking-bar].is-idx-editor-preview {
	opacity: 1;
	visibility: visible;
	pointer-events: auto;
}

[data-idx-booking-bar].is-idx-managed[aria-hidden="false"],
[data-idx-booking-bar].is-idx-managed.is-idx-visible {
	translate: -50% 0;
}

/* SkyPath's transition skin must not animate the JS initialisation. */
body:not(.elementor-editor-active) [data-idx-booking-bar]:not(.is-idx-editor-preview):not(.is-idx-motion-ready) {
	transition: none !important;
}

@media (max-width: 767px) {
	body:not(.elementor-editor-active) [data-idx-booking-bar]:not(.is-idx-editor-preview),
	[data-idx-booking-bar].is-idx-managed {
		--idx-booking-bar-bottom: max(10px, env(safe-area-inset-bottom));
	}
}

@media print {
	[data-idx-booking-bar] {
		display: none !important;
	}
}
