/**
 * Tour listing sort dropdown (shortcode UI).
 */

.tour-sort {
	--tour-sort-text: #1d2327;
	--tour-sort-muted: #646970;
	--tour-sort-border: #dcdcde;
	position: relative;
	display: inline-block;
	font-family: inherit;
	font-size: 15px;
	line-height: 1.45;
	color: var(--tour-sort-text);
}

/* Trigger: same treatment as .tour-price-filter__clear (primary + underline) */
.tour-sort__trigger {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	margin: 0;
	padding: 0 !important;
	border: 0;
	border-radius: 0;
	background: none;
	box-shadow: none;
	font: inherit;
	font-size: 14px;
	font-weight: 400;
	line-height: inherit;
	color: var(--e-color-primary, #1e4d40);
	text-decoration: underline !important;
	text-decoration-line: underline;
	text-underline-offset: 3px;
	text-decoration-thickness: 1px;
	cursor: pointer;
	text-align: left;
	user-select: none;
}

.tour-sort__trigger:hover,
.tour-sort__trigger:focus-visible {
	color: #163d33;
	color: color-mix(in srgb, var(--e-color-primary, #1e4d40) 78%, #000);
	text-decoration: underline !important;
	text-decoration-line: underline;
}

.tour-sort__trigger:focus-visible {
	outline: 2px solid var(--e-color-primary, #1e4d40);
	outline-offset: 2px;
}

.tour-sort__trigger-text {
	pointer-events: none;
}

.tour-sort__chevron {
	flex-shrink: 0;
	width: 8px;
	height: 8px;
	border-right: 2px solid currentColor;
	border-bottom: 2px solid currentColor;
	transform: rotate(45deg);
	margin-top: -4px;
	transition: transform 0.2s ease;
	pointer-events: none;
}

.tour-sort.is-open .tour-sort__chevron {
	transform: rotate(225deg);
	margin-top: 0;
}

.tour-sort__dropdown {
	position: absolute;
	top: 100%;
	right: 0;
	z-index: 100;
	min-width: 240px;
	margin: 10px 0 0;
	padding: 16px 18px 14px;
	background: #fff;
	border: 1px solid var(--tour-sort-border);
	border-radius: 14px;
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
	opacity: 0;
	visibility: hidden;
	transform: translateY(-6px);
	transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s;
}

.tour-sort.is-open .tour-sort__dropdown {
	opacity: 1;
	visibility: visible;
	transform: translateY(0);
}

.tour-sort__fieldset {
	margin: 0;
	padding: 0;
	border: 0;
	min-width: 0;
}

.tour-sort__legend {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

.tour-sort__group {
	margin: 0 0 14px;
}

.tour-sort__group:last-child {
	margin-bottom: 0;
}

.tour-sort__group-label {
	display: block;
	margin: 0 0 8px;
	font-size: 12px;
	font-weight: 600;
	color: var(--tour-sort-muted);
	text-transform: capitalize;
	letter-spacing: 0.02em;
}

.tour-sort__option {
	display: flex;
	align-items: center;
	gap: 12px;
	margin: 0 0 10px;
	cursor: pointer;
	font-size: 14px;
	font-weight: 500;
	color: var(--tour-sort-text);
}

.tour-sort__option:last-child {
	margin-bottom: 0;
}

.tour-sort__radio {
	flex-shrink: 0;
	width: 18px;
	height: 18px;
	margin: 0;
	border: 2px solid #c3c4c7;
	border-radius: 50%;
	background: #fff;
	cursor: pointer;
	appearance: none;
	-webkit-appearance: none;
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.tour-sort__radio:hover {
	border-color: #6d9084;
	border-color: color-mix(in srgb, var(--e-color-primary, #1e4d40) 45%, #8c8f94);
}

.tour-sort__radio:focus {
	outline: 2px solid var(--e-color-primary, #1e4d40);
	outline-offset: 2px;
}

.tour-sort__radio:checked {
	border-color: var(--e-color-primary, #1e4d40);
	box-shadow: inset 0 0 0 4px #fff;
	background: var(--e-color-primary, #1e4d40);
}

.tour-sort__option-text {
	flex: 1;
	min-width: 0;
	user-select: none;
}
