html {
  scroll-behavior: smooth;
}


/* Establecer Arial como fuente por defecto para toda la aplicación */
* {
  font-family: Arial, Helvetica, sans-serif;
}

/* ----------------------------------------------
   Toast global
   ---------------------------------------------- */
#aviso-global {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.6);
  color: white;
  padding: 1em 1.5em;
  border-radius: 20px;
  z-index: 9999;
  font-size: 1.1em;
  text-align: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

#aviso-global.mostrar {
  opacity: 1 !important;
}

/* --- Animaciones Nativas --- */
@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes slideDown {
  from {
    transform: translateY(-100px);
    opacity: 0;
  }

  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.anim-fade-in {
  animation: fadeIn 1s ease-in-out forwards;
}

.anim-slide-down {
  animation: slideDown 1s ease-out forwards;
}

.bg-readonly {
  background-color: #e9ecef !important;
}

.z-index-top {
  z-index: 1060 !important;
}

.overflow-hidden {
  overflow: hidden !important;
}

.w-auto {
  width: auto !important;
}

.btn-cerrar-icon {
  font-size: 1.5rem !important;
  line-height: 1 !important;
}

.cursor-pointer {
  cursor: pointer !important;
}

/* ----------------------------------------------
     Cabecera fija y botones circulares
     ---------------------------------------------- */
#cabecera-app {
  position: fixed;
  top: 0;
  width: 100%;
  background: #fafafa;
  border-bottom: 1px solid #e0e0e0;
  height: 56px;
  z-index: 1000;
}

.btn-circulo {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: white;
  border: none;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.btn-info {
  background: #003A5B;
  border: 0;
  color: #fff;
}

.btn-info:hover {
  color: #fff;
  background: #003a5ccc;
}

.btn-cerrar {
  color: #EA0A2A;
  cursor: pointer;
}

.btn-danger {
  background: #EA0A2A;
}

/* Filtro unificado para íconos importados como SVG (tono oscuro) */
.icon-svg {
  filter: brightness(0) saturate(100%) invert(18%) sepia(8%) saturate(16%) hue-rotate(314deg) brightness(89%) contrast(85%);
  /* Hex #333 aproximado */
}

.form-select {
  width: 100% !important;
  min-width: 100px;
}

.div_dato_conjunto_especifico .form-select {
  width: auto !important;
}

.oculto {
  display: none !important;
}

.modal-title,
h2,
h3,
h4 {
  color: #003A5B;
}

/* ----------------------------------------------
     Dashboard: desplazamiento para no tapar header
     ---------------------------------------------- */
#dashboardContainer {
  text-align: left;
  padding-bottom: 1px;
  box-sizing: border-box;
}

/* ----------------------------------------------
     Botón activo (borde negro)
     ---------------------------------------------- */
.btn-activo {
  border: 4px solid black !important;
}


/* ----------------------------------------------
     Administración
     ---------------------------------------------- */
.admin-area {
  margin-top: 1.5rem;
}

/* Estado activo del botón de administración */
.btn-admin-activo {
  background-color: #003a5ccc !important;
}

/* Estilos para el modal de metadatos */
#tabla-metadatos {
  font-size: 0.9rem;
}

#tabla-metadatos th {
  background-color: #f0f0f0;
}

.btn-metadatos {
  margin-right: 5px;
}

#metadatos-contenedor {
  max-height: 60vh;
  overflow-y: auto;
}

/* ----------------------------------------------
     Logo de entidad en cabecera
     ---------------------------------------------- */
#logo-entidad {
  /* background-image: url("https://www.ideca.gov.co/themes/custom/ideca2/logo.svg"); */
  background-image: url("../assets/img/logon_0.png");
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  height: 40px;
  width: 120px;
  min-width: 120px;
}

#span_titulo_aplicacion {
  font-size: 1rem;
  line-height: normal;
}

/* ----------------------------------------------
         Cabecera fija y botones circulares
         ---------------------------------------------- */
/* COMENTAR O ELIMINAR ESTO:
#cabecera-app {
  position: fixed;
  top: 0;
  width: 100%;
  background: #fafafa;
  border-bottom: 1px solid #e0e0e0;
  height: 56px;
}
*/

/* Estilos para la consola de administración como modal */

.admin-btn {
  border-radius: 0.375rem 0.375rem 0 0;
  border: 0;
  background: #f5f5f5;
  color: #212529;
}

