/* Lo propio de la DEMO (franja, guía, carga, teclas clickeables). La app usa sus estilos de siempre. */

body.con-demo #pantalla { height: calc(100% - 40px); margin-top: 40px; }
body.con-guia #pantalla { margin-right: 330px; }

.demo-franja {
  position: fixed; top: 0; left: 0; right: 0; z-index: 900; height: 40px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 0 12px;
  background: linear-gradient(90deg, #1d4ed8, #2563eb); color: #fff; font-size: 14px;
  box-shadow: 0 2px 8px rgba(15, 23, 42, .25);
}
.demo-franja-marca { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.demo-franja-marca strong { padding: 2px 8px; margin-right: 4px; border-radius: 5px; background: #fbbf24; color: #111827; letter-spacing: .05em; }
.demo-franja-acciones { display: flex; gap: 8px; flex: none; }

.demo-boton {
  display: inline-flex; align-items: center; padding: 5px 12px; border: 1px solid rgba(255, 255, 255, .6); border-radius: 7px;
  background: rgba(255, 255, 255, .14); color: #fff; font: 600 13px var(--fuente, "Segoe UI", system-ui, sans-serif); text-decoration: none; cursor: pointer;
}
.demo-boton:hover { background: rgba(255, 255, 255, .28); }
.demo-boton-claro { background: #fff; color: #1d4ed8; border-color: #fff; }
.demo-boton-claro:hover { background: #dbeafe; }

/* Las teclas de la barra de abajo se pueden clickear (la tecla simulada va a la pantalla). */
.barra-teclas > span { cursor: pointer; border-radius: 6px; padding: 2px 4px; margin: -2px -4px; }
.barra-teclas > span:hover { background: #dbeafe; }

/* La guía, a la derecha */
.demo-guia {
  position: fixed; top: 40px; right: 0; bottom: 0; z-index: 800; width: 330px; overflow: auto;
  padding: 14px 16px 20px; background: #fff; border-left: 1px solid #d1d5db; box-shadow: -6px 0 18px -10px rgba(15, 23, 42, .3);
  font-size: 14px; color: #111827;
}
.demo-guia[hidden] { display: none; }
.demo-guia-cabecera { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; font-size: 16px; }
.demo-guia-cerrar { border: 0; background: none; font-size: 22px; line-height: 1; color: #6b7280; cursor: pointer; padding: 0 4px; }
.demo-guia-sub { margin: 0 0 4px; color: #6b7280; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; }
.demo-guia-usuarios { padding: 10px 12px; margin-bottom: 12px; border-radius: 10px; background: #eff6ff; border: 1px solid #bfdbfe; }
.demo-guia-usuarios table { width: 100%; border-collapse: collapse; background: transparent; }
.demo-guia-usuarios td { padding: 3px 4px; border: 0; }
.demo-guia-num { font: 700 14px var(--fuente-numeros, Consolas, monospace); text-align: right; }
.demo-guia-recorridos details { margin-bottom: 8px; border: 1px solid #e5e7eb; border-radius: 8px; padding: 6px 10px; }
.demo-guia-recorridos summary { cursor: pointer; font-weight: 700; }
.demo-guia-recorridos ol { margin: 6px 0 2px; padding-left: 20px; }
.demo-guia-recorridos li { margin-bottom: 3px; }
.demo-guia-nota { margin: 12px 0 0; color: #6b7280; font-size: 13px; }

/* Carga y avisos */
.demo-carga {
  position: fixed; inset: 0; z-index: 1000; display: grid; place-items: center; padding: 16px;
  background: linear-gradient(180deg, #f8fbff, #dbeafe);
}
.demo-carga-caja {
  display: grid; gap: 12px; justify-items: center; max-width: 440px; padding: 28px; border-radius: 14px;
  background: #fff; box-shadow: 0 18px 40px -18px rgba(15, 23, 42, .35); text-align: center; color: #111827;
}
.demo-carga-caja strong { font-size: 20px; }
.demo-carga-caja p { margin: 0; color: #4b5563; }
.demo-carga-caja .demo-boton { background: #1d4ed8; border-color: #1d4ed8; }
.demo-carga-caja .demo-boton-claro { background: #fff; color: #1d4ed8; }
.demo-carga-error .demo-carga-texto { color: #b91c1c; font-weight: 600; }

@media (max-width: 1100px) {
  body.con-guia #pantalla { margin-right: 0; }
  .demo-guia { width: min(330px, 90vw); }
  .demo-franja-marca { font-size: 12px; }
}
