
/* -----------------------------------------------
   Estilos Generales para CE6APR Satélite 3D (CesiumJS)
-------------------------------------------------- */

html, body, #cesiumContainer {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  font-family: Arial, sans-serif;
  overflow: hidden;
}

/* -----------------------------------------------
   Panel superior izquierdo con selector de satélite
-------------------------------------------------- */
#panel {
  position: absolute;
  top: 10px;
  left: 10px;
  background: rgba(0, 0, 0, 0.6);
  color: white;
  padding: 10px 15px;
  border-radius: 8px;
  z-index: 999;
  font-size: 14px;
}

#selector {
  margin-left: 8px;
  padding: 4px;
  font-size: 14px;
  border-radius: 4px;
  border: none;
}

/* -----------------------------------------------
   Info flotante inferior izquierda
-------------------------------------------------- */
#info {
  position: absolute;
  bottom: 10px;
  left: 10px;
  background: rgba(0, 0, 0, 0.6);
  color: white;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 13px;
  z-index: 999;
}

/* -----------------------------------------------
   Controles de cámara (opcional)
-------------------------------------------------- */
#controles-camara {
  position: absolute;
  bottom: 20px;
  left: 20px;
  z-index: 1000;
  background: rgba(0,0,0,0.5);
  padding: 10px;
  border-radius: 8px;
}

#controles-camara button {
  margin: 4px;
  font-size: 20px;
  padding: 6px 10px;
  cursor: pointer;
}

/* -----------------------------------------------
   Estilos para formularios flotantes centrados
-------------------------------------------------- */
.formulario-flotante {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.6);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

.formulario-flotante form {
  background: white;
  padding: 30px;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
  max-width: 400px;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.formulario-flotante label {
  font-weight: bold;
}

.formulario-flotante input[type="text"],
.formulario-flotante input[type="password"] {
  padding: 8px;
  border-radius: 6px;
  border: 1px solid #ccc;
  width: 100%;
}

.formulario-flotante input[type="submit"] {
  padding: 10px;
  background-color: #0059b3;
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-weight: bold;
}

.formulario-flotante input[type="submit"]:hover {
  background-color: #003d80;
}

/* -----------------------------------------------
   Modal centrado (uso general)
-------------------------------------------------- */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.modal-contenido {
  background-color: #f0f0f0;
  padding: 30px;
  border-radius: 15px;
  width: 320px;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.6);
  text-align: center;
}

.modal-contenido h2 {
  margin-bottom: 20px;
  font-size: 24px;
  color: #333;
}

.modal-contenido label {
  display: block;
  margin: 10px 0 5px;
  text-align: left;
  font-weight: bold;
}

.modal-contenido input {
  width: 100%;
  padding: 8px;
  margin-bottom: 15px;
  border: 1px solid #ccc;
  border-radius: 5px;
}

.modal-contenido button {
  background-color: #003b73;
  color: white;
  border: none;
  padding: 10px 0;
  border-radius: 6px;
  width: 100%;
  cursor: pointer;
  font-size: 16px;
}

/* -----------------------------------------------
   Modal lateral izquierdo (para pasadas del satélite)
-------------------------------------------------- */
.modal-lateral {
  position: fixed;
  top: 0;
  left: 0;
  width: 300px;
  height: 100%;
  background-color: rgba(30, 30, 30, 0.95);
  color: white;
  overflow-y: auto;
  padding: 20px;
  box-shadow: 3px 0 10px rgba(0,0,0,0.5);
  display: none;
  z-index: 999;
  backdrop-filter: blur(6px);
}

/* -----------------------------------------------
   Mostrar/Ocultar contraseña (modificado)
-------------------------------------------------- */
.campo-password {
  position: relative;
}

.campo-password input {
  width: 100%;
  padding-right: 8px; /* ← antes: 1px — ahora suficiente espacio para el icono */
}

.toggle-password {
  position: absolute;
  top: 55%;
  right: 5px;
  transform: translateY(-50%);
  cursor: pointer;
  user-select: none;
}

.error-text {
  color: #ff4d4d;
  font-size: 0.85em;
  margin-top: 2px;
  display: block;
}

.ayuda-icono {
  position: relative;
  display: inline-block;
  margin-left: 0.3em;
}

.modal-ayuda {
  display: none;
  position: absolute;
  background: #f9f9f9;
  padding: 8px;
  border: 1px solid #ccc;
  border-radius: 6px;
  max-width: 250px;
  z-index: 10000;
  box-shadow: 0 2px 6px rgba(0,0,0,0.25);
  font-size: 0.9em;
}

.modal-contenido label {
  margin-top: 0.5em;
  margin-bottom: 0.2em;
}

/* Hacer el contenido del modal desplazable si supera la altura de pantalla */
.modal-contenido {
  max-height: calc(100vh - 120px); /* dejar margen superior e inferior */
  overflow-y: auto;
}

/* Ajustes de layout para flex y espaciado más compacto */
.modal-contenido form {
  display: flex;
  flex-direction: column;
  gap: 0.6em;
}

.modal-contenido label {
  margin-top: 0.4em;
  margin-bottom: 0.2em;
}

.modal-contenido input {
  margin-bottom: 0.6em;
}


.modal-contenido input {
  margin-bottom: 0.8em;
}

.modal-ayuda {
  position: fixed;
  z-index: 9999;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0,0,0,0.5);
}

.modal-contenido {
  background-color: #fefefe;
  margin: 10% auto;
  padding: 20px;
  border-radius: 10px;
  width: 80%;
  max-width: 500px;
  box-shadow: 0px 0px 10px #000;
}

