/* ==========================================================================
   Trip Filter Bar Widget — Stylesheet
   ========================================================================== */

.abx-tfb-wrapper {
	width: 100%;
	font-family: inherit;
	box-sizing: border-box;
}

.abx-tfb-wrapper *,
.abx-tfb-wrapper *::before,
.abx-tfb-wrapper *::after {
	box-sizing: border-box;
}

/* ---------- Main Filter Bar Row ---------- */
.abx-tfb-bar {
	display: flex;
	align-items: center;
	gap: 12px;
	width: 100%;
	margin-bottom: 20px;
}

/* Left controls group */
.abx-tfb-left-group {
	display: flex;
	align-items: center;
	gap: 10px;
	flex-shrink: 0;
	position: relative;
}

/* Vertical divider line */
.abx-tfb-divider {
	width: 1px;
	height: 28px;
	background-color: #e2e8f0;
	margin: 0 6px;
	flex-shrink: 0;
}

/* Scrollable Right Pills Wrap */
.abx-tfb-pills-wrap {
	display: flex;
	align-items: center;
	gap: 8px;
	flex: 1;
	overflow-x: auto;
	scrollbar-width: none;
	-ms-overflow-style: none;
	padding-bottom: 2px;
}

.abx-tfb-pills-wrap::-webkit-scrollbar {
	display: none;
}

/* ---------- Base Pill Button Style ---------- */
.abx-tfb-pill {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	height: 40px;
	padding: 0 20px;
	border-radius: 999px;
	border: 1px solid #e2e8f0;
	background-color: #ffffff;
	color: #1a202c;
	font-size: 14px;
	font-weight: 500;
	line-height: 1;
	cursor: pointer;
	white-space: nowrap;
	text-decoration: none;
	outline: none;
	transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
	position: relative;
}

.abx-tfb-pill:hover {
	border-color: #cbd5e0;
	background-color: #f8fafc;
	color: #0f172a;
}

.abx-tfb-pill:focus-visible {
	outline: none;
	box-shadow: 0 0 0 2px rgba(11, 60, 51, 0.2);
}

/* ---------- Active Pill State (Dark Green default) ---------- */
.abx-tfb-pill.abx-tfb-pill--active {
	background-color: #0b3c33;
	color: #ffffff;
	border-color: #0b3c33;
}

.abx-tfb-pill.abx-tfb-pill--active:hover {
	background-color: #082d26;
	color: #ffffff;
	border-color: #082d26;
}

/* Icon inside pill */
.abx-tfb-pill-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-size: 15px;
	line-height: 1;
}

.abx-tfb-pill-icon svg {
	width: 16px;
	height: 16px;
	fill: currentColor;
	stroke: currentColor;
}

/* Arrow dropdown indicator (iOS chevron down) */
.abx-tfb-arrow {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	margin-left: 4px;
	transition: transform 0.2s ease;
}

.abx-tfb-arrow svg {
	width: 12px;
	height: 12px;
	stroke: currentColor;
	stroke-width: 2.5;
	fill: none;
	display: block;
}

.abx-tfb-guest-wrap.abx-tfb-open .abx-tfb-arrow {
	transform: rotate(180deg);
}

/* ---------- Date Picker Wrap & Hidden Native Input ---------- */
.abx-tfb-date-wrap {
	position: relative;
}

.abx-tfb-date-input {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	opacity: 0;
	cursor: pointer;
	z-index: 2;
}

/* ---------- Guest Counter Stepper Popover ---------- */
.abx-tfb-guest-wrap {
	position: relative;
}

.abx-tfb-guest-popover {
	position: absolute;
	top: calc(100% + 10px);
	left: 0;
	background: #ffffff;
	border: 1px solid #e2e8f0;
	border-radius: 18px;
	padding: 20px;
	box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12);
	z-index: 100;
	min-width: 290px;
	display: none;
}

