/**
 * Perfect Hideaways search modal — ported from design/search-modal.html.
 *
 * Tokens and .ph-* classes match the XD reference. Scoped under .ph-search-root
 * so theme body styles are not overridden globally.
 */

.ph-search-root {
	--ph-green: #808463;
	--ph-green-hover: #6f7355;
	--ph-outline: #ebe9e8;
	--ph-grey: #515151;
	--ph-grey-soft: #7d7d7d;
	--ph-white: #ffffff;
	--ph-panel-tint: #edebea;
	--ph-divider: #eaeaea;
	--ph-label-color: #999999;
	--ph-label-weight: 700;
	--ph-label-tracking: 1.5px;
	--ph-bar-radius: 100px;
	--ph-bar-padding: 10px 10px 10px 22px;
	--ph-bar-margin-top: 0;
	--ph-bar-shadow: 0 8px 30px rgba(0, 0, 0, 0.05);
	--ph-btn-radius: 10px;
	--ph-btn-weight: 300;
	--ph-input-border: 1px solid #ebe9e8;
	--ph-input-bg: #ffffff;
	--ph-input-radius: 6px;
	--ph-input-padding: 6px 34px 6px 36px;
	--ph-input-margin-top: 0;
	--ph-guests-border: 1px solid #ebe9e8;
	--ph-guests-bg: #ffffff;
	--ph-guests-radius: 6px;
	--ph-guests-padding: 6px 10px;
	--ph-guests-margin-top: 0;
	--ph-card-radius: 8px;
	--serif: "Baskervville", Georgia, serif;
	--sans: "Montserrat", Arial, sans-serif;
	--radius: var(--ph-card-radius);
	--shadow: var(--ph-bar-shadow);
	font-family: var(--sans);
	color: var(--ph-grey);
	box-sizing: border-box;
}

.ph-search-root *,
.ph-search-root *::before,
.ph-search-root *::after {
	box-sizing: border-box;
}

.ph-search-root,
.ph-search-root *,
.ph-search-root *::before,
.ph-search-root *::after {
	text-shadow: none !important;
}

/* ===== Trigger (hero-style open control; <a> avoids theme button FOUC) ===== */
.ph-search-root .ph-trigger {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	width: 100%;
	max-width: 420px;
	margin: 0 auto;
	padding: 14px 22px;
	font-family: var(--sans);
	font-size: 0.95rem;
	font-weight: 500;
	line-height: 1;
	letter-spacing: 0;
	text-transform: none;
	text-decoration: none !important;
	color: #000000 !important;
	text-shadow: none !important;
	background: var(--ph-white) !important;
	background-color: var(--ph-white) !important;
	border: 1px solid var(--ph-outline) !important;
	border-radius: var(--radius);
	box-shadow: 0 4px 18px rgba(0, 0, 0, 0.08);
	cursor: pointer;
	appearance: none;
	-webkit-appearance: none;
	box-sizing: border-box;
	transition: border-color 0.2s, box-shadow 0.2s;
}

.ph-search-root .ph-trigger span {
	color: #000000 !important;
	text-shadow: none !important;
}

.ph-search-root .ph-trigger:hover,
.ph-search-root .ph-trigger:focus {
	text-decoration: none !important;
	border-color: var(--ph-green) !important;
	box-shadow: 0 0 0 3px rgba(128, 132, 99, 0.15);
	outline: none;
	color: #000000 !important;
}

.ph-search-root .ph-trigger .ph-search-icon-img,
.ph-search-root .ph-search-icon-img {
	width: 16px;
	height: 16px;
	flex-shrink: 0;
	display: block;
	object-fit: contain;
}

.ph-search-root .ph-btn .ph-search-icon-img {
	width: 15px;
	height: 15px;
	filter: brightness(0) invert(1);
}

/* ===== Overlay ===== */
.ph-search-root .ph-overlay {
	position: fixed;
	inset: 0;
	z-index: 100000;
	background: rgba(30, 28, 26, 0.72);
	display: none;
	justify-content: center;
	align-items: flex-start;
	/* Top offset clears the site header; pad here so × moves with the modal. */
	padding: 130px 24px 40px;
	overflow: hidden;
	-webkit-backdrop-filter: blur(1px);
	backdrop-filter: blur(5px);
	box-sizing: border-box;
}