.admin-btn.active {
  color: #212529;
  border: 1px solid #6c757d;
  background: #fff;
}

/* Estilos para los formularios de Proceso y Job como modales */
#form-proceso:not(.d-none),
#form-job:not(.d-none),
#form-permiso:not(.d-none) {
  z-index: 10000 !important;
  position: absolute;
  display: block !important;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background-color: #f8f9fa;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
  overflow-y: auto;
  border: 1px solid #939393;
  width: 70%;
  max-height: 85%;
}

#form-proceso {
  z-index: 3;
}

#form-job {
  z-index: 3;
}

#form-permiso {
  z-index: 3;
}

#seccion-admin.admin-visible {
  position: fixed !important;
  top: 50% !important;
  left: 50% !important;
  transform: translate(-50%, -50%) !important;
  width: 90% !important;
  max-width: 90% !important;
  max-height: 90vh !important;
  background-color: #ffffff !important;
  padding: 25px !important;
  border-radius: 8px !important;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15) !important;
  z-index: 1050 !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  box-sizing: border-box !important;
}

/* Área de contenido de administración */
.admin-area {
  overflow: visible;
}

/* Estilo para el botón de cerrar en el formulario */
#form-proceso .btn-close-form,
#form-job .btn-close-form {
  position: absolute;
  top: 10px;
  right: 10px;
  cursor: pointer;
}

/* Estilos para el componente de autocompletado */
.autocomplete-container {
  position: relative;
}

.autocomplete-items {
  position: absolute;
  border: 1px solid #ddd;
  border-top: none;
  z-index: 99;
  top: 100%;
  left: 0;
  right: 0;
  max-height: 300px;
  overflow-y: auto;
  background-color: #fff;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
  border-radius: 0 0 4px 4px;
}

.autocomplete-items div {
  padding: 10px;
  cursor: pointer;
}

.autocomplete-items div:hover {
  background-color: #e9ecef;
}

.autocomplete-active {
  background-color: #0d6efd !important;
  color: #ffffff;
}

.autocomplete-item-highlight {
  font-weight: bold;
  color: #0d6efd;
}

.autocomplete-spinner {
  position: absolute;
  right: 10px;
  top: 10px;
  display: none;
}

/* Estilos para selección ya realizada */
.autocomplete-selected {
  background-color: #e8f4ff;
  border: 1px solid #b8daff;
  border-radius: 4px;
}

/* Estilos para campos con selección completada */
.autocomplete-selected {
  background-color: #e8f4ff;
  border-color: #9ecdf4;
  color: #0d6efd;
  font-weight: 500;
}

/* Estilos para el spinner de carga */
.autocomplete-spinner {
  position: absolute;
  right: 10px;
  top: 10px;
  z-index: 5;
  display: none;
}

.container {
  max-width: initial !important;
}

/* Columnas visibles solo para administradores */
/* Ocultar columnas administrativas para usuarios no-admin */
body:not(.role-admin) .admin-only-column {
  display: none !important;
}

body.role-admin .admin-only-column {
  display: table-cell;
}

/* Estilo para el fondo de la página de login */
body {
  background-image: url('../assets/img/fondo-mapa-bogota-gris.png');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;

}

/* Estilos mejorados para el contenedor de login */
#loginContainer {
  margin-top: -7rem;
  background-color: #ffffff96;
  backdrop-filter: blur(10px);
  border-radius: 20px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  max-width: 500px;
}

#loginContainer .firebaseui-card-actions {
  padding: 8px 0px 10px 0px !important;
}

#loginContainer .col-md-12 {
  padding: 0;
}

/* Evitar que los elementos de FirebaseUI se estiren más de lo necesario */
#firebaseui-auth-container {
  width: 100%;
  display: inline-block;
}

.firebaseui-container {
  min-width: auto !important;
  width: 100% !important;
}

.firebaseui-card-content {
  padding: 0 !important;
  min-width: auto !important;
}

.firebaseui-card-header {
  padding: 0;
  font-size: 0.8rem !important;
}

.firebaseui-card-header h1 {
  font-size: 1rem !important;
}

.firebaseui-idp-button {
  border-radius: 4px !important;
  margin-bottom: 12px !important;
  width: 100% !important;
  max-width: 100% !important;
  display: flex;
  justify-content: center;
  align-items: center;
}

