html, body {
    margin: 0;
    padding: 0;
    height: 100%;  
}

#panorama, .pnlm-container {
    height: 85vh !important;
    width: 100%;
}

#map {
    width: 100%;
    height: 100%;
}

#color-picker, #search-tools, #save-load-tools {
    background-color: rgba(255, 255, 255, 0.9);
    padding: 0px;
    border-radius: 6px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    font-family: Arial, sans-serif;
    font-size: 10px;
}

#color-picker {
    position: absolute;
    top: 5px;
    right: 675px;
    z-index: 1000;
    height: 25px;
}

#search-tools {
    position: absolute;
    top: 8px;
    left: 205px;
    z-index: 1000;
    display: flex;
    align-items: center;
    gap: 8px;
    height: 25px;
    padding: 6px;
}

#save-load-tools {
    position: absolute;
    top: 8px;
    right: 60px; /* Aumentamos el valor para dejar más espacio */
    z-index: 1000;
    display: none; 
    gap: 8px;
    height: 25px;
    padding: 6px;
}

#search-input {
    padding: 4px;
    border-radius: 4px;
    border: 1px solid #ccc;
    margin-bottom: 5px;
    width: 100%;
    box-sizing: border-box;
    font-size: 12px;
    flex: 1;
    min-width: 180px;
}

button {
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 4px 10px;
    cursor: pointer;
    font-family: Arial, sans-serif;
    font-size: 12px;
    transition: background-color 0.3s;
    margin-right: 5px;
}

button:hover {
    background-color: #0056b3;
}

#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);
}

#popup.show {
    display: block;
}

.modal-img-adaptada {
    max-width: 100%;
    max-height: 90vh;
    width: auto;
    height: auto;
    padding: 0 !important;
    display: block;
    margin: auto;
    object-fit: contain;
}


.gm-style-iw-ch {
    padding: 0 !important; /* Eliminamos todo el padding del contenedor principal */
}

.gm-style-iw-d {
    overflow: auto !important; /* Aseguramos el scroll si el contenido es grande */
    padding: 10px 10px 10px 0px; /* Aplicamos nuestro propio padding al contenido interno */
}



/* ▼▼▼ REGLAS CSS AÑADIDAS ▼▼▼ */
.icon-choice {
    cursor: pointer;
    margin: 2px;
    padding: 2px;
    border: 2px solid transparent;
    border-radius: 5px;
    transition: all 0.2s ease-in-out;
}

.icon-choice:hover {
    transform: scale(1.2);
    border-color: #007bff;
}

.icon-choice.selected {
    border-color: #28a745;
    background-color: #e9f5e9;
    transform: scale(1.2);
}

/* En styles.css, añádelo al final */

#layer-panel {
    position: absolute;
    top: 60px;
    right: 10px;
    background-color: rgba(255, 255, 255, 0.9);
    padding: 10px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    font-family: Arial, sans-serif;
    width: 180px;
    z-index: 1000;
}

#layer-panel h4 {
    margin-top: 0;
    margin-bottom: 10px;
    text-align: center;
}

.layer-item {
    display: block;
    margin-bottom: 8px;
    cursor: pointer;
}

.layer-item input {
    margin-right: 8px;
}

#layer-list {
    max-height: 10vh; /* Altura máxima del 30% de la ventana */
    overflow-y: auto; /* Muestra una barra de scroll si es necesario */
    padding-right: 5px; /* Pequeño espacio para la barra de scroll */
}

.layer-item.disabled {
    color: #888;
    font-style: italic;
}

/* --- ESTILOS PARA NUESTRO NUEVO MODAL PERSONALIZADO --- */

#custom-modal {
    display: none; /* Oculto por defecto */
    position: fixed; /* Se pega a la ventana del navegador */
    z-index: 2000;   /* Se asegura de que esté por encima de todo */
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6); /* Fondo semi-transparente */
    justify-content: center;
    align-items: center;
}

/* En styles.css */

#modal-content {
    width: 70vw;
    height: 80vh;
    position: relative; /* ¡MUY IMPORTANTE! Para que la "X" se posicione dentro de él */
    background-color: white;
    border-radius: 8px;
    padding: 0;
    overflow: hidden;

     /* --- LÍNEAS A AÑADIR --- */
    padding: 10px; /* Espacio interior blanco. ¡Puedes cambiar este valor! */
    box-sizing: border-box; /* Asegura que el padding no rompa el tamaño total */
}

#close-modal-btn {
    position: absolute;
    top: 10px;   /* 10px desde el borde superior de la imagen */
    right: 10px;  /* 10px desde el borde derecho de la imagen */

    /* Estilos visuales */
    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: 30px;
    font-weight: bold;
    cursor: pointer;
    z-index: 2001; /* Se asegura que esté sobre el iframe */
    line-height: 1;
}