/* Base styles - mobile first */
html {
  min-height: 100%;
  font-size: 14px;
  position: relative;
  padding-bottom: 30px; /* espacio para el footer */
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, sans-serif;
  line-height: 1.5;
  min-height: 100vh;
  position: relative;
  padding-bottom: 30px; /* espacio para el footer */
  box-sizing: border-box;
}

.bg-custom {
  background-color: #2d3436 !important;
}

.btn-primary {
  font-weight: bold;
  background-color: #007bff;
  border-color: #007bff;
}

.btn-primary:hover {
  background-color: #0056b3;
  border-color: #004085;
}

/* Layout containers */
.main-container {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 1rem;
}

.content-header {
  max-width: 700px;
  margin: 0 auto;
}

/* Language selector buttons */
.language-selector {
  margin-top: 15px; /* move down from edge */
  display: flex;
  gap: 10px;
}

.language-selector button {
  background: transparent;
  color: white;
  border: none;
  cursor: pointer;
  font-size: 1rem;
  opacity: 0.6;
  transition: opacity 0.3s ease;
  padding: 5px 10px;
  border-radius: 4px;

  display: flex;
  align-items: center;
  gap: 8px;
}

.language-selector button:hover {
  opacity: 1;
}

.language-selector button.selected {
  opacity: 1;
  font-weight: bold;
  text-decoration: underline;
}

.language-selector select:hover {
  border-color: rgba(255,255,255,0.5);
}

.language-selector select:focus {
  outline: none;
  border-color: rgba(255,255,255,0.7);
}

/* Ajustar el color de las opciones del select */
.language-selector select option {
  background-color: #2d3436;
  color: white;
}

/* Footer */
.footer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 50px;
  background-color: #2d3436;
  color: white;
  padding: 0 1rem;
  box-sizing: border-box;
  z-index: 1000;

  display: flex;
  align-items: center;
  justify-content: space-between;
}
/* Las tres columnas ocupan espacio igual */
.footer-left,
.footer-center,
.footer-right {
  flex: 1;
}

/* Centrar texto en la columna central */
.footer-center {
  text-align: center;
}

/* Alinear botones a la izquierda */
.footer-left {
  text-align: left;
}

/* Footer-right queda vacío para balancear */
.footer-right {
  /* opcional, puede quedar vacío */
}

/* Ajustar el contenido del footer */
.page-footer .container {
  padding: 0;
  margin: 0;
  height: 100%;
}

.page-footer .row {
  margin: 0;
  padding: 0;
  height: 100%;
}


/* Responsive typography */
@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

.table {
  width: 100%;
  border-collapse: collapse;
}
  
th, td {
  text-align: center;
  vertical-align: middle;
  justify-content: center;
  align-items: center;
  padding: 8px;
}

.toast-container {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
}


.row {
  align-items: start !important; /* O 'flex-start' */
}

.row-equal-height {
  align-items: stretch !important;
}

.boton-fijo {
  min-width: 100px;
  text-align: center;
}

.status-fijo {
  min-width: 70px;
  text-align: center;
}

.transformacion .spinner-border,
.modelo .spinner-border {
    width: 2rem;
    height: 2rem;
}

.nugget-input,
.sill-input,
.range-input {
    width: 125px;
    max-width: 140px;
}

.actualizar-btn{
  background-color: #198754; 
  color: white;
  border-radius: 0.375rem;
  border: none;
  padding: 0.5rem 1rem;
  font-weight: 600;
  transition: background-color 0.3s ease;
}

.breadcrumb {
  background-color: #f8f9fa;
  border-radius: 5px;
  padding: 10px;
}

.breadcrumb-item a {
  color: #007bff;
  text-decoration: none;
  font-weight: 600;
}

.breadcrumb-item a:hover {
  color: #0056b3;
}

.breadcrumb-item.active {
  color: #6c757d;
  font-weight: 700;
}

.breadcrumb-item a {
  transition: color 0.3s ease;
}