#loginContainer h2 {
  color: #003A5B;
  line-height: normal;
  font-size: 2rem;
}

#loginContainer h5 {
  text-align: justify;
  text-align-last: center;
  font-size: 16px;
}

/* Personalización del widget de FirebaseUI */
.firebaseui-container {
  background: transparent !important;
  box-shadow: none !important;
  max-width: 100% !important;
}

.firebaseui-card-content {
  padding: 0 !important;
}

.firebaseui-idp-button {
  border-radius: 4px !important;
  margin-bottom: 12px !important;
}

.firebaseui-idp-text {
  font-size: 15px !important;
}

/* Cuando el contenido principal está visible, usar un fondo diferente */
body.content-visible {
  background-image: none;
}

/* ----------------------------------------------
     Nuevo estilo para la estructura de headers
     ---------------------------------------------- */
.header-container {
  position: relative;
  width: 100%;
  display: flex;
  flex-direction: column;
}

#header-global-entidad {
  height: 50px;
  background-color: #3366CC;
  color: white;
  z-index: 1001;
}

#header-global-entidad .container {
  padding: 0 15px;
}

#header-global-entidad a {
  color: white;
  text-decoration: none;
}

#header-global-entidad a:hover {
  text-decoration: underline;
}

#cabecera-app {
  position: relative;
  top: 0;
  width: 100%;
  background: #fafafa;
  border-bottom: 1px solid #e0e0e0;
  min-height: 56px;
  z-index: 1000;
}

.btn-primary {
  border: 0;
}

.btn:disabled {
  color: #000;
  background: #cccccc !important;
  border: 0;
}

/* Ajuste para el main contenido para compensar la altura de los dos headers */
#vista-principal {
  padding-top: 0 !important;
  transition: background-color 0.3s ease;
}

/* --- Tabs de navegación --- */
.tabs ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;

}

.tabs ul li {
  line-height: normal;
  padding: 0.75em 1.5em;
  cursor: pointer;
  border: 1px solid transparent;
  border-top-left-radius: 8px;
  border-top-right-radius: 8px;
  margin-right: 4px;
  background: #f5f5f5;
  font-weight: 600;
  transition: background 0.2s;
}

.tabs ul li:hover {
  background: #eaeaea;
}

.tabs ul li.active {
  background: white;
  border-color: #ccc;
  border-bottom-color: white;
}

/* --- Borde para la sección de listas --- */
#seccion-lista {
  border-radius: 20px;
}

.vista-descargas {
  height: auto;
  max-height: calc(100vh - 280px);
  overflow-y: auto;
}

#div_especificos {
  overflow-x: hidden;
}

#div_generales {
  margin: 0 10px;
  overflow-x: auto;
}

#tabla-procesos {
  overflow: auto;
}

.table-responsive-descargas table {
  overflow: auto;
  height: auto;
}

/* Alineación vertical del contenido de celdas en Modales de metadatos */
#tabla-metadatos td,
#tabla-metadatos th {
  vertical-align: middle !important;
  padding: 0.75rem !important;
}

/* Asegurar altura mínima de filas para mejor espaciado */
.table tr {
  min-height: 45px;
}

.div_contenedor_conjunto_especifico {
  height: 100%;
}

.div_encabezado_conjunto_especifico {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: #f0f0f0;
  padding: 10px;
  border-radius: 5px;
}

.div_titulo_conjunto_especifico {
  font-weight: bold;
  font-size: 1.2em;
}

.span_titulo_conjunto_especifico {
  font-weight: bold;
}

.span_descripcion_conjunto_especifico {
  font-size: 1.2em;
  display: flex;
  width: 100%;
}

.label_dato_conjunto_especifico {
  font-weight: bold;
  margin-right: 5px;
  min-width: 65px;
  width: 75px;
}

.select_formato_conjunto_especifico {
  padding: 4px 8px;
  border-radius: 4px;
  border: 1px solid #ccc;
  margin-left: 5px;
  width: auto;
  flex-grow: 1;
}

.div_botones_conjunto_especifico {
  display: flex;
  justify-content: space-between;
}

.div_dato_conjunto_especifico {
  margin-bottom: 8px;
  display: flex;
  align-items: center;
}

#div_conjuntos_especificos i {
  display: flex;
  align-items: center;
}

#div_conjuntos_especificos .valores {
  border-bottom: 2px solid #d59a00;
}

