/* Footer fijo abajo */
.ftr-wrap {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 950;
  border-top: 1px solid var(--border);
  background: var(--footer-bg);
  color: var(--footer-fg);
}

/* Contenedor interno */
.ftr {
  display: flex;
  align-items: center;          /* centra verticalmente */
  justify-content: space-between;
  height: var(--footer-h);
  padding-inline: 16px;
}


/* Zona izquierda reservada para futuro */
.ftr-left {
  flex: 1 1 auto;
}

/* Zona derecha: versión | logo en fila */
.ftr-right {
  display: flex;
  align-items: center;          /* centra verticalmente versión y logo */
  gap: 8px;                     /* espacio horizontal entre ellos */
}

/* Versión clickeable */
#footer-version {
  cursor: pointer;
  font-size: 14px;
  line-height: 1;               /* para que no empuje la altura */
  font-weight: 400;
  color: color-mix(in srgb, var(--accent) 50%, var(--footer-fg));
}


/* Logo */
#ftr-logo {
  height: 28px;
  width: auto;
  display: block;
}

/* Chips en el footer, si algún día los usamos */
.ftr .chip {
  color: var(--footer-fg);
  border-color: currentColor;
}

/* Links por si acaso */
.ftr a {
  color: var(--footer-fg);
  text-decoration: none;
}
/* Dominio en el footer (lado izquierdo) */
.ftr-domain {
  font-weight: 600;
  font-size: 0.85rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}


/* Breadcrumb estático (Collection > Corpus) en el footer, lado izquierdo */
.ftr-crumb-static {
  font-size: 0.8rem;
  display: flex;
  align-items: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-weight: 700;
}


/* ===========================
   Loader de footer (carga corpus)
   El footer se convierte en una barra 0–100% con texto centrado
   =========================== */
.ftr-wrap {
  overflow: hidden; /* para recortar la barra de carga */
}

.ftr-wrap .ftr-loader {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  bottom: 0;
  display: none;
  align-items: center;
  justify-content: center;
  background: #ffffff; /* fondo blanco mientras carga; la barra pinta el color del sitio encima */
}

.ftr-wrap.ftr-loading .ftr-loader {
  display: flex;
}

.ftr-wrap.ftr-loading .ftr {
  visibility: hidden; /* ocultar contenido normal mientras carga */
}

/* Barra de progreso que avanza de izquierda a derecha con 100% del color del sitio */
.ftr-loader-bar {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 0%;
  background: var(--accent, #154a8e);
  transition: width 0.20s ease-out;
}

/* Bloque de texto centrado por encima de la barra */
.ftr-loader-text {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-weight: 600;
  font-size: 0.9rem;
  pointer-events: none;
}

.ftr-loader-line1 {
  line-height: 1.2;
}

.ftr-loader-line2 {
  margin-top: 2px;
  font-size: 0.75rem;
  opacity: 0.9;
  max-width: 90%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
