/* Mapas La Regional de Seguros - Frontend */
.mlrds-map-container {
	display: flex;
	flex-wrap: nowrap;
	align-items: stretch;
	width: 100%;
	max-width: 100%;
	box-sizing: border-box;
	min-height: 528px;
	margin: 0;
	border: 1px solid #ddd;
	border-radius: 8px;
	overflow: hidden;
	box-shadow: 0 1px 3px rgba(0,0,0,0.1);
	font-family: "Poppins", sans-serif;
	--mlrds-map-accent: #e74c3c;
}
.mlrds-panama-highlight {
	pointer-events: none;
}
.mlrds-sidebar {
	flex: 0 0 320px;
	max-width: 320px;
	align-self: stretch;
	min-height: 528px;
	max-height: 792px;
	overflow-y: auto;
	background: #f9f9f9;
	border-right: 1px solid #ddd;
	padding: 12px;
}
.mlrds-list { list-style: none; margin: 0; padding: 0; }
.mlrds-sidebar-title {
	margin: 0 0 10px 0;
	padding: 0 0 8px 0;
	font-size: 1.1em;
	font-weight: 600;
	color: #1d2327;
	border-bottom: 1px solid #c3c4c7;
}
.mlrds-group { margin-bottom: 0; }
/* Acordeón: fondo 5% mapa + 95% blanco; hover fondo 100% color mapa; texto #667674 */
.mlrds-accordion-header {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: space-between;
	width: 100%;
	margin: 0;
	padding: 8px 10px;
	font-size: 10px;
	font-family: "Poppins", sans-serif;
	font-weight: 700;
	color: #667674;
	text-align: left;
	/* Fallback sin color-mix; navegadores modernos: 5% mapa + 95% blanco */
	background: var(--mlrds-map-accent, #e74c3c);
	background: color-mix(in srgb, var(--mlrds-map-accent, #e74c3c) 5%, white);
	border: 1px solid rgba(0, 0, 0, 0.2);
	border-radius: 0;
	cursor: pointer;
	overflow: hidden;
	transition: background 0.18s ease;
}
.mlrds-accordion-header:hover {
	background: var(--mlrds-map-accent, #e74c3c);
}
.mlrds-accordion-header:focus-visible {
	outline: 2px solid var(--mlrds-map-accent, #e74c3c);
	outline-offset: 2px;
	z-index: 1;
}
.mlrds-accordion-title {
	flex: 1;
	position: relative;
	z-index: 1;
}
.mlrds-accordion-icon {
	position: relative;
	z-index: 1;
	display: inline-block;
	width: 0;
	height: 0;
	margin-left: 8px;
	border-left: 5px solid transparent;
	border-right: 5px solid transparent;
	border-top: 6px solid currentColor;
	transition: transform 0.2s;
}
.mlrds-accordion-group--expanded .mlrds-accordion-icon {
	transform: rotate(180deg);
}
.mlrds-accordion-header[aria-expanded="true"] {
	border-bottom: none;
}
/* Pila de tabs: primero solo redondeo arriba; intermedios sin radio; último solo redondeo abajo (colapsado); uno solo = las 4 esquinas */
.mlrds-list > .mlrds-group:first-child:not(:last-child) .mlrds-accordion-header {
	border-radius: 4px 4px 0 0;
}
.mlrds-list > .mlrds-group:first-child:not(:last-child) .mlrds-accordion-header[aria-expanded="true"] {
	border-radius: 4px 4px 0 0;
}
.mlrds-list > .mlrds-group:not(:first-child):not(:last-child) .mlrds-accordion-header,
.mlrds-list > .mlrds-group:not(:first-child):not(:last-child) .mlrds-accordion-header[aria-expanded="true"] {
	border-radius: 0;
}
.mlrds-list > .mlrds-group:last-child:not(:first-child) .mlrds-accordion-header {
	border-radius: 0 0 4px 4px;
}
.mlrds-list > .mlrds-group:last-child:not(:first-child) .mlrds-accordion-header[aria-expanded="true"] {
	border-radius: 0;
}
.mlrds-list > .mlrds-group:first-child:last-child .mlrds-accordion-header {
	border-radius: 4px;
}
.mlrds-list > .mlrds-group:first-child:last-child .mlrds-accordion-header[aria-expanded="true"] {
	border-radius: 4px 4px 0 0;
}
.mlrds-accordion-content {
	overflow: hidden;
	border: 1px solid #c3c4c7;
	border-top: none;
	border-radius: 0;
	background: #fff;
}
.mlrds-list > .mlrds-group:last-child .mlrds-accordion-content {
	border-radius: 0 0 4px 4px;
}
.mlrds-accordion-group--collapsed .mlrds-accordion-content {
	display: none;
}
.mlrds-markers-list { list-style: none; margin: 0; padding: 8px; }
.mlrds-marker-item {
	margin: 0;
	padding: 6px 8px;
	background: #fff;
	border: 1px solid #e0e0e0;
	border-bottom: none;
	border-radius: 0;
	cursor: pointer;
	transition: background 0.15s, border-color 0.15s, border 0.15s;
	font-size: 10px;
}
.mlrds-markers-list > .mlrds-marker-item:first-child:not(:last-child) {
	border-radius: 4px 4px 0 0;
}
.mlrds-markers-list > .mlrds-marker-item:not(:first-child):not(:last-child) {
	border-radius: 0;
}
.mlrds-markers-list > .mlrds-marker-item:last-child:not(:first-child) {
	border-radius: 0 0 4px 4px;
	border-bottom: 1px solid #e0e0e0;
}
.mlrds-markers-list > .mlrds-marker-item:first-child:last-child {
	border-radius: 4px;
	border-bottom: 1px solid #e0e0e0;
}
.mlrds-marker-item:hover,
.mlrds-marker-item.active {
	position: relative;
	z-index: 1;
	background: var(--mlrds-map-accent, #e74c3c);
	background: color-mix(in srgb, var(--mlrds-map-accent, #e74c3c) 5%, white);
	/* Borde completo: el base usa border-bottom:none entre filas */
	border: 1px solid var(--mlrds-map-accent, #e74c3c);
}
.mlrds-marker-title { display: block; font-size: 10px; font-weight: 600; line-height: 1.35; }
.mlrds-marker-location,
.mlrds-marker-parroquia {
	display: block;
	font-size: 9px;
	font-weight: 500;
	color: #667674;
	line-height: 1.3;
	margin-top: 2px;
}
.mlrds-marker-location:empty,
.mlrds-marker-parroquia:empty {
	display: none;
	margin: 0;
}
.mlrds-marker-address,
.mlrds-marker-phone { display: block; font-size: 0.9em; font-weight: 400; color: #50575e; margin-top: 4px; }
.mlrds-marker-phone-label { font-weight: 500; }
.mlrds-list-directions {
	display: inline-block;
	margin-top: 6px;
	font-size: 0.9em;
	color: #2271b1;
	text-decoration: underline;
}
.mlrds-list-directions:hover { color: #135e96; }
.mlrds-map-column {
	flex: 1 1 auto;
	display: flex;
	flex-direction: column;
	align-self: stretch;
	min-width: 0;
	min-height: 0;
}
.mlrds-tipo-filter {
	padding: 0;
	background: transparent;
	font-size: 12px;
}
.mlrds-tipo-filter--above-list {
	margin: 0 0 12px 0;
	border: 0;
	border-radius: 0;
	box-shadow: none;
}
.mlrds-tipo-filter-inner {
	display: flex;
	flex-direction: row;
	align-items: stretch;
	background: #fff;
	border: 1px solid #c3c4c7;
	border-radius: 4px;
	overflow: hidden;
	box-sizing: border-box;
}
.mlrds-tipo-filter-heading {
	flex: 0 0 auto;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 8px 10px;
	min-width: 4.5em;
	font-family: "Poppins", sans-serif;
	font-weight: 700;
	font-size: 10px;
	letter-spacing: 0.02em;
	color: #667674;
	/* Mismo fondo que tabs: 5% mapa + 95% blanco */
	background: var(--mlrds-map-accent, #e74c3c);
	background: color-mix(in srgb, var(--mlrds-map-accent, #e74c3c) 5%, white);
	border-right: 1px solid rgba(0, 0, 0, 0.2);
}
.mlrds-tipo-filter--above-list .mlrds-tipo-filter-radios {
	flex: 1 1 auto;
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	justify-content: center;
	gap: 6px;
	padding: 8px 10px;
	flex-wrap: nowrap;
}
.mlrds-center-map-wrap {
	margin: 0 0 10px 0;
}
.mlrds-center-map-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	width: 100%;
	box-sizing: border-box;
	padding: 8px 10px;
	font-family: inherit;
	font-size: 11px;
	font-weight: 600;
	color: #1d2327;
	/* Mismo fondo que tabs: 5% mapa + 95% blanco */
	background: var(--mlrds-map-accent, #e74c3c);
	background: color-mix(in srgb, var(--mlrds-map-accent, #e74c3c) 5%, white);
	border: 1px solid rgba(0, 0, 0, 0.2);
	border-radius: 6px;
	cursor: pointer;
	transition: background 0.18s ease, border-color 0.15s, color 0.15s;
}
.mlrds-center-map-btn:hover {
	background: #f0f6fc;
	border-color: #2271b1;
}
.mlrds-center-map-btn:hover .mlrds-center-map-btn-text {
	color: #135e96;
}
.mlrds-center-map-btn:focus {
	outline: 2px solid var(--mlrds-map-accent, #2271b1);
	outline-offset: 1px;
}
.mlrds-center-map-btn .fa-solid {
	font-size: 13px;
	line-height: 1;
	color: var(--mlrds-map-accent, #e74c3c);
}
.mlrds-center-map-btn:hover .fa-solid {
	filter: brightness(0.88);
}
.mlrds-center-map-btn-text {
	line-height: 1.2;
	color: #1d2327;
}
.mlrds-tipo-filter-label {
	cursor: pointer;
	font-weight: 500;
	font-size: 10px;
	color: #2c3338;
	margin: 0;
	display: flex;
	align-items: center;
	gap: 6px;
	line-height: 1.3;
}
.mlrds-tipo-filter-label input {
	margin: 0;
	flex-shrink: 0;
	vertical-align: middle;
	accent-color: var(--mlrds-map-accent, #e74c3c);
}
.mlrds-marker-item.mlrds-tipo-hidden,
.mlrds-accordion-group.mlrds-accordion-group--tipo-empty {
	display: none !important;
}
.mlrds-map-canvas {
	flex: 1 1 auto;
	align-self: stretch;
	min-height: 528px;
	height: auto;
	min-width: 0;
	position: relative;
}
.mlrds-map-canvas.leaflet-container:not(.mlrds-map--wheel-on):hover::after {
	content: "Haz clic para usar el zoom";
	position: absolute;
	top: 12px;
	left: 50%;
	transform: translateX(-50%);
	z-index: 500;
	padding: 6px 12px;
	border-radius: 6px;
	background: rgba(51, 51, 51, 0.88);
	color: #fff;
	font-family: "Poppins", sans-serif;
	font-size: 12px;
	font-weight: 600;
	line-height: 1.3;
	pointer-events: none;
	white-space: nowrap;
}
.mlrds-marker-icon { background: none !important; border: none !important; }
.mlrds-marker-icon .mlrds-pin-wrap svg { display: block; vertical-align: top; }
/* Popup del marcador (~20% más ancho: 200→240px; Leaflet limita el content ~301px → ~360px) */
.mlrds-popup { min-width: 240px; }
.mlrds-map-container .leaflet-popup-content {
	min-width: 240px;
	max-width: 360px;
}
.mlrds-popup p { margin: 0 0 8px 0; line-height: 1.4; }
.mlrds-popup p:last-child { margin-bottom: 0; }
.mlrds-popup-directions {
	color: #2271b1;
	text-decoration: underline;
}
.mlrds-popup-directions:hover { color: #135e96; }

/* Tipo 2: lista sencilla título + dirección + teléfono */
.mlrds-list-style-tipo2 {
	flex-direction: row;
}
.mlrds-list-style-tipo2 .mlrds-sidebar {
	order: 2;
	border-right: none;
	border-left: 1px solid #ddd;
}
.mlrds-list-style-tipo2 .mlrds-map-column {
	order: 1;
}
.mlrds-list-style-tipo2 .mlrds-markers-list--tipo2 {
	list-style: none;
	margin: 0;
	padding: 8px 4px;
}
.mlrds-list-style-tipo2 .mlrds-marker-item--tipo2 {
	display: block;
	margin: 0 0 18px 0;
	padding: 0;
	background: transparent;
	border: none;
	border-radius: 0;
	cursor: pointer;
	font-size: 13px;
	line-height: 1.45;
}
.mlrds-list-style-tipo2 .mlrds-marker-item--tipo2:hover,
.mlrds-list-style-tipo2 .mlrds-marker-item--tipo2.active {
	background: transparent;
	border: none;
}
.mlrds-list-style-tipo2 .mlrds-marker-tipo2-head {
	display: flex;
	align-items: flex-start;
	justify-content: center;
	gap: 8px;
	margin-bottom: 4px;
	text-align: center;
}
.mlrds-list-style-tipo2 .mlrds-marker-tipo2-pin {
	flex: 0 0 auto;
	color: var(--mlrds-map-accent, #e74c3c);
	font-size: 14px;
	line-height: 1.3;
	margin-top: 1px;
}
.mlrds-list-style-tipo2 .mlrds-marker-item--tipo2 .mlrds-marker-title {
	display: block;
	font-size: 14px;
	font-weight: 600;
	color: #5c7a3a;
	line-height: 1.3;
	text-align: center;
}
.mlrds-list-style-tipo2 .mlrds-marker-item--tipo2 .mlrds-marker-address,
.mlrds-list-style-tipo2 .mlrds-marker-item--tipo2 .mlrds-marker-phone {
	display: block;
	margin: 2px 0 0 0;
	font-size: 12px;
	font-weight: 400;
	color: #333;
	line-height: 1.45;
	text-align: left;
}
.mlrds-list-style-tipo2 .mlrds-marker-item--tipo2 .mlrds-marker-phone-label {
	font-weight: 500;
}

/* Elementor / constructores: ocupar todo el ancho del widget */
.elementor-widget-shortcode .mlrds-map-container,
.elementor-shortcode .mlrds-map-container,
.elementor-widget-text-editor .mlrds-map-container {
	width: 100%;
	max-width: 100%;
	margin-left: 0;
	margin-right: 0;
}

@media (max-width: 768px) {
	.mlrds-map-container { flex-direction: column; align-items: stretch; min-height: 0; }
	.mlrds-sidebar { flex: 0 1 auto; max-width: none; max-height: 396px; }
	.mlrds-map-column { width: 100%; }
	.mlrds-map-canvas { flex: 1 1 auto; align-self: stretch; min-height: 396px; height: 422px; }
	.mlrds-list-style-tipo2 .mlrds-sidebar {
		order: 0;
		border-left: none;
		border-right: none;
		border-bottom: 1px solid #ddd;
	}
	.mlrds-list-style-tipo2 .mlrds-map-column {
		order: 0;
	}
}
