/* ─── REMOTE CONTROL ────────────────────────────────────────────────────────────
   Estilos del control remoto por QR: el diálogo de emparejamiento que aparece
   en la página principal y la página de control que usa el móvil.
   ─────────────────────────────────────────────────────────────────────────────── */

/* El atributo hidden tiene que ganar a los display de flex/inline-flex de los
   paneles y de los botones, o los diálogos se ven aunque estén cerrados. */
.bomb-remote-section[hidden],
.bomb-remote-alert[hidden],
.brutal-btn[hidden] {
  display: none;
}

/* ─── DIÁLOGO DE EMPAREJAMIENTO (página principal) ─────────────────────────── */
.bomb-remote-dialog {
  width: min(460px, calc(100vw - 32px));
}

.bomb-remote-steps {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 18px;
  counter-reset: bomb-remote-step;
}

.bomb-remote-step {
  display: flex;
  flex-direction: column;
  gap: 12px;
  counter-increment: bomb-remote-step;
}

.bomb-remote-step-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #f8fafc;
}

.bomb-remote-step-title::before {
  content: counter(bomb-remote-step);
  flex: 0 0 auto;
  width: 26px;
  height: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #F5B201;
  color: #0f172a;
  border: 3px solid var(--border);
  border-radius: 6px;
  box-shadow: 3px 3px 0 0 rgba(0, 0, 0, 0.35);
  font-size: 13px;
  font-weight: 900;
}

.bomb-remote-qr {
  align-self: center;
  background: #ffffff;
  border: 3px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 3px 3px 0 0 rgba(0, 0, 0, 0.35);
  padding: 10px;
  display: flex;
}

.bomb-remote-qr img {
  display: block;
  width: 208px;
  max-width: 100%;
  height: auto;
  image-rendering: pixelated;
}

.bomb-remote-linkrow {
  display: flex;
  gap: 8px;
  align-items: stretch;
}

.bomb-remote-link {
  flex: 1 1 auto;
  min-width: 0;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px !important;
  padding: 10px !important;
}

.bomb-remote-status {
  margin: 0;
  font-size: 13px;
  font-weight: 700;
  color: #cbd5e1;
  min-height: 18px;
}

.bomb-remote-status[data-state="connected"] {
  color: #44ff88;
}

.bomb-remote-status[data-state="error"] {
  color: #ff7a7a;
}

.bomb-remote-status .ti {
  vertical-align: -2px;
  margin-right: 4px;
}

/* Punto verde en el botón del navbar cuando hay un móvil conectado. */
.bomb-remote-btn.is-connected {
  border-color: #44ff88 !important;
  box-shadow: 3px 3px 0 0 #1f7a3f !important;
}

/* ─── PÁGINA DE CONTROL (móvil) ─────────────────────────────────────────────── */
.bomb-remote-body {
  display: block;
  height: auto;
  min-height: 100vh;
  overflow-y: auto;
  padding: 16px;
}

.bomb-remote-shell {
  max-width: 460px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.bomb-remote-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
}

.bomb-remote-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: 'Bebas Neue', sans-serif;
  font-size: 22px;
  letter-spacing: 0.06em;
  color: #f8fafc;
  line-height: 1;
}

.bomb-remote-brand-tag {
  font-family: 'Nunito', sans-serif;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.12em;
  padding: 3px 7px;
  border: 2px solid var(--border);
  border-radius: 5px;
  background: #F5B201;
  color: #0f172a;
}

.bomb-remote-status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #cbd5e1;
}

.bomb-remote-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #94a3b8;
  box-shadow: 0 0 0 3px rgba(148, 163, 184, 0.2);
}

.bomb-remote-status[data-state="running"] .bomb-remote-dot,
.bomb-remote-status[data-state="connected"] .bomb-remote-dot {
  background: #44ff88;
  box-shadow: 0 0 0 3px rgba(68, 255, 136, 0.22);
}

.bomb-remote-status[data-state="paused"] .bomb-remote-dot {
  background: #F5B201;
  box-shadow: 0 0 0 3px rgba(245, 178, 1, 0.22);
}

.bomb-remote-status[data-state="disconnected"] .bomb-remote-dot {
  background: #ff5c5c;
  box-shadow: 0 0 0 3px rgba(255, 92, 92, 0.22);
}

.bomb-remote-alert {
  padding: 12px 14px;
  border: 3px solid #ff5c5c;
  border-radius: var(--radius);
  background: rgba(255, 92, 92, 0.12);
  color: #ffd7d7;
  font-size: 13px;
  font-weight: 700;
}

/* Reloj gigante */
.bomb-remote-clock {
  padding: 18px 16px;
  text-align: center;
}

.bomb-remote-time {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(56px, 18vw, 96px);
  line-height: 0.95;
  color: #ffffff;
  text-shadow: 4px 4px 0 #3a2a60;
  font-variant-numeric: tabular-nums;
}

.bomb-remote-subtitle {
  margin-top: 6px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #F5B201;
  overflow-wrap: anywhere;
}

.bomb-remote-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.bomb-remote-grid.two {
  grid-template-columns: repeat(2, 1fr);
}

.bomb-remote-grid .brutal-btn {
  padding: 14px 8px;
  font-size: 13px;
}

.bomb-remote-big {
  padding: 18px 10px;
  font-size: 16px !important;
}

.bomb-remote-fields {
  display: flex;
  align-items: center;
  gap: 6px;
}

.bomb-remote-fields .brutal-input {
  text-align: center;
  font-family: 'Bebas Neue', sans-serif;
  font-size: 26px;
  letter-spacing: 0.04em;
  padding: 8px 4px;
}

.bomb-remote-fields-sep {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 26px;
  color: #cbd5e1;
}

.bomb-remote-section {
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.bomb-remote-section-title {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #94a3b8;
}

.bomb-remote-lead {
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
  color: #cbd5e1;
}

.bomb-remote-code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  text-transform: uppercase;
  letter-spacing: 0.3em;
  font-size: 20px;
  font-weight: 800;
}

.bomb-remote-leave {
  width: 100%;
}

@media (max-width: 380px) {
  .bomb-remote-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
