/* Reset bÃ¡sico 
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}*/

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background-color: #f9f9f9;
  color: #333;
  padding: 0px;
  line-height: 1.6;
  margin:0px;
}

/* Contenedor general 
.container {
  max-width: 650px;
  margin: 0 auto;
  background: white;
  padding: 2rem;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  padding: 90px 0px 0px 0px;
   
}
*/
h1, h2 {
  margin-bottom: 1rem;
  color: #222;
  font-weight: 600;
}

/* Formularios */
form {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  margin-bottom: 2rem;
}

input[type="text"],
input[type="email"],
input[type="password"],
textarea,
select {
  padding: 0.7rem 1rem;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 1rem;
  width: 100%;
  transition: border-color 0.2s ease;
}

input:focus,
textarea:focus,
select:focus {
  border-color: #3f51b5;
  outline: none;
}

button {
  background-color: #3f51b5;
  color: white;
  border: none;
  padding: 0.75rem 1.2rem;
  border-radius: 6px;
  font-size: 1rem;
  cursor: pointer;
  transition: background-color 0.2s ease;
  
}

button:hover {
  background-color: #303f9f;
}

a {
  color: #3f51b5;
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}

/* Mapa y buscador 
#map {
  height: 400px;
  width: 100%;
  border-radius: 8px;
  margin-bottom: 1rem;
}

#buscador {
  width: 100%;
  padding: 0.75rem 1rem;
  font-size: 1rem;
  margin-bottom: 1rem;
  border-radius: 6px;
  border: 1px solid #ccc;
}*/
#map-container {
    width: 100%;
    /*height: 130vh;  o el alto que quieras */
    position: relative; /* clave para que el buscador quede relativo al mapa */
	top: 20px;
}

.filtro-multiple {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
  margin: 1rem 0;
}

.filtro-multiple label {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0.5rem 1rem;
  border: 1px solid #ccc;
  border-radius: 20px;
  background-color: #f0f0f0;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 0.95rem;
  white-space: nowrap;
}

.filtro-multiple input[type="checkbox"] {
  display: none;
}

.filtro-multiple input[type="checkbox"]:checked + span,
.filtro-multiple label:has(input[type="checkbox"]:checked) {
  background-color: #007bff;
  color: white;
  border-color: #007bff;
}

.filtro-multiple button {
  background-color: #3f51b5;
  color: white;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-size: 0.95rem;
  cursor: pointer;
  transition: background-color 0.2s ease;
  white-space: nowrap;
}

.filtro-multiple button:hover {
  background-color: #303f9f;
}

@media (max-width: 600px) {
  .filtro-multiple {
    justify-content: space-between;
    gap: 0.4rem;
  }

  .filtro-multiple label,
  .filtro-multiple button {
    flex: 1 1 auto;
    text-align: center;
    font-size: 0.85rem;
    padding: 0.4rem 0.5rem;
  }
}

/* Modal */
.modal {
  position: fixed;
  z-index: 1000;
  left: 0; top: 0;
  width: 100%; height: 100%;
  background-color: rgba(0,0,0,0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.modal-content {
  background-color: white;
  padding: 2rem;
  border-radius: 10px;
  max-width: 600px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
}

.close {
  position: absolute;
  top: 12px;
  right: 20px;
  font-size: 1.5rem;
  cursor: pointer;
  color: #333;
}

/* Responsive */
@media (max-width: 768px) {
  .container {
        
        padding: 50px 0px 0px 0px;
  
  }

  .modal-content {
    padding: 1rem;
  }

  form {
    gap: 0.6rem;
  }

  button {
    font-size: 0.95rem;
  }
}

@media (max-width: 480px) {
  h1, h2 {
    font-size: 1.3rem;
  }

 #map {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: calc(100vh - 80px + 10px); /* ocupa toda la altura menos la botonera y la cabecera */
  z-index: 0; /* por debajo de la botonera */

}

  .filtro-multiple {
    flex-direction: column;
    gap: 8px;
  }

  .modal-content {
    max-width: 100%;
  }
}

/* Botonera inferior */
.botonera-inferior {
  position: fixed;
  bottom: 10px; /* distancia desde abajo */
  left: 50%;
  transform: translateX(-50%);
  background: rgba(255, 255, 255, 0.95);
  border-radius: 12px;
  padding: 5px 10px;
  display: flex;
  gap: 10px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.2);
  z-index: 1000;
  align-items: center;
}