.ph-search-root .ph-overlay.is-open {
	display: flex;
}

body.ph-search-lock {
	overflow: hidden;
}

/* ===== Modal shell ===== */
.ph-search-root .ph-modal {
	position: relative;
	display: flex;
	flex-direction: column;
	width: 100%;
	max-width: 860px;
	max-height: calc(100vh - 170px);
	margin: 0 auto;
	text-align: center;
	color: var(--ph-white);
	background: transparent;
	min-height: 0;
}

.ph-search-root button.ph-close {
	position: absolute;
	top: 44px;
	right: -52px;
	z-index: 5;
	width: 36px;
	height: 36px;
	border: none;
	border-radius: 6px;
	background: #5b5854;
	color: #fff;
	font-size: 20px;
	line-height: 1;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: background 0.2s;
	padding: 0;
	appearance: none;
	-webkit-appearance: none;
}

.ph-search-root button.ph-close:hover {
	background: #454340;
}

.ph-search-root h2.ph-modal__title {
	font-family: var(--serif);
	font-weight: 400;
	font-size: 2.35rem;
	letter-spacing: 0.5px;
	text-transform: uppercase;
	margin: 0 0 14px;
	color: var(--ph-white);
	flex-shrink: 0;
}

.ph-search-root .ph-modal__sub {
	font-size: 1.05rem;
	font-weight: 400;
	margin: 0 0 26px;
	color: var(--ph-white);
	flex-shrink: 0;
}

/* ===== Search card (continuous pill bar) ===== */
.ph-search-root form.ph-searchcard,
.ph-search-root .ph-searchcard {
	background: var(--ph-white);
	border-radius: var(--ph-bar-radius);
	box-shadow: var(--ph-bar-shadow);
	padding: var(--ph-bar-padding);
	margin-top: var(--ph-bar-margin-top);
	text-align: left;
	flex-shrink: 0;
	position: relative;
	z-index: 2;
}

.ph-form {
	display: flex;
	align-items: flex-end;
	gap: 12px;
}

.ph-field {
	display: flex;
	flex-direction: column;
	justify-content: flex-end;
	min-width: 0;
}

.ph-field--dest {
	flex: 1 1 auto;
	padding-right: 4px;
	position: relative;
}

.ph-field--guests {
	flex: 0 0 260px;
	position: relative;
	padding: 0 4px 0 12px;
	border-left: 1px solid var(--ph-divider);
}

.ph-search-root .ph-field--guests[hidden] {
	display: none !important;
}

.ph-guests-inline-row {
	display: flex;
	align-items: flex-end;
	gap: 8px;
	width: 100%;
	position: relative;
}

.ph-guests-inline {
	flex: 1 1 0;
	min-width: 0;
	display: flex;
	flex-direction: column;
}

.ph-guests-inline .ph-label {
	margin-bottom: 6px;
}

.ph-search-root .ph-label {
	font-family: var(--serif);
	font-size: 12px;
	font-weight: var(--ph-label-weight);
	letter-spacing: var(--ph-label-tracking);
	text-transform: uppercase;
	color: var(--ph-label-color);
	margin: 0 0 6px;
	text-align: left;
	line-height: 1.2;
	display: block;
	width: 100%;
}

.ph-search-root .ph-input-wrap {
	position: relative;
	display: flex;
	align-items: center;
	width: 100%;
}

.ph-search-root .ph-input-wrap .ph-search-icon-img {
	position: absolute;
	left: 12px;
	top: 50%;
	transform: translateY(-50%);
	width: 16px;
	height: 16px;
	pointer-events: none;
	z-index: 1;
	opacity: 0.55;
}

.ph-search-root input.ph-input {
	width: 100%;
	min-height: 42px;
	font-family: var(--sans);
	font-size: 0.95rem;
	line-height: 1.2;
	color: var(--ph-grey) !important;
	border: var(--ph-input-border);
	border-radius: var(--ph-input-radius);
	padding: var(--ph-input-padding);
	margin-top: var(--ph-input-margin-top);
	background: var(--ph-input-bg);
	outline: none;
	box-shadow: none;
	transition: none;
	box-sizing: border-box;
}

.ph-search-root input.ph-input.ph-input--search {
	padding-left: 36px;
}