.breadcrumb-item a:hover {
  color: #0056b3;
}

.wizard-breadcrumb li {
  position: relative;
  padding: 10px 20px;
  cursor: pointer;
  color: #6c757d;
  font-weight: 500;
  transition: color 0.3s ease, transform 0.3s ease;
}

.wizard-breadcrumb li:hover {
  color: #0d6efd;
  transform: scale(1.05);
}

.wizard-breadcrumb li.active {
  color: #0d6efd;
  font-weight: 600;
  border-bottom: 2px solid #0d6efd;
}

.wizard-breadcrumb li.active i {
  animation: bounce 1s ease infinite;
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}

.btn {
  transition: transform 0.2s ease;
}

.btn:hover {
  transform: scale(1.05);
}

.wizard-content {
  min-height: 300px;
  padding: 20px;
  border: 1px solid #dee2e6;
  border-radius: 0.25rem;
  background-color: #fff;
  transition: opacity 0.5s ease-in-out, transform 0.5s ease-in-out;
  opacity: 1;
}

.wizard-content.fade-out {
  opacity: 0;
  transform: translateX(-20px);
}

.wizard-content.fade-in {
  opacity: 1;
  transform: translateX(0);
}

.wizard-breadcrumb {
  display: flex;
  justify-content: center;
  margin-bottom: 20px;
  list-style: none;
  padding-left: 0;
}
.wizard-breadcrumb li {
  position: relative;
  padding: 10px 20px;
  cursor: pointer;
  color: #6c757d;
  font-weight: 500;
}
.wizard-breadcrumb li.active,
.wizard-breadcrumb li:hover {
  color: #0d6efd;
}
.wizard-breadcrumb li + li::before {
  content: ">";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  color: #6c757d;
}
.wizard-content {
  min-height: 300px;
  padding: 20px;
  border: 1px solid #dee2e6;
  border-radius: 0.25rem;
  background-color: #fff;
}
.wizard-navigation {
  margin-top: 20px;
  display: flex;
  justify-content: space-between;
}

.wizard-breadcrumb .breadcrumb-item + .breadcrumb-item::before {
  content: '';
}

.toast-message {
  position: relative;
  padding: 15px;
  margin-bottom: 10px;
  border-radius: 5px;
  color: #fff;
  min-width: 250px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
  opacity: 0.95;
  font-family: sans-serif;
}

.toast-close {
  position: absolute;
  top: 5px;
  right: 10px;
  background: none;
  border: none;
  font-size: 18px;
  color: inherit;
  cursor: pointer;
  line-height: 1;
}

.alert-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 1050;
}

.alert-message {
  background-color: #fa8e00;
  color: white;
  padding: 15px;
  margin-bottom: 10px;
  border-radius: 5px;
  min-width: 250px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.alert-message.success {
  background-color: #198754;
}

.alert-message.error {
  background-color: #dc3545;
}

.alert-message.warning {
  background-color: #ffc107;
  color: black;
}

.alert-close {
  background: none;
  border: none;
  color: white;
  font-size: 18px;
  cursor: pointer;
}
.image-gallery {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;

  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  box-sizing: border-box;
}
.image-card {
  flex: 1 1 48%;
  max-width: 450px;
  border: 1px solid #ddd;
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  padding: 0.5rem;
  background-color: #fff;
  text-align: center;
}
.image-card img {
  max-width: 100%;
  height: auto;
  border-radius: 4px;
}
.image-card h5 {
  margin-top: 0.5rem;
  font-weight: 600;
  color: #333;
}

.mapa-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  gap: 2%;
  flex-wrap: nowrap; /* Mantiene las imágenes lado a lado siempre */
  overflow: hidden;  /* Evita que se desborde visualmente */
}


#mapa_ponderacion.image-card {
  max-width: 1066px;
  flex: 1 1 auto;
}

