/* =========================================================================
   Hero da home: carrossel de banners + barra de reservas (Omnibees)
   Marcação em includes/hero.php, comportamento em assets/js/hero.js.

   Tamanhos:
   - computador (751px+): proporção 1920x820 (1920x820 em 1920px), começando logo abaixo do menu
   - tablet (751px a 991px): mínimo de 420px de altura, para a arte não ficar espremida
   - celular (até 750px): proporção 3x4, com as artes de celular (1080x1440)
   Barra de reservas a partir de 992px; abaixo disso, botão "Reserve agora!".
   ========================================================================= */

/* ---------- hero e carrossel ---------- */

.hero {
	position: relative;
	width: 100%;
	aspect-ratio: 3 / 4;
	background: var(--tg-grey-5);
}

@media (min-width: 751px) {
	.hero {
		aspect-ratio: 1920 / 820;
		min-height: 420px;
	}
}

@media (min-width: 992px) {
	.hero {
		min-height: 0;
	}
}

.hero__slides {
	position: absolute;
	inset: 0;
	overflow: hidden;
}

.hero__slide {
	position: absolute;
	inset: 0;
	opacity: 0;
	transition: opacity .5s ease;
}

.hero__slide.is-active {
	opacity: 1;
}

.hero__slide img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.hero__seta {
	position: absolute;
	top: 50%;
	z-index: 2;
	transform: translateY(-50%);
	padding: 10px 16px;
	border: 0;
	background: rgba(0, 0, 0, .4);
	color: var(--tg-common-white);
	font-size: 32px;
	line-height: 1;
	cursor: pointer;
}

.hero__seta--anterior { left: 20px; }
.hero__seta--proxima { right: 20px; }

@media (max-width: 750px) {
	.hero__seta { background: transparent; }
}

@media (prefers-reduced-motion: reduce) {
	.hero__slide { transition: none; }
}

/* ---------- barra de reservas (a partir de 992px) ---------- */

.reserva {
	display: none;
}

@media (min-width: 992px) {
	.reserva {
		position: absolute;
		left: 50%;
		bottom: 24px;
		z-index: 3;
		transform: translateX(-50%);
		display: grid;
		grid-template-columns: 1fr 1fr 1.25fr auto;
		gap: 10px;
		width: calc(100% - 48px);
		max-width: 1320px;
		padding: 10px;
		border-radius: 999px;
		background: var(--tg-common-white);
		box-shadow: 0 12px 40px rgba(2, 6, 21, .18);
		font-family: var(--tg-ff-body);
	}
}

@media (min-width: 1200px) {
	.reserva {
		bottom: 40px;
		gap: 20px;
		padding: 18px;
	}
}

.reserva__campo {
	display: flex;
	align-items: center;
	gap: 14px;
	width: 100%;
	min-width: 0;
	height: 56px;
	padding: 0 18px 0 8px;
	border: 1px solid var(--tg-border-3);
	border-radius: 999px;
	background: var(--tg-common-white);
	text-align: left;
	cursor: pointer;
	transition: border-color .2s ease;
}

.reserva__campo:hover,
.reserva__campo:focus-visible,
.reserva__campo[aria-expanded="true"],
.reserva__campo.is-ativo {
	border-color: var(--tg-common-black);
	outline: none;
}

.reserva__icone {
	display: grid;
	flex: none;
	place-items: center;
	width: 40px;
	height: 40px;
	border-radius: 50%;
	background: var(--tg-grey-7);
	color: var(--tg-common-black);
}

.reserva__texto {
	min-width: 0;
}

.reserva__rotulo,
.reserva__valor {
	display: block;
	overflow: hidden;
	white-space: nowrap;
	text-overflow: ellipsis;
}

.reserva__rotulo {
	font-size: 14px;
	line-height: 1.2;
	color: var(--tg-grey-4);
}

.reserva__valor {
	font-size: 17px;
	line-height: 1.35;
	color: var(--tg-common-black);
}

.reserva__valor.is-vazio {
	color: var(--tg-grey-6);
}

.reserva__buscar {
	height: 56px;
	padding: 0 32px;
	border: 0;
	border-radius: 999px;
	background: var(--tg-theme-primary);
	color: var(--tg-common-white);
	font-size: 17px;
	font-weight: 600;
	cursor: pointer;
	transition: background .2s ease;
}

.reserva__buscar:hover,
.reserva__buscar:focus-visible {
	background: #8e0e11;
	outline: none;
}

