/* ============================ */
/*          BASE STYLES        */
/* ============================ */
@import url('https://fonts.googleapis.com/css2?family=Open+Sans:wght@400;600;700&display=swap');

body {
    font-family: 'Open Sans', sans-serif;
    background-color: #FFFFFF;
    margin: 0;
    padding: 0;
    color: #33493D;
    min-height: 100vh; /* Mantener el fondo cubriendo toda la pantalla */
}

/* Mantener el estilo del contenedor pero hacerlo más flexible */
.module_container {
    margin-top: 0px;
    background-color: #E3E9DD;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

/* Hacer que el contenedor sea más adaptable */
.container {
    max-width: 100%; /* Permitir que ocupe todo el ancho disponible */
    margin: 0px auto;
    padding: 0px;
    text-align: center;
}

h1, h2, h3, h4, h5, h6 {
    margin-top: 0;
    margin-bottom: 0.5rem; }
  
  p {
    margin-top: 0;
    margin-bottom: 1rem; }

    h1, h2, h3, h4, h5, h6,
.h1, .h2, .h3, .h4, .h5, .h6 {
  margin-bottom: 0.5rem;
  font-family: inherit;
  font-weight: 500;
  line-height: 1.2;
  color: #222222; }

h1, .h1 {
  font-size: 2.25rem; }

h2, .h2 {
  font-size: 1.875rem; }

h3, .h3 {
  font-size: 1.5rem; }

h4, .h4 {
  font-size: 1.125rem; }

h5, .h5 {
  font-size: 1rem; }

h6, .h6 {
  font-size: 0.875rem; }

  .card {
    position: relative;
    display: flex;
    flex-direction: column;
    min-width: 0;
    word-wrap: break-word;
    background-color: #fff;
    background-clip: border-box;
    border: 1px solid rgba(0, 0, 0, 0.125);
    border-radius: 0.25rem; }
    .card > hr {
      margin-right: 0;
      margin-left: 0; }
    .card > .list-group:first-child .list-group-item:first-child {
      border-top-left-radius: 0.25rem;
      border-top-right-radius: 0.25rem; }
    .card > .list-group:last-child .list-group-item:last-child {
      border-bottom-right-radius: 0.25rem;
      border-bottom-left-radius: 0.25rem; }
  
  .card-body {
    flex: 1 1 auto;
    padding: 1.25rem; }
  
  .card-title {
    margin-bottom: 0.75rem; }
  
  .card-subtitle {
    margin-top: -0.375rem;
    margin-bottom: 0; }
  
  .card-text:last-child {
    margin-bottom: 0; }
  
  .card-link:hover {
    text-decoration: none; }
  
  .card-link + .card-link {
    margin-left: 1.25rem; }
  
  .card-header {
    padding: 0.75rem 1.25rem;
    margin-bottom: 0;
    background-color: rgba(0, 0, 0, 0.03);
    border-bottom: 1px solid rgba(0, 0, 0, 0.125); }
    .card-header:first-child {
      border-radius: calc(0.25rem - 1px) calc(0.25rem - 1px) 0 0; }
    .card-header + .list-group .list-group-item:first-child {
      border-top: 0; }
  
  .card-footer {
    padding: 0.75rem 1.25rem;
    background-color: rgba(0, 0, 0, 0.03);
    border-top: 1px solid rgba(0, 0, 0, 0.125); }
    .card-footer:last-child {
      border-radius: 0 0 calc(0.25rem - 1px) calc(0.25rem - 1px); }
  
  .card-header-tabs {
    margin-right: -0.625rem;
    margin-bottom: -0.75rem;
    margin-left: -0.625rem;
    border-bottom: 0; }
  
  .card-header-pills {
    margin-right: -0.625rem;
    margin-left: -0.625rem; }
  
  .card-img-overlay {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    padding: 1.25rem; }
  
  .card-img {
    width: 100%;
    border-radius: calc(0.25rem - 1px); }
  
  .card-img-top {
    width: 100%;
    border-top-left-radius: calc(0.25rem - 1px);
    border-top-right-radius: calc(0.25rem - 1px); }
  
  .card-img-bottom {
    width: 100%;
    border-bottom-right-radius: calc(0.25rem - 1px);
    border-bottom-left-radius: calc(0.25rem - 1px); }
  
  .card-deck {
    display: flex;
    flex-direction: column; }
    .card-deck .card {
      margin-bottom: 15px; }
    @media (min-width: 576px) {
      .card-deck {
        flex-flow: row wrap;
        margin-right: -15px;
        margin-left: -15px; }
        .card-deck .card {
          display: flex;
          flex: 1 0 0%;
          flex-direction: column;
          margin-right: 15px;
          margin-bottom: 0;
          margin-left: 15px; } }
  
  .card-group {
    display: flex;
    flex-direction: column; }
    .card-group > .card {
      margin-bottom: 15px; }
    @media (min-width: 576px) {
      .card-group {
        flex-flow: row wrap; }
        .card-group > .card {
          flex: 1 0 0%;
          margin-bottom: 0; }
          .card-group > .card + .card {
            margin-left: 0;
            border-left: 0; }
          .card-group > .card:first-child {
            border-top-right-radius: 0;
            border-bottom-right-radius: 0; }
            .card-group > .card:first-child .card-img-top,
            .card-group > .card:first-child .card-header {
              border-top-right-radius: 0; }
            .card-group > .card:first-child .card-img-bottom,
            .card-group > .card:first-child .card-footer {
              border-bottom-right-radius: 0; }
          .card-group > .card:last-child {
            border-top-left-radius: 0;
            border-bottom-left-radius: 0; }
            .card-group > .card:last-child .card-img-top,
            .card-group > .card:last-child .card-header {
              border-top-left-radius: 0; }
            .card-group > .card:last-child .card-img-bottom,
            .card-group > .card:last-child .card-footer {
              border-bottom-left-radius: 0; }
          .card-group > .card:only-child {
            border-radius: 0.25rem; }
            .card-group > .card:only-child .card-img-top,
            .card-group > .card:only-child .card-header {
              border-top-left-radius: 0.25rem;
              border-top-right-radius: 0.25rem; }
            .card-group > .card:only-child .card-img-bottom,
            .card-group > .card:only-child .card-footer {
              border-bottom-right-radius: 0.25rem;
              border-bottom-left-radius: 0.25rem; }
          .card-group > .card:not(:first-child):not(:last-child):not(:only-child) {
            border-radius: 0; }
            .card-group > .card:not(:first-child):not(:last-child):not(:only-child) .card-img-top,
            .card-group > .card:not(:first-child):not(:last-child):not(:only-child) .card-img-bottom,
            .card-group > .card:not(:first-child):not(:last-child):not(:only-child) .card-header,
            .card-group > .card:not(:first-child):not(:last-child):not(:only-child) .card-footer {
              border-radius: 0; } }
  
  .card-columns .card {
    margin-bottom: 0.75rem; }
  
.form-container {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    align-items: center;
    justify-content: flex-start;
}

.form-group {
    display: flex;
    flex-direction: column;
    min-width: 200px;
}

#coordinatesForm button {
    margin-top: 10px;
    align-self: flex-start;
}

@media (max-width: 600px) {
    .form-group {
        width: 100%;
    }

    #coordinatesForm {
        flex-direction: column;
    }
}