.mapa-img {
  flex: 1 1 48%;                /* Que crezcan y se adapten, sin romper */
  min-width: 350px;               /* Permite reducir más en pantallas medianas */
  height: auto;
  object-fit: contain;
}

/* RESPONSIVE para móviles */
@media (max-width: 768px) {
  .mapa-container {
    flex-direction: column;
    height: auto;
  }
}

.custom-alert {
  position: fixed;
  top: 20px;
  right: 20px;
  width: auto;
  max-width: 400px;
  z-index: 9999;
  box-shadow: 0 4px 6px rgba(0,0,0,0.2);
  padding: 1rem 1.5rem;
}

#botones-actualizar-generar {
  display: none;
}

.archivo-nombre {
  max-width: 100%;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  display: inline-block;
  vertical-align: middle;
}

table.dataTable {
  table-layout: fixed !important;
  width: 100% !important;
}

.responsive-plotly-wrapper {
  display: flex;
  flex-wrap: nowrap; /* evitamos salto de línea */
  gap: 20px;
  min-width: 100%;
  width: max-content; /* fuerza scroll horizontal */
}

/* Cada gráfico ocupa ancho fijo en pantallas grandes */
.plotly-container {
  width: 600px;
  height: 700px;
  flex-shrink: 0;
}

/* En pantallas pequeñas, que se apilen */
@media (max-width: 768px) {
  .responsive-plotly-wrapper {
    flex-direction: column;
    width: 100%;
  }

  .plotly-container {
    width: 100%;
    height: auto;
    aspect-ratio: 4 / 3;
  }
}

.plotly-container-full {
  width: 700px;
  max-width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  flex-grow: 1;
}

.plotly-card {
  flex: 1 1 100%;      /* Que ocupe todo el ancho posible */
  max-width: 100%;     /* Sin límite de 450px */
  border: 1px solid #ddd;
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  padding: 0.5rem;
  background-color: #fff;
  text-align: center;
}

@media (max-width: 768px) {
  .plotly-container-full {
    aspect-ratio: 1 / 1;
    height: auto;
  }
}

.plotly-tab-content {
  max-height: 80vh;
  overflow-y: auto;
  overflow-x: hidden;
}

.plotly-tab-content .tab-pane {
  height: auto;
}

.plotly-image-gallery {
  display: block; /* o flex pero sin wrap y sin justify-content */
  width: 100%;
  max-width: 100%;
  overflow-x: auto; /* si quieres scroll horizontal */
  box-sizing: border-box;
}

/* Added CSS for Leaflet map container */
#map {
  width: 100%;
  height: 700px;
  overflow: hidden;
  position: relative;
  max-width: 100%;
  box-sizing: border-box;
}

.chart {
  width: 100%;
  min-width: 300px;
  position: relative;
  margin-right: 20px;
  overflow: visible !important;
}


.custom-file-input:lang(es) ~ .custom-file-label::after {
  content: "Examinar";
  background-color: #6c757d;
  color: white;
}
.custom-file-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Estilos para el nombre del archivo */
#file-name-display {
  margin-top: 12px;
  padding: 10px;
  border-radius: 6px;
  background-color: #f8fafc;
  border: 1px dashed #d1d5db;
  color: #64748b;
  font-size: 14px;
  min-width: 200px;
  transition: all 0.3s ease;
}

#file-name-display.has-file {
  color: #1e40af;
  background-color: #e0f2fe;
  border-style: solid;
  border-color: #93c5fd;
}

#overlayLoader {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  background-color: rgba(0, 0, 0, 0.6) !important;
  align-items: center !important;
  justify-content: center !important;
  z-index: 20000 !important;
  pointer-events: all !important;
}

#overlayLoader .loader-content {
  color: #fff;
  font-size: 1.2rem;
  text-align: center;
  user-select: none;
}

.marker-label {
    background-color: rgba(255, 255, 255, 0.7);
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    border: 1px solid #555;
    font-weight: bold;
    font-size: 12px;
}

.marker-label span {
    color: #333;
}