.ph-search-root input.ph-input::placeholder {
	color: #b3b1af;
}

.ph-search-root input.ph-input:focus {
	border: var(--ph-input-border);
	box-shadow: none;
}

.ph-search-root select.ph-input.ph-guests-select {
	display: block;
	width: 100%;
	height: auto;
	min-height: 42px;
	font-family: var(--sans);
	font-size: 0.95rem;
	font-weight: 400;
	line-height: 1.2;
	letter-spacing: 0;
	text-transform: none;
	color: var(--ph-grey) !important;
	background-color: var(--ph-guests-bg) !important;
	border: var(--ph-guests-border) !important;
	border-radius: var(--ph-guests-radius);
	box-shadow: none;
	padding: var(--ph-guests-padding) !important;
	padding-right: 28px !important;
	margin-top: var(--ph-guests-margin-top);
	cursor: pointer;
	appearance: none;
	-webkit-appearance: none;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%237d7d7d' d='M1.4 0L6 4.6 10.6 0 12 1.4 6 7.4 0 1.4z'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 10px center;
	background-size: 10px 7px;
	box-sizing: border-box;
}

.ph-search-root select.ph-input.ph-guests-select:focus {
	border-color: var(--ph-green) !important;
	outline: none;
	box-shadow: 0 0 0 3px rgba(128, 132, 99, 0.15);
}

.ph-search-root .ph-guests-inline-row > .ph-field-clear {
	position: relative;
	right: auto;
	top: auto;
	transform: none;
	flex: 0 0 28px;
	align-self: flex-end;
	margin-bottom: 7px;
}

.ph-search-root button.ph-field-clear {
	position: absolute;
	right: 0;
	top: 50%;
	transform: translateY(-50%);
	z-index: 2;
	width: 28px;
	height: 28px;
	padding: 0;
	margin: 0;
	border: 1px solid transparent !important;
	border-radius: 6px;
	background: transparent !important;
	background-color: transparent !important;
	color: var(--ph-grey-soft) !important;
	font-size: 1.05rem;
	line-height: 1;
	font-weight: 400;
	letter-spacing: 0;
	text-transform: none;
	box-shadow: none;
	cursor: pointer;
	appearance: none;
	-webkit-appearance: none;
}

.ph-search-root button.ph-field-clear:hover,
.ph-search-root button.ph-field-clear:focus {
	color: var(--ph-grey) !important;
	border-color: var(--ph-outline) !important;
	background: rgba(81, 81, 81, 0.06) !important;
	background-color: rgba(81, 81, 81, 0.06) !important;
	outline: none;
}

.ph-search-root button.ph-field-clear[hidden] {
	display: none !important;
}

.ph-search-root button.ph-btn,
.ph-search-root .ph-btn[type="submit"],
.ph-search-root .ph-btn[type="button"] {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	height: 46px;
	margin: 0;
	padding: 0 28px;
	font-family: var(--sans);
	font-weight: var(--ph-btn-weight);
	font-size: 0.95rem;
	line-height: 1;
	letter-spacing: 0;
	text-transform: none;
	color: #fff !important;
	background: var(--ph-green) !important;
	background-color: var(--ph-green) !important;
	border: none !important;
	border-radius: var(--ph-btn-radius);
	box-shadow: none;
	cursor: pointer;
	white-space: nowrap;
	appearance: none;
	-webkit-appearance: none;
	transition: background 0.2s;
	flex-shrink: 0;
}

.ph-search-root button.ph-btn .ph-search-icon,
.ph-search-root .ph-btn .ph-search-icon {
	display: none;
}

.ph-search-root button.ph-btn:hover,
.ph-search-root .ph-btn[type="submit"]:hover,
.ph-search-root .ph-btn[type="button"]:hover {
	background: var(--ph-green-hover) !important;
	background-color: var(--ph-green-hover) !important;
}

.ph-search-root .ph-submit-wrap {
	display: inline-flex;
	flex-direction: column;
	justify-content: flex-end;
	flex-shrink: 0;
	position: relative;
	align-self: flex-end;
}

.ph-search-root .ph-submit-wrap[hidden] {
	display: none !important;
}

.ph-search-root .ph-submit-wrap.is-disabled {
	cursor: not-allowed;
}

