/* =========================================================================
   WS Trip Search
   Tokens first — override these in Avada's Global CSS to retheme.
   ====================================================================== */

.ws-ts {
	--ws-brand:      #b3121b;   /* Button block + selected states */
	--ws-brand-dark: #8d0d15;
	--ws-ink:        #1c1c1c;   /* Chosen values, option labels */
	--ws-label:      #4f4f4f;   /* WHERE / WHEN / WHAT / WHO */
	--ws-line:       #e4e4e4;   /* Field dividers, checkbox outline */
	--ws-hover:      #f5f5f5;
	--ws-surface:    #ffffff;
	--ws-frame:      4px;       /* Red edge around the white fields */
	--ws-pop-radius: 12px;
	--ws-shadow:     0 14px 40px rgba(0, 0, 0, .22);

	position: relative;
	width: 100%;
	max-width: 1240px;
	margin: 0 auto;
	color: var(--ws-ink);
	text-align: left;
}


.ws-ts *,
.ws-ts *::before,
.ws-ts *::after {
	box-sizing: border-box;
}

/* -------------------------------------------------------------------------
   Bar
   ---------------------------------------------------------------------- */

.ws-ts__bar {
	display: flex;
	align-items: stretch;
	background: var(--ws-brand);
	padding: var(--ws-frame);
	box-shadow: 0 6px 22px rgba(0, 0, 0, .18);
}

.ws-ts__fields {
	flex: 1 1 auto;
	display: flex;
	align-items: stretch;
	min-width: 0;
	background: var(--ws-surface);
}

.ws-ts__field {
	position: relative;
	flex: 1 1 0;
	min-width: 0;
	border-right: 1px solid var(--ws-line);
}

.ws-ts__field:last-child {
	border-right: 0;
}

/* The whole field is the button */
.ws-ts__trigger {
	display: block;
	width: 100%;
	height: 100%;
	margin: 0;
	padding: 18px 26px 19px;
	border: 0;
	background: transparent;
	font: inherit;
	text-align: left;
	cursor: pointer;
	transition: background-color .16s ease;
}

.ws-ts__trigger:hover,
.ws-ts__field.is-open .ws-ts__trigger {
	background: var(--ws-hover);
}

.ws-ts__trigger:disabled {
	cursor: default;
	opacity: .5;
}

.ws-ts__trigger:focus-visible {
	outline: 2px solid var(--ws-brand);
	outline-offset: -3px;
}

.ws-ts__label {
	display: block;
	font-size: 11px;
	font-weight: 600;
	line-height: 1;
	letter-spacing: .16em;
	text-transform: uppercase;
	color: var(--ws-label);
	margin-bottom: 9px;
}