/* --- Estilos para Breadcrumb Verde --- */

/* Forza el color del texto del paso activo a ser verde */
.wizard-breadcrumb .breadcrumb-item.active > a,
.wizard-breadcrumb .breadcrumb-item.active > a:hover {
  color: #28a745 !important;
}

/* Forza el color del triángulo del paso activo a ser verde */
.wizard-breadcrumb .breadcrumb-item.active::before {
  border-left-color: #28a745 !important;
}

.select2-container .select2-selection--single {
  height: calc(1.5em + .75rem + 2px) !important;
  padding: .375rem .75rem;
  border: 1px solid #ced4da;
}
.select2-container .select2-selection--single .select2-selection__rendered {
 line-height: 1.5;
 padding-left: 0;
}
.select2-container .select2-selection--single .select2-selection__arrow {
  height: calc(1.5em + .75rem + 2px) !important;
}

.vertical-divider-right {
  border-right: 0.5px solid #dee2e6; /* Color de borde de Bootstrap */
}

.table-scroll-vertical {
  max-height: 400px; /* Puedes ajustar esta altura según tus necesidades */
  overflow-y: auto;  /* Habilita el scroll vertical cuando el contenido excede el max-height */
}

.table-scroll-container {
  /* Define una altura máxima. El scroll aparecerá cuando el contenido la supere.
     '65vh' significa 65% de la altura de la ventana, es una buena medida responsiva. */
  max-height: 65vh;
  
  /* Añade el scroll vertical solo cuando sea necesario */
  overflow-y: auto;
  
  /* Contexto de posicionamiento para el encabezado fijo */
  position: relative;
}

.table-scroll-container thead th {
  /* Fija el encabezado en la parte superior del contenedor */
  position: sticky;
  top: 0;
  
  /* Asegura que el encabezado esté por encima del contenido del body */
  z-index: 1;
  
  /* Un color de fondo es crucial para que el texto que se desplaza por debajo no se vea */
  background-color: #f8f9fa; /* Un gris claro estándar de Bootstrap */
}


.campo-simetrico {
  display: flex;
  align-items: center;
  gap: 15px; /* Espacio entre la etiqueta y el campo */
}

.campo-simetrico label {
  flex: 1; /* Ocupa un espacio igual */
  white-space: nowrap; /* Evita que el texto de la etiqueta se envuelva */
}

.campo-simetrico input,
.campo-simetrico select {
  flex: 2; /* Ocupa el doble de espacio que la etiqueta */
}

/* --- Estilos para Detalle Proyecto --- */

  /* Botones siempre visibles para consistencia */
  #pozosTable .btn-accion {
    opacity: 1;
    pointer-events: auto;
  }

  /* Fila de "agregar pozo" siempre visible */
  #pozosTable .fila-agregar {
    display: table-row;
  }

  /* Que la columna de addParam no ensanche la tabla */
  #pozosTable th.col-addParam,
  #pozosTable td.col-addParam {
    width: 1%;
    white-space: nowrap;
  }

  /* Compactar botones para no romper celdas */
  .btn-accion.btn {
    padding: .25rem .4rem;
    line-height: 1;
  }

/* Flag icons are loaded from CDN */

/* Columna de agregar parámetro siempre visible */
#pozosTable th.col-addParam,
#pozosTable td.col-addParam {
  display: table-cell;
}

#file-name-display {
    white-space: nowrap; /* Evita que el texto salte a la siguiente línea */
    overflow: hidden; /* Oculta el texto que se desborda */
    text-overflow: ellipsis; /* Añade los puntos suspensivos */
    min-width: 0; /* Importante para que funcione correctamente dentro de un contenedor flex */
}

.sticky-header {
  position: -webkit-sticky; /* Para compatibilidad con Safari */
  position: sticky;
  top: 0; /* Fija el encabezado en la parte superior del contenedor */
  z-index: 1; /* Asegura que el encabezado esté por encima del contenido */
}
