/*
 * HSH Rooms & Suites.
 *
 * Outer scroll-snap card slider + per-room scroll-snap image rotators.
 * All rules scoped under .hsh-rooms; colors/sizes via custom properties
 * overridable from the widget's Style tab. Defaults assume the dark green
 * section background from the design.
 */

.hsh-rooms {
	--hsh-r-pv: 3;
	--hsh-r-gap: 28px;
	--hsh-r-ratio: 1 / 1;
	--hsh-r-arch: 999px;
	--hsh-r-title: #f7f3e8;
	--hsh-r-desc: rgba(255, 255, 255, 0.82);
	--hsh-r-book: #ffffff;
	--hsh-r-underline: #eec95c;
	--hsh-r-arrow-size: 48px;
	--hsh-r-arrow-bg: #f7f3e8;
	--hsh-r-arrow-color: #2f4b3f;
	--hsh-r-dot: rgba(255, 255, 255, 0.55);
	--hsh-r-dot-active: #ffffff;
	position: relative;
	padding-inline: calc(var(--hsh-r-arrow-size) / 2);
}

/* ---- Outer track ---- */

.hsh-rooms__track {
	display: flex;
	gap: var(--hsh-r-gap);
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	overscroll-behavior-x: contain;
	scrollbar-width: none;
	-webkit-overflow-scrolling: touch;
	padding: 4px 0;
}

.hsh-rooms__track::-webkit-scrollbar {
	display: none;
}

.hsh-rooms__track:focus-visible {
	outline: 2px solid var(--hsh-r-arrow-bg);
	outline-offset: 6px;
}

.hsh-rooms__card {
	/* Containing block for absolutely-positioned descendants (e.g. the
	   screen-reader-text label in the Book link). Without this they escape
	   the track's clipping and stretch the page horizontally. */
	position: relative;
	flex: 0 0 calc((100% - (var(--hsh-r-pv) - 1) * var(--hsh-r-gap)) / var(--hsh-r-pv));
	scroll-snap-align: start;
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
}

/* ---- Per-room image rotator ---- */

.hsh-rooms__media {
	position: relative;
	width: 100%;
	border-radius: var(--hsh-r-arch) var(--hsh-r-arch) 18px 18px;
	overflow: hidden;
	background: #e8e4da;
	margin-bottom: 26px;
}

.hsh-rooms__imgs {
	display: flex;
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	overscroll-behavior-x: contain;
	scrollbar-width: none;
	-webkit-overflow-scrolling: touch;
}

.hsh-rooms__imgs::-webkit-scrollbar {
	display: none;
}

.hsh-rooms__img {
	flex: 0 0 100%;
	scroll-snap-align: start;
	scroll-snap-stop: always;
	margin: 0;
	position: relative;
	aspect-ratio: var(--hsh-r-ratio); /* reserves space: zero CLS */
}

.hsh-rooms__img img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

/* ---- Per-room dots (inside the image, bottom center) ---- */

.hsh-rooms__dots {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 14px;
	display: flex;
	justify-content: center;
	gap: 7px;
}

.hsh-rooms button.hsh-rooms__dot {
	appearance: none;
	-webkit-appearance: none;
	box-sizing: border-box;
	flex: 0 0 auto;
	width: 8px;
	height: 8px;
	min-width: 8px;
	min-height: 8px;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: var(--hsh-r-dot);
	font-size: 0;
	line-height: 0;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
	cursor: pointer;
	transition: background 0.2s ease, transform 0.2s ease;
}

.hsh-rooms button.hsh-rooms__dot.is-active {
	background: var(--hsh-r-dot-active);
	transform: scale(1.2);
}

/* ---- Card text ---- */

.hsh-rooms__title {
	margin: 0 0 14px;
	font-family: Georgia, "Times New Roman", serif;
	font-size: clamp(24px, 2.2vw, 32px);
	font-weight: 500;
	line-height: 1.2;
	color: var(--hsh-r-title);
}

.hsh-rooms__desc {
	margin: 0 0 22px;
	font-size: 15px;
	line-height: 1.7;
	color: var(--hsh-r-desc);
	max-width: 44ch;
}

.hsh-rooms__book {
	margin-top: auto;
	color: var(--hsh-r-book);
	font-size: 13px;
	font-weight: 700;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	text-decoration: none;
	border-bottom: 2px solid var(--hsh-r-underline);
	padding-bottom: 5px;
	transition: opacity 0.2s ease;
}

.hsh-rooms__book:hover,
.hsh-rooms__book:focus-visible {
	color: var(--hsh-r-book);
	opacity: 0.85;
}

/* ---- Outer arrows (straddle the widget edges) ---- */

.hsh-rooms button.hsh-rooms__arrow {
	appearance: none;
	-webkit-appearance: none;
	position: absolute;
	/* Vertically centered on the image area, not the whole card. */
	top: calc((100% - 140px) * 0.32);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	box-sizing: border-box;
	width: var(--hsh-r-arrow-size);
	height: var(--hsh-r-arrow-size);
	min-width: var(--hsh-r-arrow-size);
	min-height: var(--hsh-r-arrow-size);
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: var(--hsh-r-arrow-bg);
	color: var(--hsh-r-arrow-color);
	font-size: 0;
	line-height: 0;
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
	cursor: pointer;
	transition: opacity 0.2s ease;
}

.hsh-rooms__arrow--prev {
	left: 0;
}

.hsh-rooms__arrow--next {
	right: 0;
}

.hsh-rooms button.hsh-rooms__arrow svg {
	width: 18px;
	height: 18px;
}

.hsh-rooms button.hsh-rooms__arrow[disabled] {
	opacity: 0.35;
	cursor: default;
}

/* Nothing to page through at this breakpoint. */
.hsh-rooms.no-overflow .hsh-rooms__arrow {
	display: none;
}

/* ---- Reduced motion ---- */

@media (prefers-reduced-motion: reduce) {
	.hsh-rooms__track,
	.hsh-rooms__imgs {
		scroll-behavior: auto;
	}

	.hsh-rooms button.hsh-rooms__dot {
		transition: none;
	}
}
