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;
}

/* ----------------------------------------------
     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;
}
*/
.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;
}

.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("https://www.catastrobogota.gov.co/sites/default/files/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: fixed;
  display: block !important; /* Asegurar visibilidad */
  top: 70px;
  right: 0;
  left: 0;
  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: 60%;
  height:85%;
}

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

#seccion-admin:not(.oculto) {
  position: fixed;
  top: 5%;
  left: 5%;
  width: 90%;
  height: 90vh;
  background-color: #ffffff;
  padding: 25px;
  border-radius: 8px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
  z-index: 2;
  display: flex !important;
  flex-direction: column;
  overflow: hidden; /* la sección en sí no hace scroll */
}

/* El header (título + botón cerrar) siempre visible */
#seccion-admin > .d-flex:first-child {
  flex-shrink: 0;
}

/* La subnav de botones siempre visible */
#seccion-admin > .admin-subnav {
  flex-shrink: 0;
}

/* Solo el área de contenido hace scroll */
.admin-area {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  min-height: 0; /* necesario para que flex + overflow-y funcionen */
}

/* 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;
  display: none;
}

.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('../img/fondo-mapa-bogota-gris.png');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
  /* height: 100%;
  min-height: 100vh; */
}

/* 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;
}

/* Cuando el contenido principal está visible (sesión abierta), usar fondo blanco */

/* --- Tabs de navegación --- */
.tabs ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  /* border-bottom: 1px solid #ccc; */
}

.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-generales th:nth-child(2) { min-width: 260px; }  /* Descripción */
#tabla-generales th:nth-child(6) { min-width: 210px; }  /* Acción (2 botones) */

#tabla-procesos {
  overflow: auto;
}

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

.table-responsive-descargas .admin-only-column {
  width: 150px;
}

.table>thead {
  position: sticky;
  top: 0;
}

/* Alineación vertical del contenido de celdas en tablas */
.table td, .table th {
  vertical-align: middle !important;
}

/* Aplicar a tablas específicas también para mayor especificidad */
#tabla-especificos td,
#tabla-especificos th,
#tabla-generales td,
#tabla-generales th,
#tabla-procesos td,
#tabla-procesos th,
#tabla-jobs td,
#tabla-jobs th,
#tabla-permisos td,
#tabla-permisos th,
#tabla-entidades td,
#tabla-entidades th,
#tabla-metadatos td,
#tabla-metadatos th {
  vertical-align: middle !important;
}

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

/* Asegurar espacio adecuado en celdas */
.table td, .table th {
  padding: 0.75rem !important;
}

.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;
}

#div_conjuntos_especificos .fa-dollar-sign {
  color: #d59a00;
}

#div_conjuntos_especificos .fa-user {
  color: #EA0A2A;
}

#div_conjuntos_especificos .fa-location-dot {
  color: #003A5B;
}

#div_acuerdo_confidencialidad {
  font-family: Courier New, Courier, monospace;
  height: 400px;
  overflow-y: auto;
  padding: 10px;
  background-color: #f0f0f0;
  border-radius: 5px;
  box-shadow: 0px 0px 5px #ccc;
}

#div_contenido_acuerdo_confidencialidad {
  padding: 30px;
  padding-bottom: 0px;
}

.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: 1;
}

#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: 2;
}


/* Asegurar que los formularios modales estén por encima del backdrop */
/* .form-show:not(.d-none) {
  position: relative;
  z-index: 1050 !important;
} */

/* 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;
}

/*
#div_row_especificos {
  margin-left: initial !important;
  margin-right: initial !important;
  justify-content: space-between;
}

#div_conjunto_valores, #div_conjunto_propietarios, #div_conjunto_identificadores {
  width: 32%;
}
*/