.botonera-inferior label {
  display: flex;
  align-items: center;
  cursor: pointer;
  font-size: 16px;
  position: relative;
}

.botonera-inferior label input[type="checkbox"] {
  display: none; /* ocultar checkbox real */
}

.botonera-inferior .checkmark {
  font-size: 18px;
  color: #999; /* gris inicial */
  margin-left: 4px;
  transition: color 0.3s, transform 0.2s;
}

.botonera-inferior label input[type="checkbox"]:checked + span + .checkmark {
  color: #4CAF50; /* verde al marcar */
  transform: scale(1.2);
}

.botonera-inferior span {
  display: flex;
  align-items: center;
}



/* BotÃ³n de ubicaciÃ³n */


#btnUbicacion, #btnCategoria {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: none;
    background: white;
   /* box-shadow: 0 2px 6px rgba(0,0,0,0.25);*/
    font-size: 22px;
    color: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: 0.2s ease;
}

#btnUbicacion:hover {
    background: #f0f0f0;
    transform: scale(1.05);
}

#btnUbicacion:active {
    transform: scale(0.95);
    background: #e5e5e5;
}



/* cabecera */

.cabecera-app {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: #ffffff;
  border-bottom: 1px solid #ccc;
  padding: 0.6rem 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 1000;
}

.izquierda {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.saludo {
  font-size: 1rem;
  font-weight: 600;
  color: #333;
}

.slogan {
    margin-top: 6px;
    font-size: 0.65rem;
    font-weight: 500;
    letter-spacing: 0.2px;
    color: #6b7280; /* gris suave */
}


.icono-btn {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: #333;
}

/* MenÃº desplegable tipo app */
.menu-dropdown {
  position: absolute;
  top: 3.2rem;
  right: 1rem;
  background: white;
  border: 1px solid #ddd;
  border-radius: 6px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  display: none;
  flex-direction: column;
  min-width: 180px;
  z-index: 1100;
}

.menu-dropdown a {
  padding: 0.7rem 1rem;
  border-bottom: 1px solid #eee;
  text-decoration: none;
  color: #333;
  font-size: 0.95rem;
}

.menu-dropdown a:hover {
  background: #f5f5f5;
}

.menu-dropdown a:last-child {
  border-bottom: none;
}

/* Modo responsive: oculta nada, ya que ya es compacto */
/* Formulario flotante */
.formulario-lugar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #fff;
    padding: 20px;
    box-shadow: 0 -4px 12px rgba(0,0,0,0.15);
    border-top-left-radius: 14px;
    border-top-right-radius: 14px;
    z-index: 9999;
    display: none;
    max-height: 70vh;
    overflow-y: auto;
}

/* BotÃ³n cerrar (opcional) */
.formulario-lugar .cerrar-form {
    position: absolute;
    top: 8px;
    right: 12px;
    font-size: 22px;
    cursor: pointer;
}

.password-wrapper {
    position: relative;
}

.password-wrapper input {
    padding-right: 35px; /* espacio para el ojo */
}

.toggle-password {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    font-size: 18px;
    user-select: none;
}
.avatar-circulo{
  width:40px; height:40px; border-radius:50%; object-fit:cover;
}

/* CONTENEDOR GENERAL */
.perfil-contenedor {
    max-width: 420px;
    margin: 30px auto;
    padding: 20px;
    font-family: Arial, sans-serif;
    color: #333;
}

/* TITULO */
.perfil-contenedor h2 {
    text-align: center;
    margin-bottom: 20px;
    font-weight: 600;
}

/* TARJETA */
.tarjeta-perfil {
    background: #ffffff;
    padding: 20px;
    border-radius: 14px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    display: flex;
    align-items: center;
    gap: 20px;
}

/* AVATAR */
.tarjeta-perfil img {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: 0 0 6px rgba(0,0,0,0.15);
}

.avatar-placeholder {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    background: #eee;
    color: #777;
    font-size: 14px;
}

/* DATOS */
.datos p {
    margin: 6px 0;
    font-size: 15px;
}

/* BOTONES / ACCIONES */
.acciones {
    margin-top: 25px;
    display: flex;
    justify-content: space-between;
}

.acciones a {
    padding: 8px 14px;
    background: #0066ff;
    color: white;
    border-radius: 6px;
    font-size: 14px;
    text-decoration: none;
    transition: 0.2s;
}

.acciones a:hover {
    background: #004bcc;
}