.form-container {
  display: grid;
  grid-template-columns: 1fr 1fr; /* Dos columnas iguales */
  gap: 10px; /* Espacio entre filas y columnas */
}

.form-group {
  display: flex;
  flex-direction: column; /* Asegura que la etiqueta y el input estén apilados */
}

.form-container button {
  grid-column: span 2; /* Botones ocupan las dos columnas */
  justify-self: center; /* Centrar botones */
}

@media (max-width: 600px) {
  .form-container {
      grid-template-columns: 1fr; /* Cambiar a una sola columna en pantallas pequeñas */
  }
}
/* Estilo para el contenedor de la imagen */
.titulo-container {
  display: flex;
  justify-content: center; /* Centra la imagen horizontalmente */
  align-items: center; /* Centra la imagen verticalmente */
  margin: 20px auto; /* Espacio alrededor del contenedor */
  max-width: 100%; /* Asegura que el contenedor no exceda el ancho de la pantalla */
}
/* Imagen responsiva */
.titulo {
  display: block;
  width: 100%; /* Fuerza a llenar el contenedor */
  max-width: 100%;  /* Se ajusta al ancho del contenedor */
  height: auto;     /* Mantiene la proporción al cambiar el ancho */
  margin: 0 auto;   /* Centra la imagen si el contenedor es más ancho */
  max-height: 400px; /* Ajusta la altura máxima por defecto */
}

