/**
 * Vandra Theme - Modern 2-Column Split Trail Explorer Application
 *
 * A restrained trail list paired with an immersive map canvas.
 */

/* Full Viewport App Body Lock */
body.page-template-trail-explorer {
	overflow: hidden;
	height: 100vh;
	background-color: var(--v-color-bg);
}

body.page-template-trail-explorer .site-footer {
	display: none !important;
}

.v-explorer-app {
	height: calc(100vh - 72px);
	display: flex;
	flex-direction: column;
	overflow: hidden;
	background-color: var(--v-color-bg);
}

/* 2-Column Split Application Layout */
.v-explorer-layout {
	flex: 1;
	display: grid;
	grid-template-columns: 390px 1fr;
	height: 100%;
	overflow: hidden;
	position: relative;
}

@media (max-width: 1200px) {
	.v-explorer-layout {
		grid-template-columns: 370px 1fr;
	}
}

@media (max-width: 990px) {
	.v-explorer-layout {
		grid-template-columns: 1fr;
	}
}

/* ==========================================================================
   LEFT PANE: Header, Quick Chips, Meta, & Card Stream
   ========================================================================== */
.v-explorer-cards-pane {
	background-color: #FFFFFF;
	border-right: 1px solid var(--v-color-border);
	display: flex;
	flex-direction: column;
	height: 100%;
	overflow: hidden;
	position: relative;
	z-index: 5;
}

.v-explorer-controls-header {
	background-color: #FFFFFF;
	border-bottom: 1px solid var(--v-color-border);
	padding: 14px 16px 10px;
	display: flex;
	flex-direction: column;
	gap: 10px;
	flex-shrink: 0;
	box-shadow: none;
	position: relative;
	z-index: 25;
}

/* Search Bar */
.v-search-bar-wrap {
	position: relative;
	width: 100%;
}

.v-search-icon {
	position: absolute;
	left: 14px;
	top: 50%;
	transform: translateY(-50%);
	color: var(--v-color-pine-700);
	pointer-events: none;
	display: flex;
	align-items: center;
}

.v-explorer-search-input {
	width: 100%;
	height: 42px;
	padding: 0 36px 0 40px;
	border-radius: var(--v-radius-xs);
	border: 1px solid var(--v-color-border);
	background: var(--v-color-surface-subtle);
	font-size: 0.875rem;
	font-family: inherit;
	color: var(--v-color-text-main);
	transition: all var(--v-transition-fast);
}

.v-explorer-search-input:focus {
	outline: none;
	background: #FFFFFF;
	border-color: var(--v-color-pine-600);
	box-shadow: 0 0 0 3px rgba(22, 101, 52, 0.12);
}

.v-search-clear-btn {
	position: absolute;
	right: 12px;
	top: 50%;
	transform: translateY(-50%);
	background: var(--v-color-border);
	border: none;
	border-radius: 50%;
	width: 20px;
	height: 20px;
	font-size: 14px;
	line-height: 1;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	color: var(--v-color-text-muted);
	transition: all var(--v-transition-fast);
}

.v-search-clear-btn:hover {
	background: #C9D1CB;
	color: #0F172A;
}

/* Quick Filter Chips */
.v-quick-filter-chips {
	display: flex;
	align-items: center;
	gap: 6px;
	overflow-x: auto;
	padding-bottom: 2px;
	scrollbar-width: none;
}

.v-quick-filter-chips::-webkit-scrollbar {
	display: none;
}

.v-quick-chip {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	padding: 6px 12px;
	border-radius: var(--v-radius-xs);
	border: 1px solid var(--v-color-border);
	background: #FFFFFF;
	font-size: 0.78125rem;
	font-weight: 600;
	color: var(--v-color-text-body);
	cursor: pointer;
	white-space: nowrap;
	flex-shrink: 0;
	transition: all var(--v-transition-fast);
}

.v-quick-chip:hover {
	border-color: var(--v-color-pine-500);
	color: var(--v-color-pine-900);
	background: var(--v-color-surface-subtle);
}