.ph-search-root .ph-form > .ph-submit-wrap > button.ph-btn,
.ph-search-root .ph-form > .ph-submit-wrap > .ph-btn[type="submit"] {
	height: 42px;
	min-height: 42px;
	padding: 0 24px;
	box-sizing: border-box;
}

/*
 * Destination suggest sits in-flow between the search bar and pills/cards.
 * Height is set in JS so the flex modal actually reserves space (grid 0fr/1fr
 * was collapsing inside this column and painting over .ph-expanded).
 */
.ph-search-root .ph-dest-suggest-slot {
	flex: 0 0 auto;
	height: 0;
	margin-top: 0;
	overflow: hidden;
	transition: height 0.32s ease, margin-top 0.32s ease;
}

.ph-search-root .ph-dest-suggest-slot.is-open {
	margin-top: 10px;
}

.ph-search-root .ph-dest-suggest-slot__inner {
	overflow: hidden;
}

.ph-search-root .ph-dest-suggest {
	position: relative;
	z-index: 1;
	display: flex;
	flex-direction: column;
	max-height: min(280px, 42vh);
	overflow: hidden;
	margin: 0;
	padding: 0 0 6px;
	background: var(--ph-white);
	border: 1px solid var(--ph-outline);
	border-radius: 8px;
	box-shadow: 0 10px 28px rgba(0, 0, 0, 0.12);
	text-align: left;
}

@media (prefers-reduced-motion: reduce) {
	.ph-search-root .ph-dest-suggest-slot {
		transition: none;
	}
}

.ph-search-root .ph-dest-suggest__toolbar {
	display: flex;
	justify-content: flex-end;
	align-items: center;
	flex-shrink: 0;
	position: relative;
	z-index: 2;
	padding: 2px 2px 0 8px;
	pointer-events: none;
}

.ph-search-root .ph-dest-suggest__list {
	flex: 1 1 auto;
	min-height: 0;
	overflow-y: auto;
	-webkit-overflow-scrolling: touch;
	position: relative;
	z-index: 1;
}

.ph-search-root button.ph-dropdown-close {
	flex-shrink: 0;
	display: block;
	width: 100%;
	margin: 0;
	padding: 12px 14px;
	min-height: 44px;
	border: none !important;
	border-top: 1px solid var(--ph-outline) !important;
	border-radius: 0 0 8px 8px;
	background: var(--ph-white) !important;
	background-color: var(--ph-white) !important;
	color: var(--ph-grey) !important;
	font-family: var(--sans);
	font-size: 0.88rem;
	font-weight: 600;
	letter-spacing: 0.4px;
	text-transform: uppercase;
	cursor: pointer;
	appearance: none;
	-webkit-appearance: none;
	box-shadow: none;
}

.ph-search-root .ph-dest-suggest button.ph-dropdown-close {
	width: 44px;
	min-width: 44px;
	height: 44px;
	padding: 0;
	border-top: none !important;
	border-radius: 6px;
	pointer-events: auto;
	position: relative;
	z-index: 3;
	font-size: 22px;
	font-weight: 400;
	letter-spacing: 0;
	text-transform: none;
	line-height: 1;
}

.ph-search-root button.ph-dropdown-close:hover,
.ph-search-root button.ph-dropdown-close:focus {
	background: rgba(81, 81, 81, 0.06) !important;
	background-color: rgba(81, 81, 81, 0.06) !important;
	outline: none;
}

.ph-search-root .ph-dest-suggest__heading {
	padding: 8px 14px 4px;
	font-family: var(--serif);
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 1px;
	text-transform: uppercase;
	color: var(--ph-label-color);
}

.ph-search-root button.ph-dest-suggest__item {
	display: block;
	width: 100%;
	margin: 0;
	padding: 10px 14px;
	border: none !important;
	border-radius: 0;
	background: transparent !important;
	background-color: transparent !important;
	color: var(--ph-grey) !important;
	font-family: var(--sans);
	font-size: 0.92rem;
	font-weight: 400;
	line-height: 1.3;
	text-align: left;
	text-transform: none;
	letter-spacing: 0;
	cursor: pointer;
	appearance: none;
	-webkit-appearance: none;
	box-shadow: none;
}

