/* Barra de la demo estática. Usa los colores y la tipografía de la aplicación (css/app.css). */

body.demo { --alto-demo: 2.75rem; }
.barra-demo .demo-portada { color: var(--uva-oscura); text-underline-offset: 3px; font-weight: 600; padding: 0 .25rem; }

.barra-demo {
  position: sticky;
  top: 0;
  z-index: 45;
  min-height: var(--alto-demo);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1.25rem;
  padding: 0.35rem 1.25rem;
  background: #f7f3f6;
  border-bottom: 1px solid #dfd6df;
  color: var(--texto);
  font-size: var(--t-s);
}
.barra-demo-leyenda { margin: 0; display: flex; align-items: baseline; gap: 0.75rem; min-width: 0; }
.barra-demo-leyenda strong { font-weight: 750; white-space: nowrap; }
.barra-demo-leyenda span { color: var(--texto-2); font-size: var(--t-xs); }
.barra-demo-acciones { display: flex; align-items: center; gap: 0.5rem; flex: none; }
.barra-demo-acciones label { font-size: var(--t-xs); font-weight: 600; color: var(--texto-2); white-space: nowrap; }
.barra-demo select {
  width: auto;
  min-height: 2rem;
  padding: 0.2rem 1.6rem 0.2rem 0.5rem;
  font-size: var(--t-s);
  font-weight: 600;
  background-color: var(--nieve);
}
.barra-demo button {
  min-height: 2rem;
  padding: 0.2rem 0.7rem;
  border: 1px solid var(--borde-fuerte);
  border-radius: var(--radio);
  background: var(--nieve);
  color: var(--texto);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}
.barra-demo button:hover { border-color: var(--texto); }
.barra-demo select:focus-visible, .barra-demo button:focus-visible { outline: 2px solid var(--uva); outline-offset: 1px; }

/* La aplicación ocupa lo que queda debajo de la barra. */
body.demo .marco { min-height: calc(100vh - var(--alto-demo)); }
body.demo .lateral { top: var(--alto-demo); height: calc(100vh - var(--alto-demo)); }
body.demo .ingreso { min-height: calc(100vh - var(--alto-demo)); }
body.demo .pegado { top: calc(var(--alto-demo) + 1.25rem); }

@media (max-width: 900px) {
  /* En pantallas chicas la barra queda arriba de todo y se va con el desplazamiento. */
  .barra-demo { position: static; flex-wrap: wrap; padding: 0.5rem 1rem; }
  .barra-demo-leyenda span { display: none; }
  .barra-demo-acciones { flex: 1 1 100%; min-width: 0; }
  .barra-demo select { flex: 1 1 auto; min-width: 0; }
  body.demo .lateral { top: 0; height: auto; }
  body.demo .marco, body.demo .ingreso { min-height: 100vh; }
}

@media (max-width: 540px) {
  .barra-demo-acciones { flex-wrap: wrap; }
  .barra-demo-acciones label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .barra-demo-acciones select { max-width: 100%; }
}

@media print {
  .barra-demo { display: none !important; }
}
