/* --- BASE Y MAPA --- */
html, body {
    margin: 0;
    padding: 0;
    height: 100%;  
}

#map {
    width: 100%;
    height: 100%;
}

/* --- HERRAMIENTAS DE INTERFAZ (Buscador, Acciones, Capas) --- */
#color-picker, #search-tools, #save-load-tools, #layer-panel {
    background-color: rgba(255, 255, 255, 0.9);
    padding: 6px;
    border-radius: 6px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    font-family: Arial, sans-serif;
    font-size: 10px;
    z-index: 1000;
    position: absolute;
}

#color-picker { top: 5px; right: 675px; height: 25px; padding: 0; }
#search-tools { top: 8px; left: 205px; height: 25px; display: flex; align-items: center; gap: 8px; }
#save-load-tools { top: 8px; right: 60px; height: 25px; display: none; gap: 8px; }

#layer-panel {
    top: 60px;
    right: 10px;
    width: 180px;
}

#layer-list {
    max-height: 10vh;
    overflow-y: auto;
    padding-right: 5px;
}

/* --- ELEMENTOS DE FORMULARIO Y BOTONES --- */
#search-input {
    padding: 4px;
    border-radius: 4px;
    border: 1px solid #ccc;
    font-size: 12px;
    min-width: 180px;
}

button {
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 4px 10px;
    cursor: pointer;
    font-size: 12px;
    transition: background-color 0.3s;
}

button:hover { background-color: #0056b3; }

/* --- POPUPS Y UTILIDADES --- */
#popup {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    padding: 15px;
    background-color: #f8d7da;
    color: #de1529;
    border: 1px solid #f5c6cb;
    border-radius: 8px;
    z-index: 1000; 
    box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.1);
}


/* styles.css */
#marker-icon-palette {
    display: flex;
    flex-wrap: wrap; /* Permite que los iconos bajen al siguiente renglón si no entran */
    gap: 10px;       /* Espacio entre cada icono */
    margin-top: 5px;
    background: #f9f9f9;
    padding: 10px;
    border-radius: 4px;
}

.icon-choice {
    width: 32px;
    height: 32px;
    cursor: pointer;
    transition: transform 0.2s;
}

.icon-choice:hover {
    transform: scale(1.2); /* Efecto de aumento al pasar el mouse */
}

/* --- EL NUEVO MODAL PARA VISOR 360 (Sin Duplicados) --- */
#custom-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85);
    z-index: 2000;
    display: none;
    justify-content: center;
    align-items: center;
    padding: 0 !important;
    overflow: hidden;
}

#modal-content {
    width: 90%;
    max-width: 1200px;
    height: auto;
    aspect-ratio: 16 / 9;
    background: #000;
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.8);
    border: 1px solid #333;
}

#close-modal-btn {
    position: absolute;
    top: 10px;
    right: 15px;
    color: #fff;
    background: rgba(0, 0, 0, 0.6);
    border-radius: 50%;
    width: 35px;
    height: 35px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
    z-index: 2100;
    line-height: 1;
    transition: background 0.3s;
}

#close-modal-btn:hover {
    background: rgba(255, 0, 0, 0.6);
}

#modal-content iframe {
    display: block;
    width: 100%;
    height: 100%;
    border: none;
}