/* ============================================================
   §13 — PWA (Workstream D): banner de instalación, switches iOS
   y sección Notificaciones (Más). Usa los tokens de app.css.
   ============================================================ */

/* ---------- banner "Instala Atlas" ---------- */
.pwa-banner {
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: calc(var(--tabbar-h) + var(--safe-bottom) + 12px);
  z-index: 60;
  max-width: calc(var(--maxw) - 24px);
  margin: 0 auto;
  background: var(--card);
  border: 1px solid var(--hair);
  border-radius: var(--r);
  box-shadow: var(--shadow-lg);
  padding: 14px;
  display: flex;
  gap: 12px;
  align-items: center;
  animation: rise .4s var(--ease) both;
}
.pwa-banner.out { opacity: 0; transform: translateY(10px); transition: all .25s var(--ease); }
.pwa-banner .pb-ico {
  width: 44px; height: 44px; flex: none;
  border-radius: 12px;
  background: var(--accent);
  color: #fff;
  display: grid; place-items: center;
}
.pwa-banner .pb-main { flex: 1; min-width: 0; }
.pwa-banner .pb-title { font-weight: 650; font-size: 15px; letter-spacing: -.01em; }
.pwa-banner .pb-sub { color: var(--text-2); font-size: 13px; margin-top: 1px; }
.pwa-banner .pb-actions { display: flex; align-items: center; flex: none; }
.pwa-banner .pb-btn {
  min-height: 44px;
  padding: 0 16px;
  border-radius: var(--r-pill);
  background: var(--accent);
  color: #fff;
  font-weight: 600;
  font-size: 14px;
}
.pwa-banner .pb-btn:active { transform: scale(.97); }
.pwa-banner .pb-close {
  position: absolute;
  top: -8px; right: -6px;
  width: 30px; height: 30px;
  border-radius: 50%;
  background: var(--card-2);
  border: 1px solid var(--hair);
  color: var(--text-2);
  display: grid; place-items: center;
  box-shadow: var(--shadow-sm);
}
.pwa-banner .pb-close::after { content: ""; position: absolute; inset: -8px; } /* tap ≥44px */
.pwa-ios-steps {
  margin: 10px 0 0;
  padding-left: 18px;
  list-style: decimal;
  display: grid;
  gap: 6px;
  color: var(--text-2);
  font-size: 13px;
}
.pwa-ios-steps b { color: var(--text); font-weight: 600; }
.pwa-ios-steps .ic { vertical-align: -3px; color: var(--accent); }
@media (min-width: 900px) {
  /* la tabbar es sidebar en desktop → banner a la esquina */
  .pwa-banner { left: auto; right: 24px; bottom: 24px; width: 360px; margin: 0; }
}

/* ---------- switch estilo iOS ---------- */
.switch {
  position: relative;
  width: 51px; height: 31px;
  flex: none;
  border-radius: var(--r-pill);
  background: var(--ring-track);
  transition: background .2s var(--ease);
  padding: 0;
}
.switch::after { content: ""; position: absolute; inset: -8px; } /* tap ≥44px */
.switch .knob {
  position: absolute;
  top: 2px; left: 2px;
  width: 27px; height: 27px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .28), 0 0 0 .5px rgba(0, 0, 0, .04);
  transition: transform .2s var(--ease);
}
.switch.on { background: var(--green); }
.switch.on .knob { transform: translateX(20px); }
.switch:disabled { opacity: .4; cursor: default; }

/* ---------- Más → Notificaciones ---------- */
.push-master .row { display: flex; align-items: center; gap: 12px; }
.push-master .lr-ico.accent {
  border-radius: 12px;
  background: var(--accent-soft);
  color: var(--accent);
  display: grid; place-items: center;
  flex: none;
}
.push-row { align-items: flex-start; }
.push-row .lr-ico { margin-top: 2px; }
.push-row .switch { margin-top: 6px; }
.push-time {
  margin-top: 8px;
  background: var(--card-2);
  border: 1px solid var(--hair);
  border-radius: 10px;
  padding: 8px 10px;
  font-size: 14px;
  font-variant-numeric: tabular-nums;
  width: auto;
  color: var(--text);
  min-height: 36px;
}
.push-time:disabled { opacity: .45; }
.push-state-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  border-radius: var(--r-pill);
  padding: 3px 10px;
  background: var(--accent-soft);
  color: var(--accent);
}
.push-state-pill.ok { background: rgba(48, 209, 88, .14); color: var(--green); }
.push-state-pill.off { background: var(--card-2); color: var(--text-2); }
.push-state-pill.blocked { background: rgba(255, 69, 58, .12); color: var(--red); }

@media (prefers-reduced-motion: reduce) {
  .pwa-banner { animation: none; }
  .switch .knob, .switch { transition: none; }
}