.abx-tfb-guest-wrap.abx-tfb-open .abx-tfb-guest-popover {
	display: block;
	animation: abx-tfb-fade-in 0.15s ease;
}

@keyframes abx-tfb-fade-in {
	from { opacity: 0; transform: translateY(-4px); }
	to { opacity: 1; transform: translateY(0); }
}

.abx-tfb-stepper-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 10px 0;
}

.abx-tfb-stepper-row:not(:last-child) {
	border-bottom: 1px solid #f1f5f9;
}

.abx-tfb-stepper-label {
	display: flex;
	flex-direction: column;
}

.abx-tfb-stepper-title {
	font-size: 15px;
	font-weight: 600;
	color: #0f172a;
}

.abx-tfb-stepper-sub {
	font-size: 12px;
	color: #64748b;
}

.abx-tfb-stepper-ctrls {
	display: flex;
	align-items: center;
	gap: 12px;
}

.abx-tfb-step-btn {
	width: 30px;
	height: 30px;
	border-radius: 50%;
	border: 1px solid #cbd5e0;
	background: #ffffff;
	color: #0b3c33;
	font-size: 16px;
	font-weight: 600;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	line-height: 1;
	padding: 0;
	transition: all 0.15s ease;
}

.abx-tfb-step-btn:hover {
	background-color: #0b3c33;
	color: #ffffff;
	border-color: #0b3c33;
}

.abx-tfb-step-btn:disabled {
	opacity: 0.35;
	cursor: not-allowed;
	border-color: #cbd5e0;
	background: #ffffff;
	color: #94a3b8;
}

.abx-tfb-step-val {
	font-size: 15px;
	font-weight: 600;
	color: #0f172a;
	min-width: 18px;
	text-align: center;
}

/* ---------- Results Meta Bar (Count & Sort) ---------- */
.abx-tfb-meta-bar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-top: 16px;
	margin-bottom: 24px;
	width: 100%;
}

.abx-tfb-results-count {
	font-size: 15px;
	font-weight: 600;
	color: #0f172a;
}

.abx-tfb-sort-wrap {
	display: flex;
	align-items: center;
	gap: 8px;
}

.abx-tfb-sort-label {
	font-size: 14px;
	color: #64748b;
}

.abx-tfb-sort-select {
	height: 38px;
	padding: 0 32px 0 14px;
	border-radius: 999px;
	border: 1px solid #e2e8f0;
	background: #ffffff;
	color: #0f172a;
	font-size: 14px;
	font-weight: 500;
	font-family: inherit;
	cursor: pointer;
	outline: none;
	appearance: none;
	-webkit-appearance: none;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%230f172a' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 12px center;
	transition: border-color 0.15s ease;
}

.abx-tfb-sort-select:hover {
	border-color: #cbd5e0;
}

/* ---------- Filters Button: Mobile-only ---------- */
.abx-tfb-pill-filters {
	display: none;
}

/* ---------- Responsive Mobile Adjustments ---------- */
@media (max-width: 768px) {
	.abx-tfb-pill-filters {
		display: inline-flex;
	}

	.abx-tfb-bar {
		flex-direction: row;
		align-items: center;
		gap: 10px;
		flex-wrap: wrap;
	}

	.abx-tfb-left-group {
		width: auto;
		overflow-x: auto;
		scrollbar-width: none;
		-ms-overflow-style: none;
		-webkit-overflow-scrolling: touch;
	}

	.abx-tfb-left-group::-webkit-scrollbar {
		display: none;
	}

	/* Hide the taxonomy pills row on mobile — they live in the bottom sheet */
	.abx-tfb-divider,
	.abx-tfb-pills-wrap {
		display: none;
	}

	/* Show the badge on the Filters pill when a term is active */
	.abx-tfb-pill-filters.abx-tfb-filter-active {
		background-color: #0b3c33;
		color: #ffffff;
		border-color: #0b3c33;
	}

	.abx-tfb-guest-popover {
		left: 0;
		right: auto;
		max-width: calc(100vw - 32px);
		min-width: 280px;
	}

	.abx-tfb-meta-bar {
		flex-direction: row;
		align-items: center;
		justify-content: space-between;
		gap: 10px;
	}
}