/* Ajuste específico para pantallas pequeñas (p.e. iPhone 12 ~ 390px) */
@media (max-width: 390px) {
  .titulo {
    max-height: 200px; /* reduce la altura máxima en pantallas muy pequeñas */
  }
}

/* Encabezado fijo en la parte superior */
.header-fijo {
  position: sticky;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 999; /* Asegura que quede por encima de otros elementos */
  background-color: #ffffff; /* Opcional, un color de fondo si quieres */
  text-align: center; /* Centra la imagen horizontalmente */
  /* Si conoces la altura exacta que tendrá la imagen, puedes darle min-height o height */
  /* min-height: 80px; por ejemplo */
}

/* La imagen dentro del encabezado */
.header-fijo img {
  max-width: 100%;
  height: auto;
  /* Si quieres que la imagen sea más pequeña, ajusta aquí:
     max-height: 80px; 
     o algo similar 
  */
}

/* Asegúrate de que el resto del contenido no quede debajo del header */
.container {
  /* Si tu imagen/encabezado mide ~80px de alto, ajusta un margin-top acorde */
  margin-top: 3px; /* Ajusta según el tamaño real del header */
}

/* Estilos para el pie de página fijo */
.footer-fijo {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  z-index: 999;       /* Asegura que quede por encima de otros elementos */
  background-color: #fff; /* Opcional: color de fondo para el footer */
  text-align: center; /* Centra el contenido horizontalmente */
  padding: 0px 0;    /* Espaciado superior e inferior */
}

/* Estilos para la imagen dentro del footer */
.footer-fijo img {
  max-height: 400px;   /* Ajusta el alto máximo según tu diseño */
  width: auto;        /* Mantiene la proporción original */
}

/* Asegúrate de que el contenido principal no quede tapado por el footer */
.container {
  padding-bottom: 100px; /* Ajusta este valor según la altura del footer */
}


/* Estilos para los botones */
button {
    background-color: #009879;
    color: #ffffff;
    border: none;
    padding: 10px 20px;
    font-size: 1em;
    border-radius: 5px;
    cursor: pointer;
    margin: 10px auto;
}

button:hover {
    background-color: #007b5e;
}

button:active {
    background-color: #005f45;
}

.botones-coordenadas {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  margin: 20px 0;
}


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

.modal-content {
  background-color: white;
  margin: 10% auto;
  padding: 30px;
  border-radius: 10px;
  width: 90%;
  max-width: 400px;
  position: relative;
  box-shadow: 0px 4px 20px rgba(0,0,0,0.2);
}

.modal-content h3 {
  margin-top: 0;
  text-align: center;
}

.close {
  position: absolute;
  right: 15px;
  top: 10px;
  font-size: 22px;
  font-weight: bold;
  cursor: pointer;
}

