html {
  height: 100%; /* Asegura que el HTML ocupe el 100% */
}

body {
  display: flex; /* Habilita el modo Flexbox */
  flex-direction: column; /* Apila los elementos verticalmente */
  min-height: 100vh; /* Ocupa el 100% de la altura de la ventana (Viewport Height) */
  margin: 0; /* Elimina el margen por defecto del body */
}

/* El elemento que envuelve todo el contenido variable (tu #page) */
#page {
  flex-grow: 1; /* Esto hace que #page ocupe TODO el espacio restante, empujando el footer abajo */
  display: flex; /* Necesario para que su hijo (page-wrapper) se estire */
  flex-direction: column;
}

/* Asegura que la sección de contenido de Tabler (page-wrapper) se estire dentro de #page */
.page-wrapper {
  flex-grow: 1;
}

.sombreado-negro-img {
  filter: drop-shadow(1px 1px 5px #000);
}

.sombreado-blanco-img {
  filter: drop-shadow(1px 1px 5px #fff);
}

/* Chrome, Edge, Opera, Safari */
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* Firefox */
input[type="number"] {
  -moz-appearance: textfield;
}

/*--------------------------------------------------------------
# Mejoa visual del select2
--------------------------------------------------------------*/
.select2-container--bootstrap-5 .select2-selection--multiple {
  min-height: 38px !important;
  padding: 3px 8px !important;
  align-content: center !important;
  display: flex !important;
  align-items: center !important;
}

.select2-container--bootstrap-5
  .select2-selection--multiple
  .select2-selection__rendered {
  flex-wrap: inherit !important;
}

.select2-container--bootstrap-5
  .select2-selection--multiple
  .select2-selection__choice {
  font-size: 0.75rem !important;
  padding: 0 4px 0 0 !important;
  margin: 2px 4px 2px 0 !important;
  height: 22px !important;
  line-height: 20px !important;
  display: inline-flex !important;
  align-items: center !important;
  color: #495057 !important;
  background: #f8f9fa !important;
  border: 1px solid #dee2e6 !important;
}

.select2-container--bootstrap-5
  .select2-selection--multiple
  .select2-selection__choice
  .select2-selection__choice__remove {
  width: 18px !important;
  height: 100% !important;
  border: none !important;
  margin-right: 2px !important;
  background-size: 0.8em !important;
  opacity: 0.6;
  transition: opacity 0.2s;
}

.select2-container--bootstrap-5
  .select2-selection--multiple
  .select2-selection__choice
  .select2-selection__choice__remove:hover {
  opacity: 1;
  color: #dc3545 !important;
}

.select2-container--bootstrap-5
  .select2-selection--multiple
  .select2-search--inline
  .select2-search__field {
  margin-top: 0 !important;
  height: 24px !important;
  line-height: 22px !important;
  font-family: inherit !important;
}

.select2-container--bootstrap-5 .select2-dropdown .select2-results__option {
  padding: 4px 10px !important;
  font-size: 0.85rem !important;
}

.select2-container--bootstrap-5
  .select2-results__option--highlighted[aria-selected] {
  background-color: #206bc4 !important;
  color: white !important;
}

/* Z-INDEX FIX: Obligatorio para Select2 dentro de Modales Bootstrap */
.select2-container--bootstrap-5 .select2-dropdown,
.select2-container--default .select2-dropdown {
  z-index: 99999 !important;
}