.ph-search-root button.ph-dest-suggest__item--place {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
}

.ph-search-root .ph-dest-suggest__place-label {
	flex: 1 1 auto;
	min-width: 0;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.ph-search-root .ph-dest-suggest__link-icon {
	flex: 0 0 auto;
	width: 14px;
	height: 14px;
	color: #9a9a9a;
	opacity: 0.85;
}

.ph-search-root button.ph-dest-suggest__item:hover,
.ph-search-root button.ph-dest-suggest__item:focus {
	background: rgba(128, 132, 99, 0.12) !important;
	background-color: rgba(128, 132, 99, 0.12) !important;
	color: var(--ph-grey) !important;
	outline: none;
}

.ph-search-root button.ph-dest-suggest__item--place:hover .ph-dest-suggest__link-icon,
.ph-search-root button.ph-dest-suggest__item--place:focus .ph-dest-suggest__link-icon {
	color: var(--ph-grey);
	opacity: 1;
}

.ph-search-root .ph-tags[hidden] {
	display: none !important;
}

.ph-search-root button.ph-btn:disabled,
.ph-search-root button.ph-btn[disabled],
.ph-search-root .ph-btn[type="submit"]:disabled {
	background: #b8b8b8 !important;
	background-color: #b8b8b8 !important;
	color: #ffffff !important;
	cursor: not-allowed;
	opacity: 1;
	pointer-events: none;
}

.ph-search-root button.ph-btn:disabled:hover,
.ph-search-root button.ph-btn[disabled]:hover,
.ph-search-root .ph-btn[type="submit"]:disabled:hover {
	background: #b8b8b8 !important;
	background-color: #b8b8b8 !important;
}

/* ===== Expanded ===== */
.ph-search-root .ph-expanded {
	display: none;
	background: transparent;
	flex: 1 1 auto;
	min-height: 0;
	overflow-x: hidden;
	overflow-y: auto;
	-webkit-overflow-scrolling: touch;
	margin-top: 4px;
	/* Top padding so first-row Hot List badges aren’t clipped by the scrollport. */
	padding-top: 8px;
	padding-bottom: 8px;
	scrollbar-width: none; /* Firefox */
	-ms-overflow-style: none; /* IE/Edge */
}

.ph-search-root .ph-expanded::-webkit-scrollbar {
	display: none; /* Chrome/Safari */
}

.ph-search-root .ph-expanded.is-visible {
	display: block;
	background: transparent;
}

.ph-search-root .ph-tags {
	display: flex;
	flex-wrap: nowrap;
	gap: 12px;
	justify-content: flex-start;
	align-items: stretch;
	width: 100%;
	max-width: 100%;
	margin: 18px 0 4px;
	overflow-x: auto;
	overflow-y: hidden;
	-webkit-overflow-scrolling: touch;
	scrollbar-width: none;
	-ms-overflow-style: none;
	/* Extra end pad so the last pill can sit fully in view when scrolled. */
	padding-bottom: 2px;
	scroll-padding-inline: 0;
}

.ph-search-root .ph-tags::-webkit-scrollbar {
	display: none;
}

.ph-tags:empty {
	display: none;
}

.ph-search-root button.ph-tag {
	font-family: var(--sans);
	font-size: 0.9rem;
	font-weight: 500;
	line-height: 1;
	letter-spacing: 0;
	text-transform: none;
	flex: 0 0 auto;
	width: auto;
	max-width: none;
	padding: 9px 18px;
	border-radius: 6px;
	overflow: visible;
	text-overflow: clip;
	white-space: nowrap;
	background: var(--ph-white) !important;
	background-color: var(--ph-white) !important;
	color: var(--ph-grey) !important;
	border: 1px solid rgba(81, 81, 81, 0.18) !important;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
	cursor: pointer;
	appearance: none;
	-webkit-appearance: none;
	transition: background 0.2s, color 0.2s, border-color 0.2s, box-shadow 0.2s;
}

.ph-search-root button.ph-tag:hover,
.ph-search-root button.ph-tag.is-active {
	background: var(--ph-green) !important;
	background-color: var(--ph-green) !important;
	color: var(--ph-white) !important;
	border-color: var(--ph-green) !important;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.16);
}

.ph-section {
	display: none;
}

.ph-section.is-visible {
	display: block;
}

