/* =====================================================================
   DDR ALARMA · el banco de pruebas del demo
   =====================================================================
   Estilos del taller: el control remoto, la sirena y los marcos donde
   viven el celular y la tablet.

   La idea del diseño: que parezca una mesa de trabajo con los equipos
   de verdad puestos al lado, no una pagina de marketing con capturas.
   Por eso los marcos tienen grosor y sombra, el llavero esta dibujado
   como el que se entrega, y la sirena late.
   ===================================================================== */

.banco {
  display: grid;
  grid-template-columns: 260px minmax(0, 320px) minmax(0, 1fr);
  gap: 32px;
  align-items: start;
}
/* El boton de ayuda y la alarma vecinal no llevan tablet: dos columnas,
   y el celular mas grande porque es lo unico que hay para mirar. */
.banco--sin-tablet { grid-template-columns: 280px minmax(0, 360px); justify-content: start; gap: 44px; }
@media (max-width: 820px) { .banco--sin-tablet { grid-template-columns: 1fr; } }

/* ESTACIONES SEPARADAS (30/8): en la alarma hogar, el celular y el panel
   de pared son dos estaciones independientes, una debajo de la otra, cada
   una con su propio control y su propia casa simulada. */
.bancos { display: block; }
.separador-est {
  margin: 48px 0 22px; padding-top: 34px;
  border-top: 1px dashed var(--border-strong);
}
.separador-est h3 { font-family: var(--font-display); font-size: 1.15rem; margin: 0 0 6px; }
.separador-est .sub { font-size: .88rem; color: var(--muted); margin: 0; max-width: 640px; }
/* La estacion del panel: el control fijo al costado y la tablet grande.
   En pantalla completa ademas aparece el control flotante arrastrable. */
.banco--panel {
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr);
  gap: 32px; align-items: start;
  max-width: 1100px; margin: 0 auto;
}
@media (max-width: 820px) { .banco--panel { grid-template-columns: 1fr; gap: 24px; } }

/* ---- pantalla completa del panel, con el control flotante ---- */
.btn-tabfull {
  display: block; width: 100%; margin-top: 12px; padding: 12px 16px;
  border: 1px solid var(--border-strong); border-radius: var(--r-md);
  background: var(--surface); color: var(--text); font-family: inherit;
  font-size: .88rem; font-weight: 700; cursor: pointer;
  transition: border-color .15s, background .15s;
}
.btn-tabfull:hover { border-color: var(--accent); background: var(--accent-soft); }

.js-fullwrap { position: relative; }
.ctl-flotante, .cf-salir { display: none; }
.js-fullwrap:fullscreen { padding: 0; border-radius: 0; background: #000; }
.js-fullwrap:fullscreen iframe { aspect-ratio: auto; height: 100%; border-radius: 0; }
.js-fullwrap:fullscreen .ctl-flotante {
  display: block; position: absolute; right: 28px; bottom: 28px; z-index: 10;
  width: 190px; padding: 8px 10px 12px; border-radius: 18px;
  background: rgba(16, 20, 31, .78); backdrop-filter: blur(6px);
  border: 1px solid rgba(255, 255, 255, .16);
  box-shadow: 0 18px 44px rgba(0, 0, 0, .5);
}
.js-fullwrap:fullscreen .cf-barra {
  cursor: grab; touch-action: none; user-select: none;
  text-align: center; font-size: .72rem; color: #aeb6c4;
  padding: 4px 0 8px; letter-spacing: .3px;
}
.js-fullwrap:fullscreen .cf-barra:active { cursor: grabbing; }
.js-fullwrap:fullscreen .cf-salir {
  display: block; position: absolute; top: 18px; right: 18px; z-index: 10;
  padding: 9px 14px; border-radius: 999px; border: 1px solid rgba(255,255,255,.25);
  background: rgba(16,20,31,.7); color: #e7ebf2; font-family: inherit;
  font-size: .8rem; font-weight: 700; cursor: pointer;
}

@media (max-width: 1080px) {
  .banco { grid-template-columns: 1fr 1fr; }
  .banco .banco-tablet { grid-column: 1 / -1; }
}
@media (max-width: 760px) {
  .banco { grid-template-columns: 1fr; gap: 24px; }
}

.banco h3 {
  font-family: var(--font-display);
  font-size: .95rem;
  margin: 0 0 4px;
  display: flex; align-items: center; gap: 8px;
}
.banco .sub {
  font-size: .82rem; color: var(--muted); margin: 0 0 14px; line-height: 1.5;
}

/* ---------------- el celular ---------------- */
.marco-tel {
  border-radius: 34px;
  background: #10141f;
  padding: 10px;
  box-shadow: var(--shadow-lg), 0 0 0 1px rgba(255,255,255,.06) inset;
  position: relative;
}
.marco-tel::before {
  content: ""; position: absolute; top: 16px; left: 50%; transform: translateX(-50%);
  width: 62px; height: 5px; border-radius: 99px; background: #2a3145; z-index: 2;
}
.marco-tel iframe {
  width: 100%; aspect-ratio: 9 / 17.5; border: 0; border-radius: 26px;
  background: #fff; display: block;
}

/* ---------------- la tablet ---------------- */
.marco-tab {
  border-radius: 18px;
  background: #10141f;
  padding: 12px;
  box-shadow: var(--shadow-lg), 0 0 0 1px rgba(255,255,255,.06) inset;
}
.marco-tab iframe {
  width: 100%; aspect-ratio: 16 / 10; border: 0; border-radius: 10px;
  background: #0a0e16; display: block;
}

/* =====================================================================
   EL CONTROL REMOTO
   Es el MISMO dibujo en toda la web: la carcasa metalica con A y B
   grandes, C y D chicas, la banda de goma negra y el ojal — el control
   que de verdad se entrega con los equipos. El SVG lo arma banco.js;
   aca van el brillo del LED y el tacto de las teclas.
   ===================================================================== */
.llavero { margin: 0 auto; filter: drop-shadow(0 14px 22px rgba(0,0,0,.28)); }
#ddr-led { transition: fill .1s; }
#ddr-led.on { fill: #ff4136; filter: drop-shadow(0 0 6px rgba(255,65,54,.85)); }
.tecla-svg { cursor: pointer; transition: transform .1s ease; transform-box: fill-box; transform-origin: center; }
.tecla-svg:hover { transform: scale(1.09); }
.tecla-svg:active { transform: scale(.88); }
.tecla-svg:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 50%; }

