/* Reset general */
html, body {
  height: 100%;
  margin: 0;
  padding: 0;
  font-family: Roboto, sans-serif;
}

/* Layout container */
.container {
  display: flex;
  height: 100%;
  width: 100%;
  position: relative;
}

/* Estilo del mapa */
.main {
  flex: 1;
  position: relative;
  z-index: 1;
}
#map {
  height: 100%;
  width: 100%;
  position: relative;
  z-index: 1;
}

/* Card del buscador */
.place-autocomplete-card {
  background-color: #fff;
  border-radius: 5px;
  box-shadow: rgba(0, 0, 0, 0.2) 0px 5px 10px;
  margin: 10px;
  padding: 5px;
  font-size: 16px;
  font-weight: bold;
  z-index: 10;
  position: absolute;
  top: 10px;
  left: 10px;
}

/* Autocomplete input */
gmp-place-autocomplete {
  width: 300px;
}

/* InfoWindow */
#infowindow-content .title {
  font-weight: bold;
}
#map #infowindow-content {
  display: inline;
}

/* Sidebar lateral */
.sidebar {
  position: fixed;
  top: 0;
  right: 0;
  height: 100%;
  width: 350px;
  max-width: 90%;
  background-color: #fff;
  box-shadow: -2px 0 10px rgba(0, 0, 0, 0.2);
  z-index: 9999;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transform: translateX(100%);
  transition: transform 0.3s ease-in-out;
}

.sidebar.visible {
  transform: translateX(0);
}

/* Botón de cerrar */
.sidebar .close {
  align-self: flex-end;
  font-size: 24px;
  cursor: pointer;
}

.centered-page {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
  font-family: sans-serif;
  background-color: #f9f9f9;
  margin: 0;
}

.message-box {
  background-color: white;
  padding: 2rem;
  border-radius: 12px;
  box-shadow: 0 0 15px rgba(0, 0, 0, 0.1);
  text-align: center;
}

/* Input de email */
.sidebar input[type="email"] {
  box-sizing: border-box;
  width: 100%;
  padding: 10px;
  font-size: 16px;
  margin-top: 5px;
  border-radius: 5px;
  border: 1px solid #ccc;
}

/* Botón de enviar */
.sidebar button {
  padding: 10px;
  font-size: 16px;
  background-color: #4285f4;
  color: white;
  border: none;
  border-radius: 5px;
  cursor: pointer;
}
.sidebar button:disabled {
  background-color: #a8c7ff;
  cursor: not-allowed;
}

/* Loading animación */
.loading {
  text-align: center;
  font-style: italic;
  color: #666;
}

.hidden {
  display: none;
}

/* Adaptaciones para mobile */
@media screen and (max-width: 768px) {
  .container {
    flex-direction: column;
  }

  .main {
    flex: 1;
    position: relative;
  }

  .sidebar {
    top: auto;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    height: auto;
    max-height: 80%;
    border-top-left-radius: 12px;
    border-top-right-radius: 12px;
    box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.2);
    overflow-y: auto;
    padding: 1.5rem;
    background-color: white;
    transform: translateY(100%);
    transition: transform 0.3s ease-in-out;
  }

  .sidebar.visible {
    transform: translateY(0);
  }

  .sidebar .close {
    position: absolute;
    top: 10px;
    right: 20px;
    font-size: 1.5rem;
    cursor: pointer;
  }

  gmp-place-autocomplete {
    width: 90vw;
  }

  .place-autocomplete-card {
    width: 95vw;
    left: 2.5vw;
  }
}