.modal-form {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.form-row {
  display: flex;
  flex-direction: column;
}

.form-row label {
  font-weight: 500;
  margin-bottom: 5px;
}

input[type="text"],
input[type="number"],
input[type="date"] {
  padding: 8px;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 15px;
}

.btn-guardar {
  padding: 10px;
  background-color: #008060;
  color: white;
  font-weight: bold;
  border: none;
  border-radius: 6px;
  cursor: pointer;
}

.btn-guardar:hover {
  background-color: #00664d;
}


.toast {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  background-color: #087f5b;
  color: #fff;
  padding: 12px 24px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  z-index: 1000;
}

.toast.show {
  opacity: 1;
}

.btn {
  padding: 4px 8px;
  border: none;
  cursor: pointer;
  font-weight: bold;
}

.btn-sm {
  font-size: 0.85rem;
}

.btn-success {
  background-color: #198754;
  color: white;
}

.btn-danger {
  background-color: #dc3545;
  color: white;
}

.btn:hover {
  opacity: 0.85;
}

.rounded {
  border-radius: 5px;
}

/* ============================ */
/* TOAST CONFIRMACIÓN ELIMINAR */
/* ============================ */
.toast-confirm-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.6);
  z-index: 1050;
}

.toast-confirm-box {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background-color: #fff;
  color: #333;
  padding: 20px 30px;
  border-radius: 10px;
  box-shadow: 0 6px 25px rgba(0, 0, 0, 0.3);
  z-index: 1060;
  text-align: center;
  max-width: 90%;
  width: 400px;
  font-family: "Segoe UI", sans-serif;
}

.toast-confirm-box p {
  font-size: 1rem;
  margin-bottom: 20px;
}

.toast-confirm-buttons {
  display: flex;
  justify-content: center;
  gap: 15px;
}

.toast-confirm-buttons button {
  padding: 10px 18px;
  border: none;
  border-radius: 5px;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.toast-confirm-buttons .btn-confirm {
  background-color: #28a745;
  color: white;
}

.toast-confirm-buttons .btn-confirm:hover {
  background-color: #218838;
}

.toast-confirm-buttons .btn-cancel {
  background-color: #6c757d;
  color: white;
}

.toast-confirm-buttons .btn-cancel:hover {
  background-color: #5a6268;
}

@media (max-width: 480px) {
  .toast-confirm-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.6);
    z-index: 9999;
  }

  .toast-confirm-box {
    width: 90% !important;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    padding: 16px;
    font-size: 0.95rem;
    z-index: 10000;
    box-shadow: 0 0 20px rgba(0,0,0,0.3);
  }

  .toast-confirm-buttons {
    flex-direction: column;
    gap: 10px;
  }

  .toast-confirm-buttons button {
    width: 100%;
    padding: 10px;
    font-size: 1rem;
  }
}

@media (max-width: 480px) {
  .toast {
    bottom: 80px !important; /* más arriba para que no se tape con el footer ni el teclado */
    font-size: 13px;
    padding: 10px 20px;
  }
}

@media (max-width: 480px) {
  .toast {
    bottom: 90px !important;
    font-size: 13px;
    padding: 10px 20px;
    z-index: 1100 !important;
  }
}

@media (min-width: 481px) and (max-width: 600px) {
  .toast {
    bottom: 80px !important;
    font-size: 14px;
    padding: 12px 24px;
    z-index: 1100 !important;
  }
}

.toast-confirm-box,
.toast-confirm-overlay {
  pointer-events: auto;
}


.user-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 5px;
}

#userGreeting {
  font-size: 16px;
  font-weight: bold;
  margin-left: 20px;
  text-align: left;
}

#logoutSection {
  display: none; /* cambia a block con JS cuando esté logueado */
  margin-right: 20px;
}

#logoutBtn {
  font-size: 13px;
  padding: 4px 10px;
  height: 28px;
}

/* MODO CELULAR: CENTRAR TODOS LOS ELEMENTOS */
@media (max-width: 400px) {
  .user-header {
    flex-direction: column;
    align-items: center;
  }

  #userGreeting {
    margin-left: 0;
    text-align: center;
  }

  #logoutSection {
    margin-right: 0;
  }
}