.llavero-pie {
  margin-top: 12px; text-align: center; font-size: .72rem; color: var(--muted); line-height: 1.55;
}
.llavero-pie b { color: var(--text-2); }

/* mapa de los botones, debajo del llavero */
.mapa-teclas { display: grid; gap: 5px; margin-top: 14px; font-size: .78rem; }
.mapa-teclas div { display: flex; align-items: center; gap: 8px; color: var(--text-2); }
.mapa-teclas .k {
  width: 21px; height: 21px; border-radius: 50%; background: var(--surface-3);
  display: grid; place-items: center; font-weight: 800; font-size: .68rem;
  font-family: var(--font-display); color: var(--text); flex-shrink: 0;
}

/* =====================================================================
   LA SIRENA
   ===================================================================== */
.sirena {
  margin-top: 20px; padding: 15px; border-radius: var(--r-lg);
  background: var(--surface); border: 1px solid var(--border); text-align: center;
}
.sirena-luz {
  width: 46px; height: 46px; border-radius: 50%; margin: 0 auto 9px;
  background: var(--surface-3); display: grid; place-items: center; font-size: 1.35rem;
  transition: background .2s, box-shadow .2s;
}
.sirena.sonando { border-color: var(--danger); background: rgba(217,45,32,.05); }
.sirena.sonando .sirena-luz {
  background: var(--danger); animation: sirenaLate .55s ease-in-out infinite;
}
@keyframes sirenaLate {
  0%, 100% { box-shadow: 0 0 0 0 rgba(217,45,32,.55); }
  50%      { box-shadow: 0 0 0 14px rgba(217,45,32,0); }
}
.sirena .estado { font-weight: 700; font-size: .88rem; font-family: var(--font-display); }
.sirena .detalle { font-size: .76rem; color: var(--muted); margin-top: 3px; }

/* respetar a quien pidió menos movimiento */
@media (prefers-reduced-motion: reduce) {
  .sirena.sonando .sirena-luz { animation: none; box-shadow: 0 0 0 6px rgba(217,45,32,.3); }
}

/* =====================================================================
   BOTONES PARA SIMULAR
   ===================================================================== */
.simular { display: grid; gap: 8px; margin-top: 18px; }
.simular button {
  display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 11px 13px; border-radius: var(--r-md);
  background: var(--surface); border: 1px solid var(--border);
  font-family: inherit; font-size: .85rem; font-weight: 600; color: var(--text);
  cursor: pointer; text-align: left; transition: border-color .15s, background .15s;
}
.simular button:hover { border-color: var(--accent); background: var(--accent-soft); }
.simular button .em { font-size: 1.05rem; }
.simular button small { display: block; font-weight: 400; color: var(--muted); font-size: .74rem; }

/* aviso de que es simulado */
.nota-demo {
  margin-top: 18px; padding: 12px 14px; border-radius: var(--r-md);
  background: var(--surface-2); border: 1px dashed var(--border-strong);
  font-size: .78rem; color: var(--text-2); line-height: 1.55;
}
.nota-demo b { color: var(--text); }
