/* SAO Ubicaciones – estilos base (todo es sobrescribible desde Elementor) */

.saolm-widget {
	--saolm-accent: #ff5f00;
	--saolm-pin: #ff5f00;
	--saolm-pin-hover: #e85400;
	--saolm-pin-active: #c94800;
	--saolm-pin-dot: #ffffff;
	--saolm-focus: #ff5f00;
	position: relative;
	width: 100%;
}

/* Encabezado */
.saolm-widget .saolm-header {
	text-align: center;
	margin-bottom: 32px;
}
.saolm-widget .saolm-subtitle {
	display: block;
	margin-bottom: 10px;
	color: var(--saolm-accent);
	font-size: 13px;
	font-weight: 500;
	letter-spacing: 0.03em;
	line-height: 1.3;
}
.saolm-widget .saolm-title {
	margin: 0;
	color: #141414;
	font-size: clamp(26px, 3.6vw, 38px);
	font-weight: 700;
	line-height: 1.15;
	letter-spacing: -0.02em;
}

/* Filtros */
.saolm-widget .saolm-filters {
	display: grid;
	grid-auto-flow: column;
	grid-auto-columns: minmax(0, 1fr);
	gap: 18px;
	margin-bottom: 28px;
}
.saolm-widget .saolm-field {
	position: relative;
	min-width: 0;
}
.saolm-widget .saolm-select {
	-webkit-appearance: none;
	-moz-appearance: none;
	appearance: none;
	display: block;
	width: 100%;
	height: 46px;
	margin: 0;
	padding: 0 42px 0 14px;
	border: 1px solid #e2e2e2;
	border-radius: 10px;
	background: #ffffff none;
	color: #555555;
	font-family: inherit;
	font-size: 15px;
	line-height: normal;
	cursor: pointer;
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
	transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.saolm-widget .saolm-select:focus {
	outline: none;
	border-color: var(--saolm-focus);
	box-shadow: 0 0 0 3px color-mix(in srgb, var(--saolm-focus) 18%, transparent);
}
.saolm-widget .saolm-chevron {
	position: absolute;
	top: 50%;
	right: 14px;
	display: flex;
	width: 14px;
	height: 14px;
	color: #2b2b2b;
	transform: translateY(-50%);
	pointer-events: none;
}
.saolm-widget .saolm-chevron svg {
	width: 100%;
	height: 100%;
}

.saolm-widget .saolm-button {
	display: block;
	width: 100%;
	height: 46px;
	margin: 0;
	padding: 0 24px;
	border: 1px solid transparent;
	border-radius: 10px;
	background-color: var(--saolm-accent);
	color: #ffffff;
	font-family: inherit;
	font-size: 15px;
	font-weight: 500;
	line-height: 1;
	cursor: pointer;
	transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.saolm-widget .saolm-button:hover,
.saolm-widget .saolm-button:focus-visible {
	background-color: #e85400;
	color: #ffffff;
}
.saolm-widget .saolm-button:focus-visible {
	outline: 2px solid var(--saolm-focus);
	outline-offset: 2px;
}

/* Mapa */
.saolm-widget .saolm-map-wrap {
	position: relative;
	overflow: hidden;
	border-radius: 16px;
	isolation: isolate;
}
.saolm-widget .saolm-map {
	width: 100%;
	height: 380px;
	background-color: #eef0f2;
	z-index: 0;
}
.saolm-widget .leaflet-container {
	font-family: inherit;
}
.saolm-widget .leaflet-control-attribution {
	font-size: 10px;
	background: rgba(255, 255, 255, 0.75);
}
.saolm-widget .leaflet-control-zoom {
	border: 0;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
	border-radius: 10px;
	overflow: hidden;
}
.saolm-widget .leaflet-control-zoom a {
	color: #2b2b2b;
	background-color: #ffffff;
}

/* Sin resultados */
.saolm-widget .saolm-no-results {
	display: none;
	position: absolute;
	top: 50%;
	left: 50%;
	z-index: 500;
	max-width: calc(100% - 40px);
	padding: 12px 18px;
	border-radius: 10px;
	background: #ffffff;
	color: #333333;
	font-size: 14px;
	text-align: center;
	box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
	transform: translate(-50%, -50%);
	pointer-events: none;
}
.saolm-widget .saolm-no-results.is-visible {
	display: block;
}

/* Marcadores */
.saolm-widget .saolm-marker {
	background: none;
	border: 0;
}
.saolm-widget .saolm-marker svg,
.saolm-widget .saolm-marker img {
	display: block;
	width: 100%;
	height: 100%;
	max-width: none;
	object-fit: contain;
	transform-origin: 50% 100%;
	transition: transform 0.15s ease;
}
.saolm-widget .saolm-marker-pin svg {
	filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.25));
}
.saolm-widget .saolm-pin-shape {
	fill: var(--saolm-pin);
	transition: fill 0.15s ease;
}
.saolm-widget .saolm-pin-dot {
	fill: var(--saolm-pin-dot);
}
.saolm-widget .saolm-marker:hover svg,
.saolm-widget .saolm-marker:hover img,
.saolm-widget .saolm-marker:focus-visible svg {
	transform: scale(1.08);
}
.saolm-widget .saolm-marker:hover .saolm-pin-shape {
	fill: var(--saolm-pin-hover);
}
.saolm-widget .saolm-marker.is-active svg,
.saolm-widget .saolm-marker.is-active img {
	transform: scale(1.14);
}
.saolm-widget .saolm-marker.is-active .saolm-pin-shape {
	fill: var(--saolm-pin-active);
}
.saolm-widget .saolm-marker:focus-visible {
	outline: 2px solid var(--saolm-focus);
	outline-offset: 2px;
	border-radius: 4px;
}