.ph-search-root h3.ph-section-title {
	font-family: var(--serif);
	letter-spacing: 2px;
	text-transform: uppercase;
	font-size: 1rem;
	color: var(--ph-white);
	text-align: center;
	margin: 30px 0 18px;
}

.ph-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 18px;
	/* Room for Hot List badge overhang (top/left of exclusive cards). */
	padding-top: 16px;
	padding-left: 16px;
	overflow: visible;
}

.ph-search-root .ph-grid > * {
	min-width: 0;
	max-width: 100%;
	overflow: visible;
}

.ph-search-root .ph-grid[data-count="1"] {
	grid-template-columns: minmax(0, 1fr);
}

.ph-search-root .ph-grid[data-count="2"] {
	grid-template-columns: repeat(2, minmax(0, 1fr));
}

/* ===== Cards ===== */
.ph-search-root .ph-card-wrap {
	position: relative;
	min-width: 0;
	max-width: 100%;
	width: 100%;
}

.ph-search-root a.ph-card {
	position: relative;
	overflow: visible;
	background: #fff;
	border-radius: var(--radius);
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
	padding: 6px;
	display: flex;
	gap: 12px;
	align-items: center;
	text-align: left;
	text-decoration: none !important;
	color: inherit !important;
	min-width: 0;
	width: 100%;
	max-width: 100%;
	box-sizing: border-box;
	transition: transform 0.15s ease;
}

.ph-search-root a.ph-card:hover,
.ph-search-root a.ph-card:visited,
.ph-search-root a.ph-card:focus {
	text-decoration: none !important;
	color: inherit !important;
}

.ph-search-root a.ph-card:hover {
	transform: translateY(-2px);
}

img.ph-card__img {
	flex: 0 0 92px;
	width: 92px;
	height: 82px;
	border-radius: 6px;
	object-fit: cover;
	background: #d8d6d2;
	display: block;
}

.ph-card__body {
	flex: 1;
	min-width: 0;
}

.ph-card__meta {
	display: flex;
	gap: 12px;
	color: var(--ph-grey);
	font-size: 0.72rem;
	margin-bottom: 6px;
	flex-wrap: wrap;
}

.ph-card__meta span {
	display: inline-flex;
	align-items: center;
	gap: 4px;
}

.ph-card__meta svg,
.ph-card__meta-icon {
	width: 14px;
	height: 14px;
	flex-shrink: 0;
	object-fit: contain;
	display: inline-block;
	vertical-align: middle;
}

.ph-card__meta svg {
	stroke: var(--ph-grey);
}