@media (min-width: 1200px) {
	.reserva__campo { height: 80px; padding: 0 24px 0 14px; }
	.reserva__icone { width: 52px; height: 52px; }
	.reserva__valor { font-size: 19px; }
	.reserva__buscar { height: 80px; padding: 0 52px; font-size: 19px; }
}

/* campo de texto que só serve de âncora para o calendário */
.reserva__calendario {
	position: absolute;
	width: 1px;
	height: 1px;
	opacity: 0;
	pointer-events: none;
}

/* aviso: falta data ou idade de criança */
.reserva__aviso {
	position: absolute;
	left: 50%;
	bottom: calc(100% + 12px);
	transform: translateX(-50%);
	margin: 0;
	padding: 8px 18px;
	border-radius: 999px;
	background: var(--tg-common-black);
	color: var(--tg-common-white);
	font-size: 15px;
	white-space: nowrap;
}

/* ---------- painel de hóspedes (abre para cima, dentro do hero) ---------- */

.reserva__hospedes {
	position: relative;
	min-width: 0;
}

.reserva__painel {
	position: absolute;
	right: 0;
	bottom: calc(100% + 16px);
	z-index: 5;
	width: 320px;
	max-height: 70vh;
	overflow-y: auto;
	padding: 8px 20px 20px;
	border-radius: 20px;
	background: var(--tg-common-white);
	box-shadow: 0 12px 40px rgba(2, 6, 21, .22);
	color: var(--tg-common-black);
	font-size: 16px;
}

.reserva__painel[hidden] {
	display: none;
}

.reserva__linha {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 12px 0;
}

.reserva__linha + .reserva__linha {
	border-top: 1px solid var(--tg-border-3);
}

.reserva__linha small {
	display: block;
	font-size: 13px;
	color: var(--tg-grey-4);
}

.reserva__contador {
	display: flex;
	align-items: center;
	gap: 12px;
}

.reserva__contador button {
	display: grid;
	place-items: center;
	width: 36px;
	height: 36px;
	padding: 0;
	border: 1px solid var(--tg-border-2);
	border-radius: 50%;
	background: var(--tg-common-white);
	color: var(--tg-common-black); /* o tema pinta todo botão de branco */
	font-size: 20px;
	line-height: 1;
	cursor: pointer;
}

.reserva__contador button:disabled {
	opacity: .35;
	cursor: not-allowed;
}

.reserva__contador output {
	min-width: 20px;
	font-weight: 600;
	text-align: center;
}

.reserva__idades:not(:empty) {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 10px;
	padding: 4px 0 14px;
}

.reserva__idades label {
	display: block;
	font-size: 13px;
	color: var(--tg-grey-4);
}

.reserva__idades select {
	display: block;
	width: 100%;
	height: 40px;
	margin-top: 4px;
	padding: 0 10px;
	border: 1px solid var(--tg-border-2);
	border-radius: 10px;
	background: var(--tg-common-white);
	color: var(--tg-common-black);
	font-size: 15px;
}

.reserva__idades select.is-invalido {
	border-color: var(--tg-theme-primary);
}

.reserva__aplicar {
	width: 100%;
	height: 44px;
	margin-top: 8px;
	border: 0;
	border-radius: 999px;
	background: var(--tg-common-black);
	color: var(--tg-common-white);
	font-weight: 600;
	cursor: pointer;
}

/* ---------- calendário (flatpickr) nas cores do site ---------- */

.reserva-calendario .flatpickr-day.selected,
.reserva-calendario .flatpickr-day.startRange,
.reserva-calendario .flatpickr-day.endRange {
	border-color: var(--tg-theme-primary);
	background: var(--tg-theme-primary);
	color: var(--tg-common-white);
}

.reserva-calendario .flatpickr-day.inRange {
	border-color: #f6dcdd;
	background: #f6dcdd;
	box-shadow: -5px 0 0 #f6dcdd, 5px 0 0 #f6dcdd;
}

/* ---------- botão "Reserve agora!" (até 991px) ---------- */

.reserva-mobile {
	position: absolute;
	left: 50%;
	bottom: 20px;
	z-index: 3;
	transform: translateX(-50%);
	padding: 14px 34px;
	border-radius: 999px;
	background: var(--tg-theme-primary);
	box-shadow: 0 8px 24px rgba(0, 0, 0, .3);
	color: var(--tg-common-white);
	font-size: 17px;
	font-weight: 600;
	white-space: nowrap;
}

.reserva-mobile:hover,
.reserva-mobile:focus-visible {
	background: #8e0e11;
	color: var(--tg-common-white);
}

@media (min-width: 992px) {
	.reserva-mobile { display: none; }
}