.cerrar-ayuda {
  float: right;
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
}


.feedback {
  display: block;
  margin-top: 5px;
  font-size: 0.9em;
  color: gray;
}
.feedback.error {
  color: red;
}
.feedback.success {
  color: green;
}

.input-no-editable {
  background-color: #e8f5e9;  /* Verde muy claro */
  border: 1px solid #a5d6a7;  /* Borde verde suave */
  color: #2e7d32;             /* Texto verde oscuro */
  font-weight: bold;
}


/* Bloque de colaboración - abajo derecha */
#colaboracion {
  position: fixed;
  bottom: 30px;          /* altura del reloj */
  right: 110px;          /* espacio para que no tape el reloj (~90-100px de diámetro) */
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  background: rgba(0,0,0,0.65);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 10px;
  backdrop-filter: blur(2px);
  z-index: 10000;        /* sobre el globo */
}

#colaboracion img {
  height: 26px;
  width: auto;
}

#colaboracion p {
  margin: 0;
  font-size: .92rem;
  line-height: 1.1rem;
}

/* En pantallas pequeñas, más compacto */
@media (max-width: 768px) {
  #colaboracion { right: 12px; bottom: 12px; gap: 6px; padding: 6px 8px; }
  #colaboracion img { height: 22px; }
  #colaboracion p { font-size: .85rem; }
}

/* Bloque de soporte por WhatsApp - abajo derecha */
#soporte {
  position: fixed;
  bottom: 30px;
  right: 12px; /* pegado a la esquina */
  background: rgba(0,0,0,0.65);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 10px;
  padding: 6px 10px;
  display: flex;
  align-items: center;
  gap: 6px;
  backdrop-filter: blur(2px);
  z-index: 10000;
}

#soporte img {
  height: 24px;
  width: 24px;
  display: block;
}

#soporte span {
  color: #fff;
  font-size: 0.92rem;
}

#soporte:hover {
  background: rgba(0,0,0,0.85);
}

/* Modal de satélites visibles - lado izquierdo compacto */
#modalVisibles {
  position: fixed;
  top: 80px;              /* debajo de los botones superiores */
  left: 12px;             /* ahora en el lado izquierdo */
  width: 260px;           /* más angosto */
  max-height: calc(100vh - 100px);
  background: rgba(0,0,0,0.75);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.5);
  padding: 12px;
  font-size: 0.9rem;
  z-index: 10000;
  overflow-y: auto;
}

#modalVisibles h2 {
  margin: 0 0 6px;
  font-size: 1rem;
  border-bottom: 1px solid rgba(255,255,255,0.2);
  padding-bottom: 4px;
}

#modalVisibles ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

#modalVisibles li {
  padding: 4px 0;
  border-bottom: 1px dotted rgba(255,255,255,0.15);
}

#modalVisibles li:last-child {
  border-bottom: none;
}

#modalVisibles button {
  display: block;
  margin: 8px auto 0;
  background: #2d7d46;
  color: white;
  border: none;
  padding: 5px 10px;
  border-radius: 6px;
  font-size: 0.85rem;
  cursor: pointer;
}

#modalVisibles button:hover {
  background: #24903c;
}


/* Panel compacto satélites visibles - lado derecho */
/* Modal de satélites visibles - altura limitada */
#modalVisibles.modal-lateral.mejorado {
  position: fixed !important;
  top: 80px !important;
  right: 12px !important;
  left: auto !important;
  width: 260px !important;
  max-height: 300px !important; /* altura máxima */
  background: rgba(0,0,0,0.85) !important;
  color: #fff !important;
  border: 1px solid rgba(255,255,255,0.15) !important;
  border-radius: 10px !important;
  box-shadow: 0 4px 15px rgba(0,0,0,0.5) !important;
  padding: 10px !important;
  font-size: 0.9rem !important;
  z-index: 10000 !important;
  overflow-y: auto !important; /* scroll si hay muchos */
}


#modalVisibles.modal-lateral.mejorado h2 {
  margin: 0 0 6px !important;
  font-size: 1rem !important;
  border-bottom: 1px solid rgba(255,255,255,0.2) !important;
  padding-bottom: 4px !important;
}

#modalVisibles.modal-lateral.mejorado #contenido-visibles {
  margin: 0 !important;
  padding: 0 !important;
}

#modalVisibles.modal-lateral.mejorado #contenido-visibles p,
#modalVisibles.modal-lateral.mejorado #contenido-visibles li {
  margin: 2px 0 !important;
  padding: 2px 0 !important;
}

#modalVisibles.modal-lateral.mejorado button {
  display: block !important;
  margin: 8px auto 0 !important;
  background: #2d7d46 !important;
  color: white !important;
  border: none !important;
  padding: 5px 10px !important;
  border-radius: 6px !important;
  font-size: 0.85rem !important;
  cursor: pointer !important;
}
#modalVisibles.modal-lateral.mejorado button:hover {
  background: #24903c !important;
}

/* Overlay del modal dinámico */
.modal-overlay{
  display:none;              /* se muestra desde JS */
  position:fixed;
  inset:0;                   /* top/right/bottom/left:0 */
  background:rgba(0,0,0,.6);
  z-index:99999;             /* por encima de Cesium */
  overflow-y:auto;
}

/* Caja centrada para el contenido del fragmento */
.modal-box{
  max-width:420px;
  margin:80px auto;
  background:#111;
  color:#fff;
  padding:20px;
  border-radius:12px;
  box-shadow:0 10px 30px rgba(0,0,0,.5);
}