/* buscador de lugares*/


.buscador-container {
    position: absolute;
    top: 10px;
    left: 44%;
    transform: translateX(-50%);
    z-index: 999;
    width: 75%;
    max-width: 300px;
}

#buscador {
    width: 90%;
    padding: 0.6rem 1rem;
    border-radius: 30px;
    border: none;
    background-color: #fff;
    box-shadow: 0 2px 6px rgba(0,0,0,0.3);
    font-size: 16px;
    outline: none;
}
.frase-cabecera {
    text-align: center;
    font-size: 0.95rem;
    color: #555;
    margin: 8px 0;
    font-style: italic;
}

/* ==================================== */
/* 1. MODAL FICHA (OVERLAY + CONTENEDOR) */
/* ==================================== */
/* Overlay de fondo */
/* Este es el contenedor padre que definiste en el PHP */
#modalValoracion {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 99999;
    display: none; /* Se cambia a flex desde JS */
    align-items: flex-end; /* Empuja el contenido al fondo (móvil) */
    justify-content: center;
	
}

/* Cuando el modal está abierto */
#modalValoracion[style*="display: block"],
#modalValoracion[style*="display: flex"] {
    display: flex !important; /* Forzamos flex para alinear abajo */
}
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 99998;
    backdrop-filter: blur(2px);
}

/* El Bottom Sheet */
.app-bottom-sheet {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 600px; /* Tamaño máximo en PC */
    background: white;
    border-top-left-radius: 20px;
    border-top-right-radius: 20px;
    z-index: 9999;
    box-shadow: 0 -5px 20px rgba(0,0,0,0.2);
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
    from { transform: translate(-50%, 100%); }
    to { transform: translate(-50%, 0); }
}

/* Botón cerrar X */
.modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: #aca8a8;
    border: none;
    width: 30px;
    height: 35px;
    border-radius: 50%;
    font-size: 18px;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Tirador (Handle) móvil */
.handle {
    width: 40px;
    height: 5px;
    background: #ccc;
    border-radius: 10px;
    margin: 10px auto;
    flex-shrink: 0;
    cursor: pointer;
}

/* Contenedor de scroll */
.sheet-content {
    overflow-y: auto;
    padding: 0 20px 30px 20px;
    -webkit-overflow-scrolling: touch;
}

/* Elementos internos */
/* Contenedor del avatar para asegurar centrado y sombra */
.profile-avatar-center {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 15px;
}

/* Estilo para la imagen y el avatar por defecto */
.profile-avatar-center img, 
.default-avatar {
    width: 80px;  /* Un poco más grande para que destaque */
    height: 80px;
    border-radius: 50%;
    margin: 0 auto;
    
    /* LA CLAVE: Evita deformación */
    object-fit: cover; 
    object-position: center;
    
    /* Estética: Borde fino y sombra suave */
    border: 3px solid #ffffff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: transform 0.3s ease;
}

/* Efecto opcional al pasar el ratón */
.profile-avatar-center img:hover {
    transform: scale(1.05);
}

/* Estilo específico para el avatar con inicial (cuando no hay foto) */
.default-avatar {
    background: linear-gradient(135deg, #007bff, #0056b3);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: bold;
    text-transform: uppercase;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.2);
}

.place-name { text-align: center; font-size: 22px; margin: 10px 0; }
.media-summary { display: flex; justify-content: space-around; background: #f8f9fa; padding: 10px; border-radius: 10px; }
.media-chip { font-size: 14px; }

.hidden { display: none; }
.toggle-button { 
    width: 100%; display: flex; justify-content: space-between; 
    background: none; border: none; padding: 10px 0; cursor: pointer; color: #007bff;
}

.app-select, .app-textarea {
    width: 100%; padding: 8px; border: 1px solid #ddd; border-radius: 8px; margin-top: 5px;
}

.app-button.primary {
    width: 100%; padding: 12px; background: #007bff; color: white; border: none; border-radius: 8px; margin-top: 10px; font-weight: bold;
}

.comment-card { background: #f1f1f1; padding: 10px; border-radius: 8px; margin-bottom: 10px; }
.comment-author { font-size: 12px; color: #666; text-align: right; }


/* ============================
   BOTÓN FLOTANTE DEL ASISTENTE
============================ */
#btnAsistente {
    position: fixed;
    bottom: 200px;
    right: 8px;
    z-index: 9999;

    background: transparent;
    border: none;
    padding: 0;
    cursor: pointer;

    width: 46px;
    height: 46px;

    filter: drop-shadow(0 6px 12px rgba(0,0,0,.35));
    transition: transform .2s ease, filter .2s ease;
}

#btnAsistente:hover {
    transform: scale(1.15);
}

/* Icono dentro del botÃ³n */
.icono-chat {
    width: 100%;
    height: 100%;
    fill: #ffffff; /* color del globo */
}

.icono-chat .punto {
    fill: #625f5f; /* color de los puntos */
}

/* ============================
   CONTENEDOR ASISTENTE
============================ */
#asistente {
    position: fixed;
    bottom: 90px;
    right: 20px;
    width: 320px;
    max-height: 70vh;
    display: flex;
    flex-direction: column;
    border-radius: 16px;
    background: rgba(255,255,255,0.1);
    backdrop-filter: blur(10px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.25);
    overflow: hidden;
    z-index: 9999;
}

