/**
 * Mapa de destinos — widget flotante y página completa.
 */
:root {
	--tb-map-header: #1a4d7c;
	--tb-map-marker: #f7db48;
	--tb-map-accent: #2f998f;
	--tb-map-cta: #1a4d7c;
}

/* —— Widget flotante (esquina inferior derecha) —— */
.tb-map-widget {
	position: fixed;
	right: 20px;
	bottom: 20px;
	z-index: 99990;
	width: min(380px, calc(100vw - 32px));
	font-family: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

.tb-map-widget__card {
	background: #fff;
	border-radius: 12px;
	box-shadow: 0 12px 40px rgba(0, 0, 0, 0.22);
	overflow: hidden;
}

.tb-map-widget__header {
	display: flex;
	align-items: center;
	gap: 10px;
	margin: 0;
	padding: 12px 14px;
	background: var(--tb-map-header);
	color: #fff;
}

.tb-map-widget__header-icon {
	display: flex;
	flex-shrink: 0;
}

.tb-map-widget__title {
	flex: 1;
	margin: 0;
	font-size: 0.9rem;
	font-weight: 600;
	line-height: 1.3;
}

.tb-map-widget__close {
	flex-shrink: 0;
	border: none;
	background: transparent;
	color: #fff;
	font-size: 1.35rem;
	line-height: 1;
	cursor: pointer;
	opacity: 0.85;
	padding: 0 4px;
}

.tb-map-widget__close:hover {
	opacity: 1;
}

.tb-map-widget__body {
	position: relative;
	display: flex;
	min-height: 200px;
}

.tb-map-widget__map {
	flex: 1;
	min-height: 200px;
	min-width: 0;
	height: 200px;
	z-index: 0;
}

.tb-map-widget__tours {
	position: absolute;
	top: 8px;
	right: 8px;
	bottom: 8px;
	width: 46%;
	max-width: 172px;
	margin: 0;
	padding: 0;
	list-style: none;
	overflow-y: auto;
	z-index: 500;
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.tb-map-widget__tour-card {
	display: flex;
	gap: 6px;
	align-items: center;
	padding: 5px 6px;
	background: #fff;
	border-radius: 8px;
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.12);
	text-decoration: none;
	color: inherit;
	transition: transform 0.15s ease;
	overflow: hidden;
}

.tb-map-widget__tour-card:hover {
	transform: translateY(-1px);
}

.tb-map-widget__tour-thumb {
	width: 50px;
	height: 42px;
	border-radius: 6px;
	object-fit: cover;
	flex-shrink: 0;
	background: #eee;
}

.tb-map-widget__tour-info {
	flex: 1;
	min-width: 0;
	overflow: hidden;
}

.tb-map-widget__tour-price {
	display: block;
	font-size: 0.68rem;
	font-weight: 700;
	color: #c9a000;
	line-height: 1.2;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.tb-map-widget__tour-price .woocommerce-Price-amount {
	color: inherit;
}

.tb-map-widget__tour-title {
	display: block;
	font-size: 0.62rem;
	line-height: 1.25;
	color: #333;
	margin-top: 2px;
	overflow: hidden;
	text-overflow: ellipsis;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
}

.tb-map-widget__footer {
	padding: 10px 12px 12px;
	text-align: center;
}

.tb-map-widget__cta {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	width: 100%;
	padding: 12px 16px;
	border-radius: 999px;
	background: var(--tb-map-cta);
	color: #fff !important;
	font-size: 0.9rem;
	font-weight: 600;
	text-decoration: none !important;
	box-shadow: 0 4px 12px rgba(26, 77, 124, 0.35);
}

.tb-map-widget__cta:hover {
	filter: brightness(1.05);
	color: #fff !important;
}

/* Marcadores personalizados */
.tb-map-marker {
	background: var(--tb-map-marker);
	border: 2px solid #fff;
	border-radius: 50%;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
	width: 14px !important;
	height: 14px !important;
	margin-left: -7px !important;
	margin-top: -7px !important;
}

.tb-map-marker--user {
	background: #2f7cf6;
	border-color: #fff;
	width: 12px !important;
	height: 12px !important;
}

.tb-map-marker-label {
	background: #fff;
	border: none;
	border-radius: 6px;
	padding: 4px 8px;
	font-size: 0.75rem;
	font-weight: 600;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
	white-space: nowrap;
}

/* —— Página completa del mapa —— */
.tb-map-page {
	position: relative;
	display: flex;
	width: 100%;
	min-height: 70vh;
	background: #e8eef3;
	overflow: hidden;
}

.tb-map-page__canvas {
	flex: 1;
	min-height: inherit;
	height: 100%;
	width: 100%;
	z-index: 1;
}

.tb-map-page__loading {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgba(255, 255, 255, 0.85);
	z-index: 10;
	font-size: 1rem;
	color: #444;
}

.tb-map-page__loading[hidden] {
	display: none;
}

.tb-map-page__sidebar {
	position: absolute;
	top: 16px;
	left: 16px;
	bottom: 16px;
	width: min(360px, calc(100% - 32px));
	z-index: 600;
	background: #fff;
	border-radius: 12px;
	box-shadow: 0 8px 32px rgba(0, 0, 0, 0.18);
	display: flex;
	flex-direction: column;
	overflow: hidden;
}

.tb-map-page__sidebar[hidden] {
	display: none;
}

.tb-map-page__sidebar-close {
	position: absolute;
	top: 8px;
	right: 10px;
	z-index: 2;
	border: none;
	background: transparent;
	font-size: 1.5rem;
	line-height: 1;
	cursor: pointer;
	color: #666;
}

.tb-map-page__sidebar-inner {
	flex: 1;
	overflow-y: auto;
	padding: 16px;
	padding-top: 36px;
}

.tb-map-page__dest-header {
	margin: 0 0 12px;
}

.tb-map-page__dest-title {
	margin: 0 0 4px;
	font-size: 1.15rem;
	font-weight: 700;
	color: #1a1a1a;
}

.tb-map-page__dest-meta {
	margin: 0;
	font-size: 0.85rem;
	color: #666;
}

.tb-map-page__tour-list {
	margin: 0;
	padding: 0;
	list-style: none;
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.tb-map-page__tour-item {
	display: flex;
	gap: 12px;
	padding: 10px;
	border: 1px solid #e8e8e8;
	border-radius: 10px;
	text-decoration: none;
	color: inherit;
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.tb-map-page__tour-item:hover {
	border-color: var(--tb-map-accent);
	box-shadow: 0 4px 12px rgba(47, 153, 143, 0.12);
}

.tb-map-page__tour-item img {
	width: 72px;
	height: 72px;
	object-fit: cover;
	border-radius: 8px;
	flex-shrink: 0;
	background: #f0f0f0;
}

.tb-map-page__tour-item h4 {
	margin: 0 0 4px;
	font-size: 0.95rem;
	font-weight: 600;
}

.tb-map-page__tour-item .tb-map-tour-price {
	font-size: 0.9rem;
	font-weight: 700;
	color: #c9a000;
}

@media (max-width: 640px) {
	.tb-map-widget {
		right: 12px;
		bottom: 12px;
	}

	.tb-map-widget__tours {
		width: 46%;
	}

	.tb-map-page__sidebar {
		top: auto;
		left: 0;
		right: 0;
		bottom: 0;
		width: 100%;
		max-height: 45vh;
		border-radius: 16px 16px 0 0;
	}
}