/* Popup */
.saolm-widget .saolm-leaflet-popup .leaflet-popup-content-wrapper {
	padding: 0;
	overflow: hidden;
	border-radius: 14px;
	background-color: #ffffff;
	box-shadow: 0 12px 32px rgba(0, 0, 0, 0.18);
}
.saolm-widget .saolm-leaflet-popup .leaflet-popup-content {
	margin: 0;
	line-height: 1.4;
}
.saolm-widget .saolm-leaflet-popup .leaflet-popup-tip {
	background-color: #ffffff;
}
.saolm-widget .saolm-leaflet-popup .leaflet-popup-close-button {
	top: 8px;
	right: 8px;
	width: 28px;
	height: 28px;
	border-radius: 50%;
	background-color: rgba(255, 255, 255, 0.92);
	color: #2b2b2b;
	font: 18px/28px Tahoma, Verdana, sans-serif;
	text-align: center;
	box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
	z-index: 2;
}
.saolm-widget .saolm-popup {
	width: 280px;
	max-width: 72vw;
	white-space: normal;
}
.saolm-widget .saolm-popup-media {
	background-color: #f1f1f1;
}
.saolm-widget .saolm-popup-media.is-zoomable .saolm-popup-img {
	cursor: zoom-in;
}
.saolm-widget .saolm-popup-img {
	display: block;
	width: 100%;
	max-width: 100%;
	height: 170px;
	object-fit: cover;
	border: 0;
	border-radius: 0;
	box-shadow: none;
}
.saolm-widget .saolm-popup-body {
	padding: 14px 16px 16px;
}
.saolm-widget .saolm-popup-badge {
	display: inline-block;
	margin-bottom: 8px;
	padding: 3px 9px;
	border-radius: 20px;
	background-color: color-mix(in srgb, var(--saolm-accent) 12%, #ffffff);
	color: var(--saolm-accent);
	font-size: 12px;
	font-weight: 600;
	line-height: 1.4;
}
.saolm-widget .saolm-popup-title {
	margin: 0 0 2px;
	color: #141414;
	font-size: 16px;
	font-weight: 700;
	line-height: 1.3;
}
.saolm-widget .saolm-popup-meta {
	color: #6b6b6b;
	font-size: 13px;
}
.saolm-widget .saolm-popup-desc {
	margin-top: 8px;
	color: #444444;
	font-size: 13px;
}
.saolm-widget .saolm-popup-link,
.saolm-widget .leaflet-container a.saolm-popup-link {
	display: inline-block;
	margin-top: 10px;
	color: var(--saolm-accent);
	font-size: 13px;
	font-weight: 600;
	text-decoration: none;
}
.saolm-widget .saolm-popup-link:hover {
	text-decoration: underline;
}

/* Lightbox (fuera del widget, en <body>) */
.saolm-lightbox {
	position: fixed;
	inset: 0;
	z-index: 999999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 40px 20px;
	background: rgba(10, 10, 10, 0.86);
	opacity: 0;
	transition: opacity 0.2s ease;
	cursor: zoom-out;
}
.saolm-lightbox.is-open {
	opacity: 1;
}
.saolm-lightbox img {
	max-width: 100%;
	max-height: 100%;
	width: auto;
	height: auto;
	border-radius: 8px;
	box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
	cursor: default;
}
.saolm-lightbox .saolm-lightbox-close {
	position: absolute;
	top: 14px;
	right: 14px;
	width: 44px;
	height: 44px;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.14);
	color: #ffffff;
	font-size: 28px;
	line-height: 44px;
	cursor: pointer;
}
.saolm-lightbox .saolm-lightbox-close:hover,
.saolm-lightbox .saolm-lightbox-close:focus-visible {
	background: rgba(255, 255, 255, 0.28);
}

@media (prefers-reduced-motion: reduce) {
	.saolm-widget *,
	.saolm-lightbox {
		transition: none !important;
	}
}