#div_conjuntos_especificos .propietarios {
  border-bottom: 2px solid #EA0A2A;
}

#div_conjuntos_especificos .identificadores {
  border-bottom: 2px solid #003A5B;
}

.modal-header {
  display: initial;
  text-align: center;
}

.justify-content-center {
  justify-content: right !important;
}

.modal {
  --bs-modal-margin: 6.75rem !important;
}

@media screen and (max-width: 379px) {
  #span-cerrar-sesion {
    display: none !important;
  }
}

#btn-aceptar-condiciones {
  background-color: #003A5B;
  color: white;
  border: 1px solid #D1D1D1;
  padding: 10px 20px;
  border-radius: 5px;
  cursor: pointer;
}

#btn-rechazar-condiciones {
  background-color: #F2F2F2;
  color: black;
  border: 1px solid #D1D1D1;
  padding: 10px 20px;
  border-radius: 5px;
  cursor: pointer;
}

/* Estilos para el modal de condiciones de uso con backdrop blur */
.modal-backdrop {
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  background-color: rgba(0, 0, 0, 0.6);
  opacity: 1 !important;
}

/* Estilos para el backdrop modal global */
#backDropAdmin {
  backdrop-filter: blur(3px);
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.5);
  display: block;
  z-index: 1040;
}

#backDropForms {
  backdrop-filter: blur(3px);
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.5);
  display: block;
  z-index: 1060;
}




/* Asegurar que el modal de condiciones esté por encima del backdrop */
#modalCondicionesUso {
  z-index: 1060;
}


/* Estilo especial para el contenido del acuerdo de confidencialidad */
#div_acuerdo_confidencialidad {
  max-height: 400px;
  overflow-y: auto;
  background-color: #f8f9fa;
  padding: 1.25rem;
  border-radius: 0.375rem;
  box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.1);
  margin-bottom: 1rem;
}

/* Mejorar estilo para el checkbox de aceptación */
#checkAceptarCondiciones {
  margin-right: 8px;
}

/* Contenedor del checkbox para mejor alineación */
.firebaseui-tos {
  display: none !important;
}

.texto-terminos {
  text-align: justify;
  width: 100%;
  font-size: small;
}

.div-logo-entidad {
  position: fixed;
  bottom: 40px;
}

.div_frontpage_container {
  display: flex;
  flex-wrap: wrap;
  height: calc(100vh - 106px);
  background: linear-gradient(180deg, #FFFFFF00 65%, #ffffffcc 80%, #ffffffcc 100%);
  align-items: center;
  justify-content: center;
}

.div_contenedor_formulario_proceso {
  height: 86%;
  overflow-y: auto;
  overflow-x: hidden;
}

#form-job,
#form-permiso {
  height: initial !important;
}

/* Estilos para los placeholders */
::placeholder {
  font-style: italic;
  color: #a0a0a0;
  opacity: 1;
}

/* Soporte para Firefox */
::-moz-placeholder {
  font-style: italic;
  color: #a0a0a0;
  opacity: 1;
}

/* Soporte para Edge */
::-ms-input-placeholder {
  font-style: italic;
  color: #a0a0a0;
  opacity: 1;
}

/* Soporte para Internet Explorer */
:-ms-input-placeholder {
  font-style: italic;
  color: #a0a0a0;
  opacity: 1;
}

/* Soporte para Safari y Chrome */
::-webkit-input-placeholder {
  font-style: italic;
  color: #a0a0a0;
  opacity: 1;
}

th {
  font-weight: bold;
  color: #003A5B;
  background-color: white !important;
}

/* ----------------------------------------------
   Animaciones de UI
   ---------------------------------------------- */
@keyframes loginZoomIn {
  0% {
    transform: scale(0.1) translateZ(-1000px);
    opacity: 0;
  }

  100% {
    transform: scale(1) translateZ(0);
    opacity: 1;
  }
}

.animacion-zoom-in {
  animation: loginZoomIn 2s cubic-bezier(0.165, 0.84, 0.44, 1) forwards;
  perspective: 1000px;
}

/* ----------------------------------------------
   Soporte para Grid.js con table-striped de Bootstrap
   ---------------------------------------------- */
table.table-striped>tbody>tr.gridjs-tr:nth-of-type(odd)>td.gridjs-td {
  background-color: transparent !important;
}