/**
 * Wharf map layout.
 */

.tys-map-page {
	max-width: none;
	padding: 0;
}

.tys-map-page .tys-catalog-wrap,
.tys-map-page.tys-catalog-wrap {
	max-width: none;
	padding: 1.25rem;
}

.tys-map-canvas.leaflet-container,
.tys-map-canvas .leaflet-container {
	touch-action: pan-y pinch-zoom;
	/* Match CARTO dark_all so any residual tile seams are not bright white. */
	background: #0a0a0a;
}

/*
 * Theme/Elementor often set img { max-width: 100% }, which shrinks Leaflet tiles
 * on high-DPR phones and leaves hairline gaps between them.
 */
.tys-map-canvas .leaflet-tile-pane img,
.tys-map-canvas .leaflet-layer img.leaflet-tile,
.tys-map-canvas img.leaflet-tile {
	max-width: none !important;
	max-height: none !important;
}

.tys-wharf-map-wrap {
	display: grid;
	grid-template-columns: minmax(280px, 340px) 1fr;
	gap: 1rem;
	min-height: 70vh;
}

.tys-map-sidebar {
	background: #121212;
	border: 1px solid #2a2a2a;
	border-radius: 8px;
	padding: 1rem;
	display: flex;
	flex-direction: column;
	gap: 1rem;
}

.tys-map-controls label {
	display: block;
	margin-bottom: 0.75rem;
}

.tys-control-label {
	display: block;
	font-size: 0.75rem;
	color: #a3a3a3;
	margin-bottom: 0.25rem;
}

.tys-map-controls select {
	width: 100%;
	background: #050505;
	color: #f5f5f5;
	border: 1px solid #2a2a2a;
	padding: 0.5rem;
	border-radius: 4px;
	color-scheme: dark;
}

.tys-map-controls select option {
	background: #050505;
	color: #fff;
}

.tys-map-canvas {
	min-height: 70vh;
	border-radius: 8px;
	border: 1px solid #2a2a2a;
	overflow: hidden;
	background: #0a0a0a;
	z-index: 0;
}

.tys-map-sidebar-panel {
	border-top: 1px solid #2a2a2a;
	padding-top: 1rem;
}

.tys-map-sidebar-panel[hidden] {
	display: none !important;
}

.tys-map-sidebar-panel-title {
	margin: 0 0 0.75rem;
	font-size: 0.95rem;
	font-weight: 500;
	color: #f5f5f5;
}

.tys-map-sidebar-panel-body {
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
	max-height: 40vh;
	overflow-y: auto;
}

.tys-map-wharf-names {
	margin: 0;
	padding: 0 0 0 1rem;
	font-size: 0.85rem;
	color: #a3a3a3;
}

.tys-map-panel-note {
	margin: 0;
	font-size: 0.85rem;
	color: #a3a3a3;
}

.tys-map-view-yacht {
	display: inline-block;
	text-align: center;
	margin-top: 0.25rem;
}

.tys-map-yacht-card {
	display: flex;
	gap: 0.75rem;
	align-items: center;
	background: #0a0a0a;
	border: 1px solid #2a2a2a;
	border-radius: 6px;
	padding: 0.5rem;
	text-decoration: none;
	color: #f5f5f5;
}

.tys-map-yacht-card img {
	width: 56px;
	height: 56px;
	object-fit: cover;
	border-radius: 4px;
}

.tys-map-yacht-card strong {
	display: block;
	font-weight: 500;
}

.tys-map-yacht-card span {
	font-size: 0.8rem;
	color: #a3a3a3;
}

.tys-marker-dimmed {
	opacity: 0.25;
}

.tys-leaflet-popup .leaflet-popup-content-wrapper {
	background: #121212;
	color: #f5f5f5;
	border-radius: 6px;
}

.tys-leaflet-popup .leaflet-popup-tip {
	background: #121212;
}

.tys-popup-yachts {
	margin: 0.5rem 0 0;
	padding: 0;
	list-style: none;
}

.tys-popup-yachts li {
	margin: 0.25rem 0;
	font-size: 0.85rem;
}

@media (max-width: 900px) {
	.tys-wharf-map-wrap {
		grid-template-columns: 1fr;
	}

	.tys-map-canvas {
		min-height: 50vh;
	}
}

.tys-wharf-locations-wrap {
	width: 100%;
}

/* Height comes from the shortcode inline style; do not inherit 50–70vh. */
.tys-wharf-locations-canvas.tys-map-canvas {
	min-height: 0;
}

.tys-wharf-location-label {
	background: rgba(18, 18, 18, 0.92);
	border: 1px solid #2a2a2a;
	border-radius: 4px;
	box-shadow: none;
	color: #f5f5f5;
	font-size: 0.75rem;
	font-weight: 500;
	padding: 0.2rem 0.45rem;
	pointer-events: none;
	white-space: nowrap;
}

.tys-wharf-location-label::before {
	border-top-color: rgba(18, 18, 18, 0.92);
}