.v-quick-chip.is-active {
	background: var(--v-color-pine-700);
	border-color: var(--v-color-pine-700);
	color: #FFFFFF;
}

.v-quick-chip.is-active .v-chip-dot {
	border-color: #FFFFFF;
}

.v-chip-dot {
	width: 8px;
	height: 8px;
	border-radius: 50%;
	display: inline-block;
}

.v-dot-easy { background-color: #10B981; }
.v-dot-moderate { background-color: #F59E0B; }
.v-dot-difficult { background-color: #EF4444; }

.v-chip-drawer-btn {
	margin-left: auto;
	background: var(--v-color-surface-subtle);
	font-weight: 700;
}

.v-drawer-badge {
	background: var(--v-color-ochre-500);
	color: #FFFFFF;
	font-size: 10px;
	font-weight: 800;
	border-radius: 99px;
	padding: 1px 6px;
	line-height: 1.2;
}

.v-chip-reset-btn {
	padding: 6px 8px;
	color: var(--v-color-text-muted);
}

/* Result Meta Row */
.v-explorer-meta-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding-top: 4px;
}

.v-explorer-count {
	font-family: var(--v-font-display);
	font-size: 0.875rem;
	font-weight: 700;
	color: var(--v-color-pine-950);
}

.v-explorer-sort-wrap {
	display: flex;
	align-items: center;
	gap: 6px;
	position: relative;
	z-index: 30;
}

.v-explorer-sort-wrap .v-dropdown--compact {
	width: 150px;
	min-width: 150px;
}

.v-explorer-sort-wrap .v-dropdown--compact .v-dropdown-menu {
	width: 150px;
	min-width: 150px;
	max-width: 150px;
}

.v-sort-label {
	font-size: 0.75rem;
	font-weight: 600;
	color: var(--v-color-text-muted);
}

.v-explorer-sort-select {
	height: 30px;
	padding: 0 24px 0 8px;
	font-size: 0.75rem;
	font-weight: 600;
	border-radius: var(--v-radius-md);
	border: 1px solid var(--v-color-border);
	background: #FFFFFF;
	color: var(--v-color-text-main);
	cursor: pointer;
}

/* Card Stream Scroll Area */
.v-cards-stream {
	flex: 1;
	overflow-y: auto;
	padding: 0 16px;
	display: flex;
	flex-direction: column;
	gap: 0;
	scrollbar-width: thin;
	scrollbar-color: var(--v-color-border) transparent;
}

@media (max-width: 990px) {
	.v-cards-stream {
		padding-bottom: 90px;
	}
	.v-cards-stream.is-hidden-mobile {
		display: none;
	}
}

/* ==========================================================================
   COMPACT HORIZONTAL TRAIL CARD
   ========================================================================== */
.v-explorer-card-item {
	display: grid;
	grid-template-columns: 76px 1fr;
	gap: 12px;
	background: transparent;
	border: 0;
	border-bottom: 1px solid var(--v-color-border-light);
	border-radius: 0;
	overflow: visible;
	box-shadow: none;
	padding: 14px 0;
	text-decoration: none;
	color: inherit;
	cursor: pointer;
	transition: background-color var(--v-transition-fast), border-color var(--v-transition-fast);
	flex-shrink: 0;
}

.v-explorer-card-item:hover,
.v-explorer-card-item.is-highlighted {
	transform: none;
	border-color: var(--v-color-pine-600);
	box-shadow: none;
}

.v-explorer-card-thumb {
	width: 76px;
	height: 64px;
	border-radius: var(--v-radius-xs);
	overflow: hidden;
	position: relative;
	background: var(--v-color-border);
	flex-shrink: 0;
}

.v-explorer-card-thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform var(--v-transition-base);
}

.v-explorer-card-item:hover .v-explorer-card-thumb img {
	transform: none;
}

.v-explorer-card-thumb-empty {
	width: 100%;
	height: 100%;
	background: var(--v-color-pine-100);
}

.v-explorer-card-badge {
	position: absolute;
	top: 5px;
	left: 5px;
	font-size: 0.625rem;
	font-weight: 800;
	padding: 2px 6px;
	border-radius: var(--v-radius-sm);
	text-transform: uppercase;
	letter-spacing: 0.04em;
	box-shadow: 0 1px 4px rgba(0, 0, 0, 0.35);
}

.v-explorer-card-content {
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	min-width: 0;
	padding: 2px 2px 2px 0;
}

.v-explorer-card-region {
	font-size: 0.75rem;
	font-weight: 600;
	text-transform: none;
	color: var(--v-color-text-muted);
	letter-spacing: 0;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	margin-bottom: 3px;
}

.v-explorer-card-title {
	font-family: var(--v-font-display);
	font-size: 0.875rem;
	font-weight: 700;
	color: var(--v-color-pine-950);
	line-height: 1.25;
	margin: 0 0 5px 0;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.v-explorer-card-stats {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 0.75rem;
	font-weight: 600;
	color: var(--v-color-text-muted);
	white-space: nowrap;
}

.v-card-stat {
	display: inline-flex;
	align-items: center;
	gap: 4px;
}

.v-card-stat svg {
	display: none;
}

.v-explorer-card-link {
	font-size: 1rem;
	font-weight: 700;
	color: var(--v-color-pine-700);
	margin-left: auto;
	display: inline-flex;
	align-items: center;
	gap: 0;
}

/* ==========================================================================
   RIGHT PANE: Full Interactive Map Canvas
   ========================================================================== */
.v-explorer-map-pane {
	position: relative;
	height: 100%;
	width: 100%;
	background-color: #E6EAE5;
	overflow: hidden;
}

@media (max-width: 990px) {
	.v-explorer-map-pane {
		display: none;
		position: fixed;
		top: 132px;
		left: 0;
		right: 0;
		bottom: 0;
		z-index: 500;
	}

	.v-explorer-map-pane.is-active-mobile {
		display: block;
	}
}

.v-explorer-map {
	width: 100%;
	height: 100%;
}

/* Map Floating Glassmorphic Controls */
.v-map-custom-controls {
	position: absolute;
	top: 16px;
	right: 16px;
	z-index: 800;
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.v-map-btn {
	width: 38px;
	height: 38px;
	border-radius: var(--v-radius-lg);
	background: #FFFFFF;
	border: 1px solid var(--v-color-border);
	box-shadow: var(--v-shadow-sm);
	display: flex;
	align-items: center;
	justify-content: center;
	color: var(--v-color-pine-900);
	cursor: pointer;
	font-size: 1.15rem;
	font-weight: 700;
	transition: all var(--v-transition-fast);
}

.v-map-btn:hover {
	background: var(--v-color-pine-700);
	color: #FFFFFF;
	border-color: var(--v-color-pine-700);
	transform: scale(1.06);
}

/* Custom Teardrop Map Pin Markers */
.v-pin-marker {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 30px;
	height: 30px;
	border-radius: 50% 50% 50% 0;
	transform: rotate(-45deg);
	border: 2px solid #FFFFFF;
	box-shadow: 0 3px 10px rgba(0, 0, 0, 0.4);
	cursor: pointer;
	transition: transform var(--v-transition-fast), box-shadow var(--v-transition-fast);
}

.v-pin-marker:hover,
.v-pin-marker.is-active {
	transform: rotate(-45deg) scale(1.2);
	box-shadow: 0 6px 16px rgba(0, 0, 0, 0.5);
}

.v-pin-inner {
	transform: rotate(45deg);
	font-family: var(--v-font-display);
	font-size: 11px;
	font-weight: 800;
	color: #FFFFFF;
	line-height: 1;
}

.v-pin-start { background-color: #15803D; }
.v-pin-end { background-color: #1F2937; }

/* Custom High-End Leaflet Popup */
.leaflet-popup {
	margin-bottom: 14px;
}

.leaflet-popup-content-wrapper,
.leaflet-container .leaflet-popup-content-wrapper {
	padding: 0 !important;
	border-radius: 16px !important;
	overflow: hidden !important;
	box-shadow: 0 20px 40px -6px rgba(10, 25, 16, 0.3), 0 0 0 1px rgba(0, 0, 0, 0.08) !important;
	border: none !important;
	background: #FFFFFF !important;
}

.leaflet-popup-content,
.leaflet-container .leaflet-popup-content {
	margin: 0 !important;
	line-height: 1.4 !important;
	min-width: 280px !important;
	max-width: 310px !important;
	color: #0F172A !important;
}

.leaflet-container .leaflet-popup-content a {
	color: #0F172A !important;
	text-decoration: none !important;
}

.leaflet-popup-tip-container {
	margin-top: -1px;
}

.leaflet-popup-tip {
	background: #FFFFFF !important;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
}

.leaflet-popup-close-button {
	width: 22px !important;
	height: 22px !important;
	border-radius: 50% !important;
	background: rgba(255, 255, 255, 0.9) !important;
	top: 8px !important;
	right: 8px !important;
	display: flex !important;
	align-items: center !important;
	justify-content: center !important;
	color: #475569 !important;
	font-weight: 700 !important;
	font-size: 14px !important;
	border: 1px solid rgba(0, 0, 0, 0.08) !important;
	z-index: 20 !important;
	transition: all 0.15s ease !important;
}

.leaflet-popup-close-button:hover {
	background: #0F172A !important;
	color: #FFFFFF !important;
	border-color: #0F172A !important;
}

/* Beautiful Floating Outdoor Trail Popup Card */
.v-map-popup-card {
	display: flex;
	flex-direction: column;
	background: #FFFFFF;
}

.v-popup-hero {
	height: 110px;
	width: 100%;
	background-size: cover;
	background-position: center;
	position: relative;
	background-color: #C9D1CB;
}

.v-popup-hero-gradient {
	position: absolute;
	inset: 0;
	background: linear-gradient(180deg, rgba(0, 0, 0, 0.05) 0%, rgba(0, 0, 0, 0.6) 100%);
}

.v-popup-hero-badge {
	position: absolute;
	top: 8px;
	left: 8px;
	font-size: 10px;
	font-weight: 800;
	padding: 3px 8px;
	border-radius: 99px;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	color: #FFFFFF;
	box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

.v-popup-hero-tag {
	position: absolute;
	bottom: 8px;
	left: 10px;
	font-size: 11px;
	font-weight: 700;
	color: #FFFFFF;
	text-shadow: 0 1px 3px rgba(0, 0, 0, 0.7);
	display: flex;
	align-items: center;
	gap: 4px;
}

.v-popup-body {
	padding: 12px 14px 14px;
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.v-popup-heading {
	font-family: var(--v-font-display);
	font-size: 14px;
	font-weight: 700;
	color: #0F172A !important;
	line-height: 1.3;
	margin: 0;
}

.v-popup-heading a {
	color: #0F172A !important;
	text-decoration: none !important;
}

.v-popup-heading a:hover {
	color: #166534 !important;
}

.v-popup-footer {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding-top: 6px;
	border-top: 1px solid var(--v-color-border-light);
}

.v-popup-stats {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 12px;
	font-weight: 600;
	color: var(--v-color-text-muted);
}

.v-popup-btn {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	padding: 6px 14px;
	background: #166534 !important;
	color: #FFFFFF !important;
	font-size: 12px;
	font-weight: 700;
	border-radius: 99px;
	text-decoration: none !important;
	box-shadow: 0 2px 6px rgba(22, 101, 52, 0.25);
	transition: all 0.15s ease;
}

.v-popup-btn:hover {
	background: #14532D !important;
	color: #FFFFFF !important;
	box-shadow: 0 4px 10px rgba(22, 101, 52, 0.35);
}

/* ==========================================================================
   FILTER DRAWER / SLIDE-OVER MODAL
   ========================================================================== */
.v-filter-drawer-overlay {
	display: none;
	position: fixed;
	inset: 0;
	z-index: 10005;
	background: rgba(10, 25, 16, 0.5);
	align-items: center;
	justify-content: flex-end;
}

.v-filter-drawer-overlay.is-active {
	display: flex;
}

.v-filter-drawer {
	width: 100%;
	max-width: 420px;
	height: 100%;
	background: #FFFFFF;
	box-shadow: -10px 0 30px rgba(0, 0, 0, 0.15);
	display: flex;
	flex-direction: column;
	animation: vSlideInRight 0.25s ease-out;
}

@keyframes vSlideInRight {
	from { transform: translateX(100%); }
	to { transform: translateX(0); }
}

.v-drawer-header {
	padding: 18px 20px;
	border-bottom: 1px solid var(--v-color-border);
	display: flex;
	align-items: center;
	justify-content: space-between;
}

.v-drawer-title {
	font-family: var(--v-font-display);
	font-size: 1.1rem;
	font-weight: 700;
	color: var(--v-color-pine-950);
	margin: 0;
	display: flex;
	align-items: center;
	gap: 8px;
}

.v-drawer-close-btn {
	background: var(--v-color-surface-subtle);
	border: 1px solid var(--v-color-border);
	border-radius: 50%;
	width: 32px;
	height: 32px;
	font-size: 20px;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	color: var(--v-color-text-main);
	transition: all var(--v-transition-fast);
}

.v-drawer-close-btn:hover {
	background: var(--v-color-border);
}

.v-drawer-body {
	padding: 20px;
	overflow-y: auto;
	flex: 1;
	display: flex;
	flex-direction: column;
	gap: 24px;
}

.v-filter-section {
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.v-section-title-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
}

.v-section-title {
	font-family: var(--v-font-display);
	font-size: 0.8125rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	color: var(--v-color-text-muted);
}

.v-section-val {
	font-size: 0.8125rem;
	font-weight: 700;
	color: var(--v-color-pine-700);
}

.v-drawer-range {
	width: 100%;
	accent-color: var(--v-color-pine-600);
	cursor: pointer;
}

.v-range-labels {
	display: flex;
	justify-content: space-between;
	font-size: 0.6875rem;
	color: var(--v-color-text-muted);
}

.v-filter-pill-grid {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
}

.v-drawer-pill {
	display: inline-flex;
	align-items: center;
	padding: 6px 12px;
	background-color: var(--v-color-surface-subtle);
	border: 1px solid var(--v-color-border);
	border-radius: var(--v-radius-xs);
	font-size: 0.78125rem;
	font-weight: 600;
	color: var(--v-color-text-body);
	cursor: pointer;
	user-select: none;
	transition: all var(--v-transition-fast);
}

.v-drawer-pill:hover {
	border-color: var(--v-color-pine-400);
	color: var(--v-color-pine-900);
}

.v-drawer-pill input {
	display: none;
}

.v-drawer-pill:has(input:checked),
.v-drawer-pill.is-active {
	background-color: var(--v-color-pine-700);
	border-color: var(--v-color-pine-700);
	color: #FFFFFF;
}

.v-drawer-footer {
	padding: 16px 20px;
	border-top: 1px solid var(--v-color-border);
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	background: #FFFFFF;
}

/* Mobile Toggle Bar */
.v-mobile-view-bar {
	display: none;
	position: fixed;
	bottom: 24px;
	left: 50%;
	transform: translateX(-50%);
	z-index: 1500;
	background: rgba(10, 25, 16, 0.92);
	padding: 5px 6px;
	border-radius: var(--v-radius-xs);
	box-shadow: 0 12px 32px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(255, 255, 255, 0.15);
	gap: 4px;
}

@media (max-width: 990px) {
	.v-mobile-view-bar {
		display: flex;
	}
}

.v-mobile-view-bar .v-btn {
	border-radius: var(--v-radius-xs);
	padding: 8px 18px;
	font-size: 0.8125rem;
	font-weight: 700;
	color: rgba(255, 255, 255, 0.85);
	background: transparent;
	border: none;
}

.v-mobile-view-bar .v-btn.is-active {
	background-color: var(--v-color-pine-600);
	color: #FFFFFF;
}