#asistente.oculto {
    display: none;
}

/* ============================
   CABECERA
============================ */
.asistente-header {
    padding: 10px 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(0,0,0,0.15);
    color: #fff;
    font-weight: 600;
}

.asistente-header button {
    background: none;
    border: none;
    color: #fff;
    font-size: 18px;
    cursor: pointer;
}

/* ============================
   CHAT
============================ */
#asistenteChat {
    flex: 1;
    padding: 12px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* ============================
   BURBUJAS DE MENSAJES
============================ */
.mensaje {
    max-width: 80%;
    padding: 10px 14px;
    border-radius: 18px;
    font-size: 14px;
    line-height: 1.4;
    animation: fadeIn .2s ease-in-out;
}

/* Mensajes del bot */
.mensaje.bot {
    align-self: flex-start;
    background: rgba(255,255,255,0.85);
    color: #222;
    border-bottom-left-radius: 4px;
}

/* Mensajes del usuario */
.mensaje-user {
    align-self: flex-end;
    background: linear-gradient(135deg, #4f8cff, #3b6eea);
    color: #fff;
    border-bottom-right-radius: 4px;
}

/* Mensajes tipo opciones */
.mensaje.opciones {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 6px;
}

/* ============================
   BOTONES DE OPCIONES
============================ */
.btn-opcion {
    border: none;
    background: #eef1ff;
    color: #333;
    padding: 8px 12px;
    border-radius: 16px;
    cursor: pointer;
    font-size: 13px;
    transition: all .2s ease;
}

.btn-opcion:hover {
    background: #4d5aa2;
    color: #fff;
    transform: translateY(-1px);
}

/* Alternativa de contenedor de opciones */
.asistente-opciones {
    display: flex;
    gap: 6px;
    padding: 8px;
    flex-wrap: wrap;
}

/* Botones dentro de contenedor de opciones */
.asistente-opciones button {
    flex: 1;
    padding: 6px 10px;
    border-radius: 14px;
    border: none;
    background: rgba(255,255,255,0.85);
    cursor: pointer;
    font-size: 13px;
}

.asistente-opciones button:hover {
    background: #fff;
}

/* ============================
   INPUT DE TEXTO
============================ */
.asistente-input {
    display: flex;
    gap: 6px;
    padding: 8px;
    background: rgba(0,0,0,0.15);
    position: relative;
}

.asistente-input input {
    flex: 1;
    padding: 8px 12px;
    border-radius: 14px;
    border: none;
    outline: none;
}

.asistente-input button {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    border-radius: 50%;
    border: none;
    width: 36px;
    height: 36px;
    background: #4f8cff;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
}

/* ============================
   ANIMACIÃ“N
============================ */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(4px); }
    to   { opacity: 1; transform: translateY(0); }
}

.welcome-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.65);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.welcome-modal {
    background: #fff;
    width: 90%;
    max-width: 380px;
    padding: 22px;
    border-radius: 18px;
    text-align: center;
    animation: pop .3s ease;
}

.welcome-modal h2 {
    margin: 0 0 10px;
}

.welcome-modal p {
    font-size: .95em;
    line-height: 1.5;
}

.welcome-modal button {
    margin-top: 16px;
    padding: 10px 18px;
    border: none;
    background: #29336c;
    color: #fff;
    border-radius: 12px;
    font-size: 1em;
    cursor: pointer;
}

@keyframes pop {
    from { transform: scale(.9); opacity: 0 }
    to { transform: scale(1); opacity: 1 }
}
