/* SIMULADOR LAUNCHER */
.simulador-launcher {
  height: 100vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.sim-bar {
  background: var(--ink); color: #fff; padding: 12px 20px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  flex-shrink: 0;
}
.sim-bar .btn-ghost { background: rgba(255,255,255,0.1); color: #fff; border-color: rgba(255,255,255,0.2); }
.sim-bar-title { font-size: 14px; }
.sim-bar .muted { color: rgba(255,255,255,0.6) !important; }

/* Área de contenido — ocupa todo el espacio restante */
.sim-frame { flex: 1; overflow: hidden; position: relative; }

/* iframe a pantalla completa */
.sim-iframe {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  border: none; display: block;
}

/* Contenido centrado (carga, error, mock) */
.sim-center {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  padding: 40px;
  background: var(--bg-2);
  text-align: center;
}

.sim-mock {
  background: var(--surface); border-radius: var(--radius-xl); border: 1px solid var(--border);
  padding: 48px; max-width: 520px; width: 100%;
}

/* CTA overlay — modo diagnóstico anónimo */
.sim-cta-overlay {
  position: absolute;
  inset: 0;
  background: rgba(11, 37, 69, 0.82);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.sim-cta-card {
  background: var(--surface);
  border-radius: var(--radius-xl);
  padding: 40px 36px;
  max-width: 460px;
  width: 90%;
  text-align: center;
  box-shadow: 0 32px 80px rgba(0,0,0,0.4);
}
.sim-cta-card h2 { font-size: 22px; margin-top: 14px; }

@media (max-width: 640px) {
  .sim-cta-card { padding: 28px 20px; }
  .sim-cta-card h2 { font-size: 19px; }
}

/* ── Responsive ─────────────────────────────────────────────── */

/* Tablets portrait + teléfonos grandes */
@media (max-width: 640px) {
  /* 100dvh = dynamic viewport height (compensa barra de dirección en móvil) */
  .simulador-launcher { height: 100dvh; }

  .sim-bar { padding: 10px 14px; gap: 10px; }
  .sim-bar-title {
    font-size: 13px;
    flex: 1;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
  }
  .sim-bar .btn-sm { padding: 6px 10px; font-size: 12px; }
  .sim-bar > div:last-child { font-size: 11px; white-space: nowrap; flex-shrink: 0; }

  .sim-center { padding: 24px 16px; }
  .sim-mock { padding: 28px 20px; max-width: 100%; border-radius: var(--radius-lg); }
}

/* Teléfonos pequeños */
@media (max-width: 480px) {
  .sim-bar { padding: 8px 12px; gap: 8px; }
  .sim-bar-title { font-size: 12px; }
  .sim-bar > div:last-child { display: none; } /* oculta "X/Y intentos" en pantallas muy chicas */
  .sim-center { padding: 20px 14px; }
  .sim-mock { padding: 24px 16px; }
}
