/* Contenedor Principal */
#dma-map-wrapper {
    position: relative;
    width: 100%;
    margin: 30px 0;
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
   
}

/* Modo Pantalla Completa */
#dma-map-wrapper:fullscreen {
    border-radius: 0;
    margin: 0;
}

/* Panel de Controles (Buscador y Filtros) */
#dma-map-controls {
    display: grid;
    grid-template-columns: 3fr 3fr 2fr 2fr;
    gap: 12px;
    padding: 16px 20px;
    background: #063B52;
}

#dma-map-controls input, 
#dma-map-controls select {
    width: 100%;
    padding: 12px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-size: 16px;
    outline: none;
    box-sizing: border-box;
}

.don-input-group select,
#dma-state-filter {
  /* 1. Deshabilita el estilo nativo de Apple/Safari */
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;

  /* 2. Inyecta una flecha personalizada (del color Azul Petróleo #063B52) */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23063B52' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 16px;
  
  /* 3. Asegura que el texto no se encime con la nueva flecha */
  padding-right: 40px; 
  
  /* Mantiene tu diseño original */
  background-color: #f8fafc;
  opacity: 1; /* Corrige un bug de opacidad en iOS */
}

.dma-control-btn {
    background: #F7931E;
    color: #fff;
    border: none;
    padding: 8px;
    border-radius: 8px;
    font-weight: 700;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.2s, transform 0.1s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}
.dma-control-btn:hover { background: #e07f12; }
.dma-control-btn:active { transform: scale(0.98); }
.btn-outline { background: rgba(255, 255, 255, 0.1); border: 1px solid rgba(255,255,255,0.3); }
.btn-outline:hover { background: rgba(255, 255, 255, 0.2); }

/* Mapa */
#dma-map {
    width: 100%;
    height: 600px;
    z-index: 1; /* Para no encimar sobre el header de Ghost */
}
#dma-map-wrapper:fullscreen #dma-map {
    height: calc(100vh - 75px);
}

/* Marcador Personalizado */
.dma-custom-marker {
    background: #F5A22B;
    border: 3px solid #fff;
    border-radius: 50%;
    box-shadow: 0 3px 8px rgba(0,0,0,0.4);
    transition: transform 0.2s;
}
.dma-user-marker {
    background: transparent;
    border: none;
    font-size: 26px;
    text-align: center;
    line-height: 26px;
    filter: drop-shadow(0 3px 4px rgba(0,0,0,0.3));
}

/* Estilos de la Ficha (Popup) Leaflet */
.leaflet-popup-content-wrapper {
    border-radius: 14px !important;
    padding: 0 !important;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2) !important;
}
.leaflet-popup-content {
    margin: 0 !important;
    width: 280px !important;
}
.leaflet-popup-close-button {
    color: #fff !important;
    padding: 6px !important;
}
.dma-popup-header {
    background: #063B52;
    color: #fff;
    padding: 20px 16px;
    text-align: center;
    border-bottom: 4px solid #EE7A2C;
}
.dma-popup-header h3 {
    margin: 0;
    font-size: 19px;
    font-weight: 800;
    line-height: 1.2;
}
.dma-popup-body {
    padding: 16px;
    text-align: center;
}
.dma-popup-body p {
    margin: 0 0 6px 0;
    font-size: 14px;
    color: #475569;
}
.dma-popup-body p strong {
    color: #063B52;
    font-weight: 700;
}
.dma-popup-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 18px;
}
.dma-popup-actions a {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none !important;
    transition: all 0.2s ease;
}
.btn-ruta { background: #EE7A2C; color: #fff !important; }
.btn-ruta:hover { background: #F5A22B; }
.btn-hoteles { background: #063B52; color: #fff !important; }
.btn-hoteles:hover { background: #042a3b; }
.btn-experiencias { background: #f1f5f9; color: #063B52 !important; border: 1px solid #cbd5e1; }
.btn-experiencias:hover { background: #e2e8f0; }

.don-btn-icon-map {
	font-size:2.5em;
	margin-top:-4px;		
}	
.don-btn-icon-map2 {
	font-size:1.7em;
	margin-top:-2px;	
}

/* Responsivo */
@media(max-width: 900px) {
    #dma-map-controls { grid-template-columns: 1fr 1fr; }
}
@media(max-width: 500px) {
    #dma-map-controls { grid-template-columns: 1fr; }
    #dma-map { height: 500px; }
	
	.don-btn-icon-map {
		font-size:2em;
		margin-top:-9px;	
	}
	
	.don-btn-icon-map2 {
		font-size:2em;
		margin-top:-2px;
	}
}

/* Pseudo-Fullscreen para iOS Safari (iPhone) */
.dma-ios-fullscreen {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100dvh !important; /* dvh se adapta dinámicamente a la barra de Safari */
    z-index: 999999 !important;
    margin: 0 !important;
    border-radius: 0 !important;
}

.dma-ios-fullscreen #dma-map {
    height: calc(100dvh - 75px) !important;
}

.leaflet-control-attribution a,
.leaflet-control-attribution span {
   display: none;
}


/* ---- Estilos para el Modal de "Sin Resultados" ---- */
.dma-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(6, 59, 82, 0.7);
    z-index: 10000;
    display: none; /* Oculto por defecto */
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
}

.dma-modal-content {
    background: #fff;
    border-radius: 16px;
    width: 80%;
    max-width: 320px;
    overflow: hidden;
    box-shadow: 0 15px 40px rgba(0,0,0,0.3);
    text-align: center;
    animation: fadeInModal 0.3s ease-out forwards;
}

@keyframes fadeInModal {
    from { opacity: 0; transform: scale(0.9); }
    to { opacity: 1; transform: scale(1); }
}

.dma-modal-header {
    background: #063B52;
    padding: 24px 20px;
    border-bottom: 4px solid #EE7A2C;
}

.dma-modal-header svg {
    width: 48px;
    height: 48px;
    stroke: #EE7A2C;
    margin-bottom: 12px;
}

.dma-modal-header h3 {
    margin: 0;
    color: #fff;
    font-size: 20px;
    font-weight: 800;
}

.dma-modal-body {
    padding: 24px 20px;
}

.dma-modal-body p {
    color: #475569;
    font-size: 15px;
    margin: 0 0 20px 0;
    line-height: 1.5;
}

.dma-modal-btn {
    background: #EE7A2C;
    color: #fff;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    width: 100%;
    transition: background 0.2s;
}

.dma-modal-btn:hover {
    background: #F5A22B;
}