.ws-ts__value {
	display: block;
	font-size: 16px;
	font-weight: 500;
	line-height: 1.25;
	color: var(--ws-ink);
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.ws-ts__value.is-placeholder {
	font-weight: 400;
	color: var(--ws-muted);
}

/* Submit sits inside the red frame, so it reads as one block */
.ws-ts__submit {
	flex: 0 0 auto;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 11px;
	min-width: 235px;
	padding: 0 34px;
	border: 0;
	background: transparent;
	color: #fff;
	font: inherit;
	font-size: 14px;
	font-weight: 600;
	letter-spacing: .14em;
	text-transform: uppercase;
	cursor: pointer;
	transition: background-color .16s ease;
}

.ws-ts__submit:hover { background: var(--ws-brand-dark); }
.ws-ts__submit:focus-visible { outline: 2px solid #fff; outline-offset: -6px; }
.ws-ts__submiticon { width: 18px; height: 18px; flex: 0 0 auto; }

/* -------------------------------------------------------------------------
   Dropdown panels
   ---------------------------------------------------------------------- */

.ws-ts__pop {
	position: absolute;
	z-index: 80;
	top: calc(100% + var(--ws-frame) + 8px);
	left: 0;
	min-width: 100%;
	width: max-content;
	max-width: min(360px, 92vw);
	background: var(--ws-surface);
	border-radius: var(--ws-pop-radius);
	box-shadow: var(--ws-shadow);
	padding: 10px 8px;
}

.ws-ts__pop[hidden] { display: none; }

/* Keep the last dropdown on screen */
.ws-ts__field:last-child .ws-ts__pop {
	left: auto;
	right: 0;
}

.ws-ts__popsearch {
	padding: 4px 8px 10px;
}

.ws-ts__filter {
	width: 100%;
	padding: 10px 12px;
	border: 1px solid var(--ws-line);
	border-radius: 8px;
	font: inherit;
	font-size: 15px;
	color: var(--ws-ink);
	background: var(--ws-surface);
}

.ws-ts__filter:focus {
	outline: 0;
	border-color: var(--ws-brand);
}

/* Scroll affordances — only applied once JS confirms the list overflows,
   because macOS hides overlay scrollbars until you actually scroll. */
.ws-ts__scroller {
	position: relative;
}

.ws-ts__opts {
	list-style: none;
	margin: 0;
	padding: 0;
	max-height: 320px;
	overflow-y: auto;
	overscroll-behavior: contain;
}

.ws-ts__opts:focus-visible {
	outline: 2px solid var(--ws-brand);
	outline-offset: -2px;
	border-radius: 6px;
}

/* Fades at whichever edge still has content beyond it */
.ws-ts__scroller::before,
.ws-ts__scroller::after {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	height: 34px;
	z-index: 1;
	opacity: 0;
	pointer-events: none;
	transition: opacity .18s ease;
}

.ws-ts__scroller::before {
	top: 0;
	background: linear-gradient( to bottom, var(--ws-surface) 12%, rgba( 255, 255, 255, 0 ) );
}

.ws-ts__scroller::after {
	bottom: 0;
	background: linear-gradient(transparent, transparent 58%, rgb(162 16 24) 60%, var(--ws-surface) 62%);
}

.ws-ts__scroller.can-scroll-up::before,
.ws-ts__scroller.can-scroll-down::after { opacity: 1; }

/* Chevron nudge at the bottom edge */
.ws-ts__cue {
	position: absolute;
	left: 50%;
	bottom: 4px;
	z-index: 2;
	display: grid;
	place-items: center;
	width: 22px;
	height: 22px;
	margin-left: -11px;
	border-radius: 50%;
	background: var(--ws-surface);
	color: var(--ws-muted);
	box-shadow: 0 1px 5px rgba( 0, 0, 0, .16 );
	opacity: 0;
	pointer-events: none;
	transition: opacity .18s ease;
}

.ws-ts__cue svg { width: 12px; height: 12px; }

.ws-ts__scroller.can-scroll-down .ws-ts__cue {
	opacity: 1;
	animation: ws-ts-nudge 1.9s ease-in-out infinite;
}

@keyframes ws-ts-nudge {
	0%, 72%, 100% { transform: translateY( 0 ); }
	82%           { transform: translateY( 3px ); }
}

/* Keep a slim scrollbar visible instead of the macOS overlay one */
.ws-ts__scroller.is-scrollable .ws-ts__opts {
	scrollbar-width: thin;
	scrollbar-color: #c9c9c9 transparent;
}

.ws-ts__scroller.is-scrollable .ws-ts__opts::-webkit-scrollbar {
	width: 8px;
}

.ws-ts__scroller.is-scrollable .ws-ts__opts::-webkit-scrollbar-track {
	background: transparent;
}

.ws-ts__scroller.is-scrollable .ws-ts__opts::-webkit-scrollbar-thumb {
	background: #c9c9c9;
	border: 2px solid var(--ws-surface);
	border-radius: 999px;
}

.ws-ts__scroller.is-scrollable .ws-ts__opts::-webkit-scrollbar-thumb:hover {
	background: #a8a8a8;
}

.ws-ts__optrow { margin: 0; }
.ws-ts__optrow[hidden] { display: none; }

.ws-ts__opt {
	display: flex;
	align-items: center;
	gap: 14px;
	padding: 11px 14px;
	margin: 0;
	border-radius: 8px;
	cursor: pointer;
	transition: background-color .14s ease;
}

.ws-ts__opt:hover { background: var(--ws-hover); }

/* Native input stays in the DOM for keyboard and form submission */
.ws-ts__opt input {
	position: absolute;
	width: 1px;
	height: 1px;
	opacity: 0;
	pointer-events: none;
}

.ws-ts__box {
	flex: 0 0 auto;
	display: grid;
	place-items: center;
	width: 22px;
	height: 22px;
	border: 1.5px solid #b9b9b9;
	border-radius: 4px;
	color: transparent;
	transition: background-color .14s ease, border-color .14s ease, color .14s ease;
}

.ws-ts__box svg { width: 13px; height: 13px; }

.ws-ts__opt input:checked + .ws-ts__box {
	background: var(--ws-brand);
	border-color: var(--ws-brand);
	color: #fff;
}

.ws-ts__opt input:focus-visible + .ws-ts__box {
	outline: 2px solid var(--ws-brand);
	outline-offset: 2px;
}

.ws-ts__optname {
	flex: 1 1 auto;
	font-size: 16px;
	line-height: 1.35;
	color: var(--ws-ink);
}

.ws-ts__hint {
	flex: 0 0 auto;
	display: grid;
	place-items: center;
	width: 17px;
	height: 17px;
	border: 1px solid #b9b9b9;
	border-radius: 50%;
	font-size: 11px;
	font-weight: 600;
	line-height: 1;
	color: #8a8a8a;
	cursor: help;
}

.ws-ts__noresults {
	margin: 0;
	padding: 14px;
	font-size: 15px;
	color: var(--ws-muted);
}

/* -------------------------------------------------------------------------
   Calendar
   ---------------------------------------------------------------------- */

.ws-ts__pop--cal {
	width: min(720px, 92vw);
	max-width: min(720px, 92vw);
	padding: 22px 18px 14px;
}

.ws-ts__modes {
	display: flex;
	gap: 4px;
	width: fit-content;
	margin: 0 auto 20px;
	padding: 4px;
	background: #f1f1f1;
	border-radius: 999px;
}

.ws-ts__mode {
	border: 0;
	border-radius: 999px;
	padding: 10px 24px;
	background: transparent;
	font: inherit;
	font-size: 14px;
	font-weight: 600;
	letter-spacing: .04em;
	color: var(--ws-muted);
	cursor: pointer;
	transition: background-color .16s ease, color .16s ease;
}

.ws-ts__mode.is-active {
	background: var(--ws-surface);
	color: var(--ws-ink);
	box-shadow: 0 1px 5px rgba(0, 0, 0, .14);
}

.ws-ts__cal {
	display: flex;
	align-items: center;
	gap: 8px;
}

.ws-ts__nav {
	flex: 0 0 auto;
	width: 36px;
	height: 36px;
	display: grid;
	place-items: center;
	border: 1px solid var(--ws-line);
	border-radius: 50%;
	background: var(--ws-surface);
	color: var(--ws-ink);
	cursor: pointer;
	transition: background-color .16s ease, opacity .16s ease;
}

.ws-ts__nav svg { width: 16px; height: 16px; }
.ws-ts__nav:hover:not(:disabled) { background: var(--ws-hover); }
.ws-ts__nav:disabled { opacity: .3; cursor: default; }

.ws-ts__grids {
	flex: 1 1 auto;
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 28px;
	min-width: 0;
}

.ws-ts__month-title {
	margin: 0 0 12px;
	text-align: center;
	font-size: 16px;
	font-weight: 700;
	color: var(--ws-ink);
}

.ws-ts__dow,
.ws-ts__days {
	display: grid;
	grid-template-columns: repeat(7, 1fr);
	gap: 2px;
}

.ws-ts__dow span {
	padding-bottom: 6px;
	text-align: center;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: .06em;
	text-transform: uppercase;
	color: var(--ws-muted);
}

.ws-ts__day {
	aspect-ratio: 1 / 1;
	display: grid;
	place-items: center;
	border: 0;
	border-radius: 50%;
	background: transparent;
	font: inherit;
	font-size: 15px;
	font-weight: 500;
	color: var(--ws-ink);
	cursor: pointer;
	transition: background-color .14s ease, color .14s ease;
}

.ws-ts__day:hover:not(:disabled) { background: var(--ws-hover); }
.ws-ts__day:disabled { color: #cfcfcf; cursor: default; }
.ws-ts__day.is-empty { visibility: hidden; }

.ws-ts__day.is-selected,
.ws-ts__monthbtn.is-selected {
	background: var(--ws-brand);
	border-color: var(--ws-brand);
	color: #fff;
}

.ws-ts__months {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 6px;
}

.ws-ts__monthbtn {
	padding: 12px 4px;
	border: 1px solid var(--ws-line);
	border-radius: 8px;
	background: transparent;
	font: inherit;
	font-size: 14px;
	font-weight: 500;
	color: var(--ws-ink);
	cursor: pointer;
	transition: background-color .14s ease, color .14s ease;
}

.ws-ts__monthbtn:hover:not(:disabled) { background: var(--ws-hover); }
.ws-ts__monthbtn:disabled { color: #cfcfcf; cursor: default; }

.ws-ts__panelfoot {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin-top: 18px;
	padding-top: 14px;
	border-top: 1px solid var(--ws-line);
}

.ws-ts__clear {
	padding: 6px 2px;
	border: 0;
	background: none;
	font: inherit;
	font-size: 14px;
	font-weight: 600;
	color: var(--ws-ink);
	text-decoration: underline;
	text-underline-offset: 3px;
	cursor: pointer;
}

.ws-ts__done {
	padding: 11px 28px;
	border: 0;
	background: var(--ws-brand);
	color: #fff;
	font: inherit;
	font-size: 13px;
	font-weight: 600;
	letter-spacing: .12em;
	text-transform: uppercase;
	cursor: pointer;
}

.ws-ts__done:hover { background: var(--ws-brand-dark); }

/* -------------------------------------------------------------------------
   Responsive
   ---------------------------------------------------------------------- */

@media (max-width: 1100px) {
	.ws-ts__submit { min-width: 0; padding: 0 24px; }
	.ws-ts__trigger { padding: 16px 18px 17px; }
}

@media (max-width: 900px) {
	.ws-ts__bar { flex-wrap: wrap; }
	.ws-ts__fields { flex: 1 1 100%; flex-wrap: wrap; }

	.ws-ts__field {
		flex: 1 1 50%;
		border-bottom: 1px solid var(--ws-line);
	}

	.ws-ts__field:nth-child(2n) { border-right: 0; }
	.ws-ts__field:nth-last-child(-n+2) { border-bottom: 0; }

	.ws-ts__submit {
		flex: 1 1 100%;
		padding: 18px 24px;
		margin-top: var(--ws-frame);
	}

	.ws-ts__pop,
	.ws-ts__field:last-child .ws-ts__pop {
		left: 0;
		right: auto;
		max-width: 92vw;
	}
	.ws-ts__pop.ws-ts__pop--cal{
		left: -28px;
	}

	.ws-ts__grids { grid-template-columns: 1fr; }
	.ws-ts__grids > :nth-child(2) { display: none; }
}

@media (max-width: 560px) {
	.ws-ts__field { flex: 1 1 100%; border-right: 0; }
	.ws-ts__field:nth-last-child(-n+2) { border-bottom: 1px solid var(--ws-line); }
	.ws-ts__field:last-child { border-bottom: 0; }
	.ws-ts__mode { padding: 9px 16px; font-size: 13px; }
	.ws-ts__months { grid-template-columns: repeat(2, 1fr); }
	.ws-ts__panelfoot { flex-direction: column-reverse; align-items: stretch; }
}

@media (prefers-reduced-motion: reduce) {
	.ws-ts *,
	.ws-ts *::before,
	.ws-ts *::after {
		transition-duration: .01ms !important;
	}

	.ws-ts__scroller.can-scroll-down .ws-ts__cue { animation: none; }
}

/* =========================================================================
   Active filter chips — [ws_trip_filters]
   ====================================================================== */

.ws-tsf {
	--ws-brand:  #b3121b;
	--ws-ink:    #1c1c1c;
	--ws-muted:  #7d7d7d;
	--ws-line:   #e4e4e4;
	--ws-hover:  #f5f5f5;

	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 10px 14px;
	margin: 0 0 26px;
	color: var(--ws-ink);
}

.ws-tsf__count {
	margin: 0;
	font-size: 13px;
	font-weight: 600;
	letter-spacing: .14em;
	text-transform: uppercase;
	color: var(--ws-muted);
}

.ws-tsf__chips {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	list-style: none;
	margin: 0;
	padding: 0;
}

.ws-tsf__chips li { margin: 0; }

.ws-tsf__chip {
	display: inline-flex;
	align-items: center;
	gap: 9px;
	padding: 8px 14px;
	border: 1px solid var(--ws-line);
	border-radius: 999px;
	background: #fff;
	font-size: 14px;
	font-weight: 500;
	line-height: 1.2;
	color: var(--ws-ink);
	text-decoration: none;
	transition: border-color .16s ease, background-color .16s ease, color .16s ease;
}

.ws-tsf__chip svg {
	width: 12px;
	height: 12px;
	flex: 0 0 auto;
	color: var(--ws-muted);
	transition: color .16s ease;
}

.ws-tsf__chip:hover,
.ws-tsf__chip:focus-visible {
	border-color: var(--ws-brand);
	background: var(--ws-brand);
	color: #fff;
	text-decoration: none;
}

.ws-tsf__chip:hover svg,
.ws-tsf__chip:focus-visible svg { color: #fff; }

.ws-tsf__clear {
	font-size: 14px;
	font-weight: 600;
	color: var(--ws-ink);
	text-decoration: underline;
	text-underline-offset: 3px;
}

.ws-tsf__clear:hover { color: var(--ws-brand); }
