/*
 * HSH Amenities.
 *
 * Pill-shaped amenities bar with scroll-snap paging. All rules scoped under
 * .hsh-amenities; colors and sizes driven by custom properties so the
 * widget's Style tab can override everything.
 */

.hsh-amenities {
	--hsh-am-bg: #2f4b3f;
	--hsh-am-radius: 999px;
	--hsh-am-divider: rgba(255, 255, 255, 0.16);
	--hsh-am-icon: #ffffff;
	--hsh-am-icon-size: 44px;
	--hsh-am-headline: #ffffff;
	--hsh-am-sub: rgba(255, 255, 255, 0.72);
	--hsh-am-arrow-size: 52px;
	--hsh-am-arrow-bg: #f7f3e8;
	--hsh-am-arrow-color: #2f4b3f;
	--hsh-am-dot: #eee8d8;
	--hsh-am-dot-active: #2f4b3f;
	--hsh-am-pv: 4;
	position: relative;
	/* Room for the arrows straddling the pill edges, so nothing overflows the page. */
	padding-inline: calc(var(--hsh-am-arrow-size) / 2);
}

.hsh-amenities__pill {
	background: var(--hsh-am-bg);
	border-radius: var(--hsh-am-radius);
	padding: 56px 48px;
	overflow: hidden;
}

.hsh-amenities__track {
	display: flex;
	margin: 0;
	padding: 0;
	list-style: none;
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	overscroll-behavior-x: contain;
	scrollbar-width: none;
	-webkit-overflow-scrolling: touch;
}

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

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

.hsh-amenities__item {
	flex: 0 0 calc(100% / var(--hsh-am-pv));
	scroll-snap-align: start;
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
	gap: 8px;
	padding: 4px 18px;
	border-left: 1px solid var(--hsh-am-divider);
}

.hsh-amenities__item:first-child {
	border-left: 0;
}

.hsh-amenities__link {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 8px;
	text-decoration: none;
}

.hsh-amenities__icon {
	display: inline-flex;
	color: var(--hsh-am-icon);
	margin-bottom: 6px;
}

.hsh-amenities__icon svg,
.hsh-amenities__icon .hsh-amenities__icon-img {
	width: var(--hsh-am-icon-size);
	height: var(--hsh-am-icon-size);
	display: block;
	object-fit: contain;
}

.hsh-amenities__icon--emoji {
	font-size: var(--hsh-am-icon-size);
	line-height: 1;
}

.hsh-amenities__headline {
	color: var(--hsh-am-headline);
	font-size: 22px;
	font-weight: 600;
	letter-spacing: 0.08em;
	line-height: 1.2;
}

.hsh-amenities__sub {
	color: var(--hsh-am-sub);
	font-size: 15px;
	line-height: 1.4;
}

/* ---- Arrows (straddle the pill edges; hidden on mobile — dots take over) ---- */

.hsh-amenities button.hsh-amenities__arrow {
	appearance: none;
	-webkit-appearance: none;
	position: absolute;
	top: 50%;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	box-sizing: border-box;
	width: var(--hsh-am-arrow-size);
	height: var(--hsh-am-arrow-size);
	min-width: var(--hsh-am-arrow-size);
	min-height: var(--hsh-am-arrow-size);
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: var(--hsh-am-arrow-bg);
	color: var(--hsh-am-arrow-color);
	font-size: 0;
	line-height: 0;
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.12);
	cursor: pointer;
	transition: opacity 0.2s ease;
}

.hsh-amenities__arrow--prev {
	left: 0;
	transform: translateY(-50%);
}

.hsh-amenities__arrow--next {
	right: 0;
	transform: translateY(-50%);
}

.hsh-amenities button.hsh-amenities__arrow svg {
	width: 20px;
	height: 20px;
}

.hsh-amenities button.hsh-amenities__arrow[disabled] {
	opacity: 0.35;
	cursor: default;
}

/* ---- Dots (built by JS; one per page at the current breakpoint) ---- */

.hsh-amenities__dots {
	display: flex;
	justify-content: center;
	gap: 9px;
	margin-top: 24px;
}

.hsh-amenities button.hsh-amenities__dot {
	appearance: none;
	-webkit-appearance: none;
	box-sizing: border-box;
	flex: 0 0 auto;
	width: 12px;
	height: 12px;
	min-width: 12px;
	min-height: 12px;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: var(--hsh-am-dot);
	font-size: 0;
	line-height: 0;
	box-shadow: none;
	cursor: pointer;
	transition: background 0.2s ease;
}

.hsh-amenities button.hsh-amenities__dot.is-active {
	background: var(--hsh-am-dot-active);
}

/* No overflow at this breakpoint: nothing to page through. */
.hsh-amenities.no-overflow .hsh-amenities__arrow,
.hsh-amenities.no-overflow .hsh-amenities__dots {
	display: none;
}

/* ---- Tablet & mobile: arrows out, dots + autoplay take over ---- */

@media (max-width: 1024px) {
	.hsh-amenities {
		padding-inline: 0;
	}

	.hsh-amenities button.hsh-amenities__arrow {
		display: none;
	}
}

/* ---- Mobile sizing ---- */

@media (max-width: 767px) {
	.hsh-amenities__pill {
		padding: 40px 20px;
	}

	.hsh-amenities__headline {
		font-size: 18px;
	}

	.hsh-amenities__sub {
		font-size: 13px;
	}
}

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

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