/* ============================================
   ESTILOS ESPECÍFICOS PARA REPORTE DE GEOCERCAS
   ============================================ */

/* Loader */
#loader {
  transition: all 0.3s ease-in-out;
  opacity: 1;
  visibility: visible;
  position: fixed;
  height: 100vh;
  width: 100%;
  background: #fff;
  z-index: 90000;
  top: 0;
  left: 0;
}

#loader.fadeOut {
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

#loader[style*="display: none"] {
  display: none !important;
}

.spinner {
  width: 40px;
  height: 40px;
  position: absolute;
  top: calc(50% - 20px);
  left: calc(50% - 20px);
  background-color: #333;
  border-radius: 100%;
  -webkit-animation: sk-scaleout 1.0s infinite ease-in-out;
  animation: sk-scaleout 1.0s infinite ease-in-out;
}

@-webkit-keyframes sk-scaleout {
  0% { -webkit-transform: scale(0) }
  100% {
    -webkit-transform: scale(1.0);
    opacity: 0;
  }
}

@keyframes sk-scaleout {
  0% {
    -webkit-transform: scale(0);
    transform: scale(0);
  } 100% {
    -webkit-transform: scale(1.0);
    transform: scale(1.0);
    opacity: 0;
  }
}

/* SOLUCIÓN ESPECÍFICA SOLO PARA ESTA PÁGINA */
body.app.reporte-geocercas-page {
  overflow-x: hidden;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

body.app.reporte-geocercas-page::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}

/* IMPORTANTE: NO modificar .page-container ni el navbar
   Estos elementos están en base.php y deben mantener sus estilos originales
   Solo modificamos el contenido dentro de #mainContent */

/* CONTENEDOR PRINCIPAL CON SCROLL */
body.app.reporte-geocercas-page .main-content {
  overflow-y: auto !important;
  overflow-x: hidden !important;
  height: auto !important;
  max-height: none !important;
  scrollbar-width: none !important;
  -ms-overflow-style: none !important;
  padding: 20px !important;
}

body.app.reporte-geocercas-page .main-content::-webkit-scrollbar {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
}

body.app.reporte-geocercas-page #mainContent {
  overflow: visible !important;
  height: auto !important;
  max-height: none !important;
  padding: 0 !important;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

body.app.reporte-geocercas-page #mainContent::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}

/* Aplicar padding solo al contenido interno, no al contenedor principal */
body.app.reporte-geocercas-page #mainContent > .container-fluid,
body.app.reporte-geocercas-page #mainContent > .row {
  padding: 0 !important;
}

/* CONTENEDOR DE RESULTADOS */
body.app.reporte-geocercas-page #reportResults {
  min-height: 500px;
  overflow: visible;
}

/* ESTILOS PARA TABLA DE RESULTADOS */
.table-container {
  max-height: 600px;
  overflow-y: auto;
  border: 1px solid #dee2e6;
  border-radius: 0.375rem;
  /* Ocultar scrollbars */
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE/Edge */
}

.table-container::-webkit-scrollbar {
  display: none; /* Chrome/Safari */
}

body.app.reporte-geocercas-page .table-container {
  max-height: 60vh;
  overflow-y: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

body.app.reporte-geocercas-page .table-container::-webkit-scrollbar {
  display: none;
}

.table-responsive {
  margin: 0;
}

.table th {
  background-color: #f8f9fa;
  border-top: none;
  font-weight: 600;
  color: #495057;
  position: sticky;
  top: 0;
  z-index: 10;
}

.table td {
  vertical-align: middle;
  border-top: 1px solid #dee2e6;
}

.table-striped tbody tr:nth-of-type(odd) {
  background-color: rgba(0,0,0,.05);
}

.table-hover tbody tr:hover {
  background-color: rgba(0,0,0,.075);
}

/* Dark mode styles */
[data-theme="dark"] .table th {
  background-color: #343a40;
  color: #f8f9fa;
  border-color: #495057;
}

[data-theme="dark"] .table td {
  color: #f8f9fa;
  border-color: #495057;
}

[data-theme="dark"] .table-container {
  border-color: #495057;
}

[data-theme="dark"] .table-striped tbody tr:nth-of-type(odd) {
  background-color: rgba(255,255,255,.05);
}

[data-theme="dark"] .table-hover tbody tr:hover {
  background-color: rgba(255,255,255,.075);
}

/* Estilos para badges de alerta */
.alert-badge {
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 500;
}

.alert-info {
  background-color: #d1ecf1;
  color: #0c5460;
}

/* ESTILOS PARA MODO OSCURO */
[data-theme="dark"] .alert-info {
  background-color: #0c2d33;
  color: #b8daff;
}

/* FORMULARIOS */
body.app.reporte-geocercas-page .form-control {
  text-align: center;
}

body.app.reporte-geocercas-page .form-label {
  margin-bottom: 8px;
}

body.app.reporte-geocercas-page .form-group {
  margin-bottom: 15px;
}

body.app.reporte-geocercas-page .row.justify-content-center .col-md-2-4 {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

/* COLUMNAS PERSONALIZADAS */
.col-md-2-4 {
  flex: 0 0 20%;
  max-width: 20%;
  padding-left: 8px;
  padding-right: 8px;
}

.col-md-3 {
  flex: 0 0 25%;
  max-width: 25%;
  padding-left: 8px;
  padding-right: 8px;
}

@media (min-width: 768px) {
  .col-md-2-4 {
    flex: 0 0 20%;
    max-width: 20%;
  }
  
  .col-md-3 {
    flex: 0 0 25%;
    max-width: 25%;
  }
}

/* BOTONES */
.btn-transparent-red {
  background-color: transparent !important;
  border: 1px solid #dc3545 !important;
  color: #dc3545 !important;
  transition: all 0.3s ease !important;
}

.btn-transparent-red:hover {
  background-color: #dc3545 !important;
  color: white !important;
  border-color: #dc3545 !important;
}

.header-buttons {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
}

/* ASEGURAR QUE EL SELECTOR DE TEMA SEA VISIBLE */
body.app.reporte-geocercas-page .header .nav-left .theme-toggle,
body.app.reporte-geocercas-page .header .nav-right .theme-toggle {
  display: flex !important;
  visibility: visible !important;
  opacity: 1 !important;
  height: 65px !important;
  align-items: center !important;
}

body.app.reporte-geocercas-page .header .theme-toggle .form-check {
  display: flex !important;
  visibility: visible !important;
  opacity: 1 !important;
  margin: 0 !important;
}

body.app.reporte-geocercas-page .header .theme-toggle .form-check-input {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
}

body.app.reporte-geocercas-page .header .theme-toggle .form-check-label {
  display: inline-block !important;
  visibility: visible !important;
  opacity: 1 !important;
}

/* ROW Y COLUMNAS - Asegurar que ocupen todo el ancho */
body.app.reporte-geocercas-page .row {
  width: 100% !important;
  max-width: 100% !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
}

