.html-root {
  font-size: 14px;
}

/* Container to ensure the iframe uses the full horizontal space of the page container */
.embed-container {
  width: 100%;
  padding: 0;
  margin: 0;
  box-sizing: border-box;
}

/* Strong rule to ensure embedded iframe occupies all horizontal space in case parent rules collide */
.embed-container .embed-full {
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  display: block;
}

@media (min-width: 768px) {
  .html-root {
    font-size: 16px;
  }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

html, body {
  height: 100%;
}

/* Make the site layout use flex so the root container fills available space */
body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  margin: 0;
  padding: 0 5px; /* small horizontal margin requested */
}

/* The main container should expand to fill the space between header and footer.
   Use a container-fluid without side padding so the content spans full width. */
body > .container-fluid {
  flex: 1 0 auto;
  display: flex;
  flex-direction: column;
  width: 100%;
  margin: 0;
  /* Keep small horizontal padding from body while occupying full width */
  padding-left: 5px;
  padding-right: 5px;
}

main[role="main"] {
  flex: 1 0 auto;
  display: flex;
  flex-direction: column;
}

/* Make iframe embedded demos expand to fill remaining vertical space
   and avoid internal scrollbars. The page container for this Razor Page
   already uses flex layout so an iframe with min-height:0 and flex:1
   will grow correctly. */
.embed-full {
  display: block;
  width: 100%;
  /* allow flex children to shrink below their content size */
  min-height: 0;
  /* let the iframe take remaining space when its parent is a flex container */
  flex: 1 1 auto;
  height: auto; /* avoid fixed height so it can be sized by flex */
  overflow: hidden; /* hide internal scrollbars */
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
  color: var(--bs-secondary-color);
  text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
  text-align: start;
}

/* Asegurar que el icono y el texto de los enlaces del navbar no se separen en filas
   manteniendo el icono y el label juntos sin afectar el comportamiento responsive
   de Bootstrap (collapse en móviles). */
.navbar .nav-link, .navbar .dropdown-item {
  display: inline-flex;
  align-items: center;
  gap: .5rem; /* espacio entre icono y texto */
  white-space: nowrap; /* evita que el icono y el texto se separen en líneas distintas */
}

.navbar .nav-link i, .navbar .dropdown-item i {
  flex-shrink: 0; /* evitar que el icono se reduzca y quede en otra línea */
}

/* Asegurar que el contenido del navbar y del footer coincida con el ancho
   del contenedor principal y quede centrado. Mantener width:100% para que
   en dispositivos pequeños el contenedor se adapte. */
.navbar .container,
.navbar .container-fluid,
footer .container,
footer .container-fluid {
  width: 100%;
  margin: 0;
  padding-left: 0;
  padding-right: 0;
}
