/* Páginas "Agregar bots" y "Tienda automática" (ronda 12): franja fina --night y el iframe a pantalla completa.
   Sin scroll en la página: solo el iframe se desplaza por dentro. */
html, body.embed-page { height: 100%; margin: 0; overflow: hidden; background: var(--night); }
.embed-page { display: flex; flex-direction: column; height: 100dvh; }

/* Franja: 48 px más el área segura del celular (muesca) */
.embed-bar {
  flex: none; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px;
  height: calc(48px + env(safe-area-inset-top)); padding: env(safe-area-inset-top) max(12px, env(safe-area-inset-right)) 0 max(12px, env(safe-area-inset-left));
  background: var(--night); color: var(--on-night); border-bottom: 1px solid var(--glass-line);
}
.embed-back {
  justify-self: start; display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 14px 0 10px;
  border-radius: var(--r-pill); border: 1px solid var(--head-btn-line); color: var(--on-night); font: 600 14px var(--font-ui); text-decoration: none;
}
.embed-back:hover { background: var(--head-btn-hover); }
.embed-back:focus-visible { outline: 2px solid var(--accent-line); outline-offset: 2px; }
.embed-title { display: flex; align-items: center; gap: 8px; min-width: 0; }
/* Interlínea 1.4: con overflow hidden (para los "…"), una de 1 recorta los acentos de las mayúsculas (Á) */
.embed-title h1 { margin: 0; font: 800 15px/1.4 var(--font-display); text-transform: uppercase; letter-spacing: .01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.embed-logo { width: 28px; height: 28px; object-fit: contain; flex: none; }
.embed-title .brand-mark { display: grid; place-items: center; flex: none; width: 28px; height: 28px; border-radius: 8px; background: var(--accent); font: 800 14px var(--font-display); }

/* El iframe ocupa todo el resto, sin márgenes ni bordes. Debajo, el indicador de carga. */
.embed-main { position: relative; flex: 1; min-height: 0; }
.embed-main iframe { position: absolute; inset: 0; z-index: 1; display: block; width: 100%; height: 100%; border: 0; }
.embed-loading {
  position: absolute; inset: 0; z-index: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px;
  color: var(--on-night-soft); font: 600 15px var(--font-ui);
}
.embed-loading[hidden] { display: none; }
.spinner { width: 36px; height: 36px; border-radius: 50%; border: 3px solid var(--glass-line); border-top-color: var(--accent-line); animation: spin 800ms linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation: none; border-top-color: var(--glass-line); } }

/* Celular: el botón queda solo con el ícono (el nombre sigue en aria-label) para que entre el título */
@media (max-width: 559px) {
  .embed-bar { gap: 8px; }
  .embed-back { width: 40px; height: 36px; padding: 0; justify-content: center; }
  .embed-back-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .embed-title h1 { font-size: 13px; }
}
