/* Estilos generales */
html, body {
  padding: 0;
  margin: 0;
  height: 100%;
  width: 100%;
  font-family: Arial, sans-serif;
  overflow: hidden;
  overflow-wrap: break-word;
}

/* Estilo del banner */
#banner {
  display: flex;
  align-items: center;
  background-color: #1a1a1a;
  color: white;
  padding: 10px 20px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

#banner img {
  width: 80px;
  height: 80px;
  object-fit: contain;
  margin-right: 15px;
}

#banner-content h1 {
  margin: 0;
  font-size: 24px;
}

#banner-content p {
  margin: 0;
  font-size: 16px;
  color: #b0b0b0;
}

#bufferPanel {
  position: relative;
  display: none;
}

/* Estilos del mapa */
#viewDiv {
  height: calc(100% - 100px); /* Ajuste para dejar espacio al banner */
  width: 80%;
  position: absolute;
  right: 0;
}

/* Estilo del panel de buffer */
.fc-daygrid-day-frame {
  cursor: pointer;
}

.station-collapsible {
  margin-top: 10px;
}

calcite-accordion-item {
  margin-bottom: 5px;
}

#sidebar {
  height: 100%;
  width: 20%;
  position: absolute;
  left: 0;
  color: #ededed;
  z-index: 99;
  transition: width 0.5s;
  overflow: auto;
  background-color: #1a1a1a;
}

#topbar {
  background: #2b2b2b;
  padding: 10px;
}

.action-button {
  font-size: 16px;
  background-color: transparent;
  border: 1px solid #d3d3d3;
  color: #9f9f9f;
  height: 32px;
  width: 32px;
  text-align: center;
  box-shadow: 0 0 1px rgba(0, 0, 0, 0.3);
}

.action-button:hover,
.action-button:focus {
  background: #0079c1;
  color: #e4e4e4;
}

.active {
  background: #0079c1;
  color: #e4e4e4;
}

#horizontal-widget-container {
  display: flex;
  gap: 8px;
  padding: 0px;
  background-color: rgba(255, 255, 255, 0);
  border-radius: 6px;
  position: absolute;
  left: 50px;
  top: 0%;
}

.esri-collapse__icon {
  color: white !important;
}

.esri-view-width-xlarge .esri-popup__main-container,
.esri-view-width-large .esri-popup__main-container,
.esri-view-width-medium .esri-popup__main-container
{
  max-height: 400px !important;
  max-width: 300px !important;
}

/* Estilos del overlay */
#bienvenida-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.9); /* Un poco más oscuro para mejor contraste */
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  font-family: sans-serif;
}

/* Contenedor central para que no ocupe toda la pantalla en PC */
.comunicado-container {
  background-color: #1e1e1e;
  max-width: 650px;
  width: 90%;
  max-height: 85vh;
  padding: 2rem;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.5);
  overflow-y: auto; /* Por si la pantalla es muy pequeña, activa scroll interno */
  box-sizing: border-box;
}

/* Control de páginas */
.pag-comunicado {
  display: none;
  flex-direction: column;
  align-items: center;
}

.pag-comunicado.activa {
  display: flex;
}

.pag-comunicado h2 {
  margin-top: 0;
  color: #ffcc00; /* Color llamativo para el título */
  text-align: center;
}

/* Mantiene los espacios y saltos de línea del texto original */
.texto-comunicado {
  white-space: pre-line; 
  text-align: justify;
  font-size: 16px;
  line-height: 1.5;
  margin-bottom: 1.5rem;
}

/* Estilo de los botones */
.btn-overlay {
  background-color: #007bff;
  color: white;
  border: none;
  padding: 10px 25px;
  font-size: 16px;
  font-weight: bold;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.2s;
}

.btn-overlay:hover {
  background-color: #0056b3;
}

#bienvenida-overlay img {
  max-width: 200px;
  margin-bottom: 1rem;
}

#bienvenida-overlay p {
  max-width: 800px;
  font-size: 1rem;
  line-height: 1.6;
  margin: 0 auto 2rem;
  white-space: pre-line;
}

#btn-aceptar {
  padding: 0.6rem 1.5rem;
  font-size: 1rem;
  font-weight: bold;
  color: #fff;
  background-color: #007bff;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  transition: background-color 0.3s;
}

#btn-aceptar:hover {
  background-color: #0056b3;
}

/* Estilos para el panel localizador de coordenadas */
.locator-panel-container {
  width: 340px;
  max-width: 100%;
  padding: 5px;
  background-color: #2b2b2b;
  border-radius: 4px;
  box-sizing: border-box;
}

.locator-panel-container span {
  font-weight: bold;
  color: #ededed;
  margin: 0 4px;
}

.locator-input {
  background-color: #1a1a1a;
  border: 1px solid #444;
  color: #fff;
  padding: 6px 8px;
  border-radius: 4px;
  width: 100%;
  box-sizing: border-box;
  font-family: inherit;
  font-size: 14px;
  margin-top: 4px;
  margin-bottom: 8px;
}

.locator-input:focus {
  border-color: #007bff;
  outline: none;
}

.locator-input.error {
  border-color: #ff4d4d;
  box-shadow: 0 0 3px #ff4d4d;
}

/* Botón hamburguesa para la barra lateral en móviles */
.sidebar-toggle-btn {
  display: none;
  background: transparent;
  border: none;
  color: white;
  font-size: 24px;
  cursor: pointer;
  margin-right: 12px;
  padding: 4px 8px;
  border-radius: 4px;
  outline: none;
  transition: background-color 0.2s;
}

.sidebar-toggle-btn:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

/* Reglas de diseño responsivo */
@media (max-width: 768px) {
  .sidebar-toggle-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  /* Reducir altura del banner y padding en móviles */
  #banner {
    padding: 8px 12px;
    height: 56px;
    box-sizing: border-box;
  }

  #banner img {
    width: 40px;
    height: 40px;
    margin-right: 10px;
  }

  #banner-content h1 {
    font-size: 13px;
    line-height: 1.2;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
  }

  #banner-content p {
    font-size: 10px;
  }

  /* Ajustar la vista del mapa para ocupar 100% de la pantalla */
  #viewDiv {
    width: 100%;
    height: calc(100% - 56px); /* 100% menos la altura del banner de móvil */
    position: absolute;
    top: 56px;
    right: 0;
  }

  /* Convertir el sidebar en un drawer deslizable (off-screen overlay) */
  #sidebar {
    width: 290px;
    max-width: 80%;
    position: fixed;
    top: 56px; /* Empieza justo debajo del banner de móvil */
    left: -290px; /* Escondido a la izquierda */
    height: calc(100% - 56px);
    z-index: 9999;
    box-shadow: 4px 0 12px rgba(0, 0, 0, 0.6);
    transition: left 0.3s ease;
  }

  #sidebar.open {
    left: 0; /* Deslizar hacia adentro */
  }

  /* Overlay de bienvenida comunicado responsive */
  .comunicado-container {
    width: 95%;
    padding: 1.2rem;
    max-height: 90vh;
  }

  .comunicado-container h2 {
    font-size: 18px;
    margin-bottom: 0.5rem;
  }

  .texto-comunicado {
    font-size: 13px;
    line-height: 1.4;
    margin-bottom: 1rem;
  }

  .btn-overlay {
    padding: 8px 16px;
    font-size: 14px;
  }

  /* Reubicar y compactar el contenedor horizontal de widgets en pantallas pequeñas */
  #horizontal-widget-container {
    left: 10px;
    top: 10px;
    gap: 4px;
  }
}



