/**
 * WAAD branded custom selects (replaces native OS dropdown chrome).
 */

.waad-select {
	--waad-select-navy: #14284b;
	--waad-select-text: #1e2a3b;
	--waad-select-muted: #2f3642;
	--waad-select-gold: #94703a;
	--waad-select-gold-soft: rgba(148, 112, 58, 0.14);
	--waad-select-gold-line: rgba(148, 112, 58, 0.45);
	--waad-select-line: #ece7dd;
	--waad-select-soft: #f7f4ee;
	--waad-select-radius: 14px;
	position: relative;
	display: block;
	min-width: 0;
	font-family: "Poppins", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.waad-select__native {
	position: absolute !important;
	width: 1px !important;
	height: 1px !important;
	padding: 0 !important;
	margin: -1px !important;
	overflow: hidden !important;
	clip: rect(0, 0, 0, 0) !important;
	white-space: nowrap !important;
	border: 0 !important;
	opacity: 0 !important;
	pointer-events: none !important;
}

.waad-select__trigger {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	width: 100%;
	min-height: 48px;
	margin: 0;
	padding: 10px 40px 10px 14px;
	border: 1px solid var(--waad-select-line);
	border-radius: var(--waad-select-radius);
	background: #ffffff;
	box-shadow: none;
	font: inherit;
	font-size: 14px;
	font-weight: 500;
	line-height: 1.35;
	color: var(--waad-select-text);
	text-align: start;
	cursor: pointer;
	transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.waad-select__trigger:hover {
	background: var(--waad-select-soft);
	border-color: #e2d9c8;
}

.waad-select.is-open .waad-select__trigger,
.waad-select__trigger:focus-visible {
	outline: 0;
	border-color: var(--waad-select-gold);
	box-shadow: 0 0 0 3px var(--waad-select-gold-soft);
}

.waad-select.is-empty .waad-select__trigger {
	font-weight: 400;
	color: var(--waad-select-muted);
}

.waad-select__value {
	display: block;
	min-width: 0;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.waad-select__chevron {
	position: absolute;
	top: 50%;
	inset-inline-end: 12px;
	width: 16px;
	height: 16px;
	margin-top: -8px;
	color: var(--waad-select-gold);
	pointer-events: none;
	transition: transform 0.2s ease;
}

.waad-select.is-open .waad-select__chevron {
	transform: rotate(180deg);
}

.waad-select__chevron svg {
	display: block;
	width: 16px;
	height: 16px;
}

.waad-select__menu {
	position: absolute;
	top: calc(100% + 8px);
	left: 0;
	z-index: 80;
	min-width: 100%;
	max-width: min(360px, 92vw);
	max-height: min(280px, 45vh);
	margin: 0;
	padding: 8px;
	overflow: auto;
	list-style: none;
	border: 1px solid var(--waad-select-line);
	border-radius: 16px;
	background: #ffffff;
	box-shadow:
		0 22px 48px -24px rgba(20, 40, 75, 0.35),
		0 8px 20px -12px rgba(20, 40, 75, 0.16);
	opacity: 0;
	transform: translateY(8px);
	pointer-events: none;
	visibility: hidden;
	transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s ease;
}

.waad-select.is-open .waad-select__menu {
	opacity: 1;
	transform: translateY(0);
	pointer-events: auto;
	visibility: visible;
}

.waad-select.is-drop-up .waad-select__menu {
	top: auto;
	bottom: calc(100% + 8px);
	transform: translateY(-8px);
}

.waad-select.is-open.is-drop-up .waad-select__menu {
	transform: translateY(0);
}

.waad-select__option {
	display: block;
	width: 100%;
	margin: 0;
	padding: 11px 14px;
	border: 0;
	border-radius: 10px;
	background: transparent;
	font: inherit;
	font-size: 14px;
	font-weight: 400;
	line-height: 1.35;
	color: var(--waad-select-text);
	text-align: start;
	cursor: pointer;
	transition: background-color 0.15s ease, color 0.15s ease;
}

.waad-select__option:hover,
.waad-select__option.is-active {
	background: var(--waad-select-soft);
	color: var(--waad-select-navy);
}

.waad-select__option.is-selected {
	background: var(--waad-select-gold-soft);
	color: var(--waad-select-gold);
	font-weight: 600;
}

.waad-select__option.is-selected:hover,
.waad-select__option.is-selected.is-active {
	background: rgba(148, 112, 58, 0.2);
}

.waad-select__option:disabled,
.waad-select__option[aria-disabled="true"] {
	opacity: 0.45;
	cursor: not-allowed;
}

/* Hero / packages search fields: fill the existing field chrome. */
.waad-select--field {
	position: absolute;
	inset: 0;
	z-index: 2;
}

.waad-select--field .waad-select__trigger {
	position: absolute;
	inset: 0;
	min-height: 0;
	padding: 28px 30px 0 60px;
	border: 0;
	border-radius: 14px;
	background: transparent;
	box-shadow: none;
	font-size: 14px;
	font-weight: 400;
	color: var(--waad-select-muted);
}

.waad-select--field.is-empty .waad-select__trigger {
	font-weight: 400;
	color: var(--waad-select-muted);
}

.waad-select--field:not(.is-empty) .waad-select__trigger {
	font-weight: 500;
	color: var(--waad-select-text);
}

.waad-select--field .waad-select__trigger:hover,
.waad-select--field.is-open .waad-select__trigger,
.waad-select--field .waad-select__trigger:focus-visible {
	background: transparent;
	border-color: transparent;
	box-shadow: none;
}

.waad-select--field .waad-select__chevron {
	display: none;
}

.waad-select--field .waad-select__menu {
	left: 0;
	right: 0;
	width: 100%;
	min-width: 100%;
	max-width: none;
	z-index: 120;
}

/* Keep menus visible above the floating search chrome. */
.waad-hero .waad-hero-search,
.waad-pkg .waad-pkg-search,
.waad-search .waad-search-form {
	overflow: visible;
}

.waad-hero .waad-hero-field,
.waad-pkg .waad-pkg-search__field,
.waad-search .waad-pkg-search__field {
	overflow: visible;
}

.waad-hero .waad-hero-field:has(.waad-select.is-open),
.waad-pkg .waad-pkg-search__field:has(.waad-select.is-open),
.waad-search .waad-pkg-search__field:has(.waad-select.is-open) {
	z-index: 40;
}

.waad-hero .waad-hero-field:has(.waad-select.is-open),
.waad-pkg .waad-pkg-search__field:has(.waad-select.is-open) {
	background: var(--waad-select-soft);
	box-shadow: inset 0 0 0 2px var(--waad-select-gold-line);
}

.waad-hero .waad-hero-field:focus-within {
	box-shadow: inset 0 0 0 2px var(--waad-select-gold-line);
}

.waad-pkg .waad-pkg-search__field:focus-within {
	box-shadow: inset 0 0 0 2px var(--waad-select-gold-line);
}

@media (prefers-reduced-motion: reduce) {
	.waad-select__menu,
	.waad-select__trigger,
	.waad-select__chevron,
	.waad-select__option {
		transition: none;
	}

	.waad-select__menu,
	.waad-select.is-drop-up .waad-select__menu {
		transform: none;
	}
}