.ph-search-root .ph-card__name {
	font-family: var(--serif);
	font-size: 1.02rem;
	color: #2b2b2b !important;
	margin: 0 0 4px;
	line-height: 1.2;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.ph-search-root .ph-card__loc {
	font-size: 0.68rem;
	color: var(--ph-grey-soft) !important;
	line-height: 1.35;
	margin: 0;
}

.ph-search-root a.ph-card__badge {
	position: absolute;
	top: -14px;
	left: -14px;
	z-index: 3;
	width: 56px;
	height: 56px;
	padding: 0;
	margin: 0;
	border: none !important;
	border-radius: 0;
	background: transparent !important;
	box-shadow: none;
	display: block;
	line-height: 0;
	text-decoration: none !important;
}

.ph-search-root a.ph-card__badge img {
	width: 56px;
	height: 56px;
	display: block;
	object-fit: contain;
}

.ph-search-root span.ph-card__badge {
	position: absolute;
	top: -9px;
	left: -9px;
	z-index: 2;
	width: 38px;
	height: 38px;
	border-radius: 50%;
	background: #fff;
	border: 1px solid var(--ph-outline);
	display: flex;
	align-items: center;
	justify-content: center;
	font-family: var(--serif);
	font-size: 0.5rem;
	font-weight: 600;
	text-align: center;
	line-height: 1.05;
	color: var(--ph-grey);
	text-transform: uppercase;
	box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
	pointer-events: none;
}

.ph-more-sentinel {
	width: 100%;
	height: 1px;
	margin: 0;
	padding: 0;
	border: 0;
	pointer-events: none;
	visibility: hidden;
}

.ph-more-sentinel[hidden] {
	display: none !important;
}

.ph-status {
	margin: 16px 0 0;
	font-size: 0.9rem;
	color: rgba(255, 255, 255, 0.85);
	text-align: center;
}

.ph-search-root.ph-search--error {
	padding: 1rem;
	border: 1px solid #c0392b;
	background: #fdf2f1;
	color: #c0392b;
	border-radius: var(--radius);
}

/* ===== Fluid desktop height (phones keep ≤560px rules) ===== */
@media (min-width: 561px) {
	.ph-search-root .ph-overlay {
		/* Sit higher on short laptops; keep ~130px on tall screens for site header. */
		padding: clamp(56px, 10vh, 130px) 24px 40px;
	}

	.ph-search-root .ph-modal {
		max-height: calc(100vh - clamp(72px, 12vh, 170px));
		max-height: calc(100dvh - clamp(72px, 12vh, 170px));
	}

	.ph-search-root button.ph-close {
		top: clamp(12px, 3vh, 44px);
	}

	.ph-search-root h2.ph-modal__title {
		font-size: clamp(1.45rem, 3.2vh, 2.35rem);
		margin: 0 0 clamp(6px, 1.2vh, 14px);
	}

	.ph-search-root .ph-modal__sub {
		font-size: clamp(0.88rem, 1.8vh, 1.05rem);
		margin: 0 0 clamp(10px, 2.2vh, 26px);
	}

	.ph-search-root h3.ph-section-title {
		margin: clamp(12px, 2.5vh, 30px) 0 clamp(10px, 1.8vh, 18px);
	}
}

/* ===== Responsive: tablet ===== */
@media (max-width: 820px) {
	.ph-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.ph-search-root .ph-grid[data-count="1"] {
		grid-template-columns: 1fr;
	}

	.ph-search-root button.ph-close {
		right: 0;
		top: -46px;
	}
}

/* ===== Responsive: mobile ===== */
@media (max-width: 560px) {
	.ph-search-root .ph-overlay {
		padding: 12px 14px 20px;
		overflow-x: hidden;
		overflow-y: auto;
		-webkit-overflow-scrolling: touch;
		min-height: 100vh;
		min-height: 100dvh;
		align-items: flex-start;
	}

	.ph-search-root .ph-modal {
		max-height: none;
	}

	.ph-search-root .ph-expanded {
		overflow: visible;
		flex: none;
	}

	.ph-search-root h2.ph-modal__title {
		font-size: 1.55rem;
	}

	.ph-search-root .ph-modal__sub {
		font-size: 0.92rem;
		margin-bottom: 20px;
	}

	.ph-search-root .ph-searchcard {
		padding: var(--ph-bar-padding);
		border-radius: 24px;
	}

	.ph-form {
		flex-direction: column;
		align-items: stretch;
		gap: 12px;
	}

	.ph-field--dest {
		padding-right: 0;
	}

	.ph-field--guests {
		flex: 1 1 auto;
		border-left: none;
		border-top: 1px solid var(--ph-divider);
		padding: 12px 0 0;
	}

	.ph-search-root button.ph-btn {
		width: 100%;
		padding: 14px;
	}

	.ph-grid,
	.ph-search-root .ph-grid[data-count="1"],
	.ph-search-root .ph-grid[data-count="2"] {
		grid-template-columns: 1fr;
	}

	.ph-search-root button.ph-close {
		position: sticky;
		top: 8px;
		right: auto;
		align-self: flex-end;
		width: 44px;
		height: 44px;
		margin: 0 0 10px auto;
		z-index: 40;
		flex-shrink: 0;
	}

	/*
	 * Full-bleed pill row: wider scrollport than the modal column so more of
	 * the next pill stays on-screen (swipe cue). Compact padding frees space too.
	 */
	.ph-search-root .ph-tags {
		gap: 6px;
		width: 100vw;
		max-width: 100vw;
		margin-left: calc(50% - 50vw);
		margin-right: calc(50% - 50vw);
		padding-left: 14px;
		padding-right: 0;
		box-sizing: border-box;
	}

	.ph-search-root .ph-tags::after {
		content: '';
		flex: 0 0 14px;
	}

	.ph-search-root button.ph-tag {
		padding: 8px 10px;
		font-size: 0.8rem;
	}
}
