/**
 * Hotel Alpin - Booking widget integration CSS.
 *
 * 1) Pickadate jako popup pod inputem (nadpisuje fullscreen mobile-first theme)
 * 2) Modal z iframe Profitroom (otwierany po kliknieciu "Sprawdz dostepnosc")
 */

/* ===========================================================
   1. Input wyglada jak tekst arrival-bar
   =========================================================== */
.arrival-bar__input {
	appearance: none;
	-webkit-appearance: none;
	background: transparent;
	border: 0;
	padding: 0;
	margin: 0;
	color: inherit;
	font: inherit;
	font-size: 16px;
	font-weight: 400;
	line-height: 1;
	width: 100%;
	cursor: pointer;
	outline: none;
}
.arrival-bar__input:focus { outline: none; }
.arrival-bar__input[readonly] { cursor: pointer; }
.arrival-bar__field { position: relative; }

/* ===========================================================
   2. Pickadate - picker w body (pozycjonowany przez JS).
   Domyslnie ukryty, widoczny tylko gdy .picker--opened.
   container: 'body' eliminuje problemy z z-index/stacking context
   gdy elementy ponizej hero (np. features-block .fade-up) tworza
   wlasny stacking context przez transform.
   =========================================================== */
/* Gdy dropdown gosci jest otwarty - podnies caly arrival-bar nad ponizsze sekcje.
   Bez tego features-block (z .fade-up transform) maskuje panel mimo wysokiego z-index
   panelu - bo arrival-bar ma wlasny stacking context (z-index: 3). */
.arrival-bar:has(.select-dropdown.is-open) { z-index: 9999; }

.picker { z-index: 9999; }

/* WAZNE: position musi byc INNE niz 'fixed' jeszcze przed otwarciem pickera.
   Pickadate sprawdza getComputedStyle(.picker__holder).position === 'fixed'
   i jesli tak - dodaje body { overflow: hidden } przy open() (scroll lock).
   Override 'static' wymusza w=false w Pickadate.start(). */
.picker__holder {
	display: none;
	position: static;
}
.picker--opened .picker__holder {
	display: block;
	position: static;
	width: 300px;
	max-width: 90vw;
	height: auto;
	top: auto;
	bottom: auto;
	left: auto;
	right: auto;
	transform: none;
	background: #fff;
	overflow: visible;
}
.picker--opened .picker__frame {
	position: static;
	top: auto;
	bottom: auto;
	left: auto;
	right: auto;
	min-width: 0;
	max-width: none;
	width: 100%;
	margin: 0;
	opacity: 1;
	transform: none;
	-ms-transform: none;
	filter: none;
	-ms-filter: none;
	-moz-opacity: 1;
	transition: none;
}
.picker--opened .picker__wrap {
	display: block;
	width: auto;
	height: auto;
}
.picker--opened .picker__box {
	display: block;
	background: #fff;
	font-size: 14px;
	border: 1px solid rgba(0, 0, 0, 0.08);
	box-shadow: 0 12px 30px rgba(0, 0, 0, 0.22);
	border-radius: 4px;
}
.picker--opened .picker__holder { background: transparent; }

/* ===========================================================
   3. Booking modal (iframe Profitroom)
   =========================================================== */
.booking-modal {
	position: fixed;
	inset: 0;
	z-index: 9999;
	background: rgba(0, 0, 0, 0.85);
	display: none;
	align-items: center;
	justify-content: center;
	padding: 24px;
	opacity: 0;
	transition: opacity 0.2s ease;
}
.booking-modal.is-open {
	display: flex;
	opacity: 1;
}
.booking-modal__inner {
    position: relative;
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
    background: #fff;
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}
.booking-modal__close {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 2;
    width: 50px;
    height: 50px;
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    border: 0;
    cursor: pointer;
    font-size: 30px;
    display: flex;
    justify-content: center;
    transition: background 0.15s ease;
    border: 1px solid var(--gold);
    align-items: center;
}
.booking-modal__close:hover,
.booking-modal__close:focus-visible {
	background: rgba(0, 0, 0, 0.85);
	outline: none;
}
.booking-modal__iframe {
	width: 100%;
	height: 100%;
	border: 0;
	display: block;
}

body.is-booking-modal-open { overflow: hidden; }

@media (max-width: 767px) {
	.booking-modal { padding: 0; }
	.booking-modal__inner { max-width: 100%; max-height: 100%; border-radius: 0; }
	.booking-modal__close { top: 8px; right: 8px; }
}