/* ==========================================================================
   Mobile Bottom Sheet — Taxonomy Filter Drawer
   Visible on mobile only (JS adds .abx-tfb-sheet-open to body / wrapper)
   ========================================================================== */

/* Overlay / backdrop */
.abx-tfb-sheet-overlay {
	display: none;
	position: fixed;
	inset: 0;
	background: rgba(15, 23, 42, 0.45);
	z-index: 9998;
	backdrop-filter: blur(2px);
	-webkit-backdrop-filter: blur(2px);
	animation: abx-tfb-overlay-in 0.22s ease;
}

@keyframes abx-tfb-overlay-in {
	from { opacity: 0; }
	to   { opacity: 1; }
}

.abx-tfb-sheet-overlay.abx-tfb-visible {
	display: block;
}

/* Sheet panel */
.abx-tfb-sheet {
	position: fixed;
	bottom: 0;
	left: 0;
	right: 0;
	z-index: 9999;
	background: #ffffff;
	border-radius: 24px 24px 0 0;
	padding: 0 0 env(safe-area-inset-bottom, 0);
	box-shadow: 0 -8px 40px rgba(15, 23, 42, 0.18);
	transform: translateY(100%);
	transition: transform 0.32s cubic-bezier(0.32, 0.72, 0, 1);
	max-height: 82vh;
	display: flex;
	flex-direction: column;
	overflow: hidden;
}

.abx-tfb-sheet.abx-tfb-sheet--open {
	transform: translateY(0);
}

/* Drag handle */
.abx-tfb-sheet-handle {
	width: 40px;
	height: 4px;
	background: #cbd5e0;
	border-radius: 2px;
	margin: 14px auto 0;
	flex-shrink: 0;
}

/* Sheet header row */
.abx-tfb-sheet-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 16px 20px 12px;
	flex-shrink: 0;
	border-bottom: 1px solid #f1f5f9;
}

.abx-tfb-sheet-title {
	font-size: 16px;
	font-weight: 700;
	color: #0f172a;
	letter-spacing: -0.01em;
}

.abx-tfb-sheet-close {
	width: 32px;
	height: 32px;
	border-radius: 50%;
	border: none;
	background: #f1f5f9;
	color: #475569;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	padding: 0;
	transition: background 0.15s ease, color 0.15s ease;
	flex-shrink: 0;
}

.abx-tfb-sheet-close:hover {
	background: #e2e8f0;
	color: #0f172a;
}

.abx-tfb-sheet-close svg {
	width: 16px;
	height: 16px;
	stroke: currentColor;
	stroke-width: 2.5;
	fill: none;
	stroke-linecap: round;
	stroke-linejoin: round;
	display: block;
}

/* Active term label inside sheet header */
.abx-tfb-sheet-active-label {
	font-size: 13px;
	font-weight: 500;
	color: #64748b;
	padding: 0 20px 12px;
	flex-shrink: 0;
}

.abx-tfb-sheet-active-label span {
	color: #0b3c33;
	font-weight: 700;
}

/* Scrollable pill body */
.abx-tfb-sheet-body {
	overflow-y: auto;
	padding: 16px 20px 24px;
	-webkit-overflow-scrolling: touch;
	scrollbar-width: none;
}

.abx-tfb-sheet-body::-webkit-scrollbar {
	display: none;
}

/* Pills grid inside sheet */
.abx-tfb-sheet-pills {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
}

/* Pills inside sheet inherit base pill styles but adapt */
.abx-tfb-sheet-pills .abx-tfb-pill-tax {
	height: 44px;
	padding: 0 22px;
	font-size: 15px;
	flex: 0 0 auto;
}

