/*
 * WHERE filter rail - floating tab + drawer chrome.
 * The tab and drawer nodes are relocated to document.body by
 * where-filters.js (position: fixed does not escape container-type
 * containment), so these selectors are intentionally NOT scoped under any
 * widget class.
 */

/* Floating tab, fixed to the left edge of the browser window. Multiple
   tabs stack vertically via --where-rail-index. */
.where-rail-tab {
	position: fixed;
	left: 0;
	top: calc(30vh + var(--where-rail-index, 0) * 72px);
	z-index: 9000;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 6px;
	padding: 12px 9px;
	border: 1px solid #dfe5e1;
	border-left: 0;
	border-radius: 0 10px 10px 0;
	background: #fff;
	color: #262827;
	font-family: inherit;
	font-size: 11px;
	font-weight: 700;
	line-height: 1;
	letter-spacing: .08em;
	text-transform: uppercase;
	cursor: pointer;
	box-shadow: 3px 3px 12px rgba(25, 35, 30, .14);
}
.where-rail-tab[hidden] { display: none; }
.where-rail-tab-icon { display: grid; gap: 3px; width: 14px; }
.where-rail-tab-icon i { display: block; height: 2px; background: currentColor; border-radius: 1px; }
.where-rail-tab-label { writing-mode: vertical-rl; text-orientation: mixed; }

/* Icon only on mobile; icon + label on desktop. */
@media (max-width: 700px) {
	.where-rail-tab-label { display: none; }
	.where-rail-tab { padding: 12px 10px; }
}

/* Drawer */
.where-rail-drawer {
	position: fixed;
	top: 0;
	left: 0;
	bottom: 0;
	z-index: 9500;
	display: flex;
	flex-direction: column;
	width: min(340px, 88vw);
	background: #fff;
	border-right: 1px solid #dfe5e1;
	box-shadow: 14px 0 34px rgba(25, 35, 30, .18);
}
.where-rail-drawer[hidden] { display: none; }
.where-rail-drawer-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	flex: 0 0 auto;
	padding: 14px 16px;
	border-bottom: 1px solid #dfe5e1;
}
.where-rail-drawer-title {
	font-size: 13px;
	font-weight: 800;
	letter-spacing: .06em;
	text-transform: uppercase;
	color: #262827;
}
.where-rail-close {
	width: 36px;
	height: 36px;
	border: 1px solid #dfe5e1;
	border-radius: 8px;
	background: #fff;
	color: #262827;
	font-size: 18px;
	line-height: 1;
	cursor: pointer;
}
.where-rail-close:hover { border-color: #aab7b0; }
.where-rail-drawer-body { flex: 1 1 auto; overflow-y: auto; padding: 16px; }

.where-rail-tab:focus-visible,
.where-rail-close:focus-visible { outline: 3px solid #83b9dc; outline-offset: 2px; }

@media (prefers-reduced-motion: no-preference) {
	.where-rail-drawer { animation: where-rail-in .18s ease; }
	@keyframes where-rail-in {
		from { transform: translateX(-14px); opacity: .6; }
		to { transform: none; opacity: 1; }
	}
}
