/* ============================================================
   web/productos/tu-telefono.css — «Tu negocio en tu bolsillo»
   Sección #tu-telefono (docs/23): el teléfono del dueño muestra la app
   de reportes (ventas en vivo, por hora, top) y la lectura semanal que
   redacta Claude a partir de números calculados en código. Todo cuelga
   de .telefono; el dispositivo usa colores propios de app (no de tema)
   salvo la marca, que sí es la de Jícara: la app es de Jícara, no del
   cliente. Convenciones: misma rejilla y controles que .perfil.
   ============================================================ */

.telefono {
  --bezel: #1c1719; --bezel-borde: #3a3236;
  --sombra-dispositivo: 0 18px 50px rgba(30, 42, 69, .18);
  --font-ui: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --app-bg: var(--j-marfil); --app-surf: #ffffff; --app-ink: var(--j-tinta); --app-muted: var(--j-neutro); --app-line: var(--j-linea);
  --app-marca: var(--j-azul); --app-oro: var(--j-mandarina); --app-exito: var(--j-exito);
  --t-rapido: .5s; --t-lento: .9s;
}
.telefono h2 em { font-style: normal; color: var(--acento-texto); }
.telefono .lead b { color: var(--fg); font-weight: 600; }

/* ── Escenario: texto · teléfono ─────────────────────────────────────── */
.telefono .tt-stage { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: var(--sp-7); align-items: start; margin-top: 0; }
.telefono .tt-bloques { display: grid; gap: var(--sp-4); margin-top: var(--sp-5); }
.telefono .tt-bloque { padding-left: var(--sp-5); border-left: 2px solid var(--linea); }
.telefono .tt-bloque.ia { border-left-color: var(--acento); }
.telefono .tt-bloque h3 { font-size: var(--text-md); display: flex; align-items: center; gap: var(--sp-3); flex-wrap: wrap; }
.telefono .tt-bloque p { font-size: var(--text-sm); color: var(--fg-suave); margin-top: var(--sp-2); max-width: 52ch; text-wrap: pretty; }
.telefono .tt-bloque p b { color: var(--fg); font-weight: 600; }
.telefono .chip.estado { background: var(--superficie); border: 1px solid var(--linea); color: var(--acento-texto); }
.telefono .tt-controles { display: flex; gap: var(--sp-3); align-items: center; margin-top: var(--sp-4); }
.telefono .tt-pausa, .telefono .tt-repetir { appearance: none; background: none; border: 0; font: 600 var(--text-sm) var(--font-text); cursor: pointer; padding: 8px 4px; min-height: 44px; color: var(--acento-texto); }
.telefono .tt-pausa { color: var(--fg-suave); }
.telefono .tt-pausa[aria-pressed="true"] { color: var(--marca); }

/* ── Teléfono ────────────────────────────────────────────────────────── */
.telefono .tt-dev { justify-self: center; text-align: center; }
.telefono .phone { width: 300px; aspect-ratio: 9 / 18.6; background: var(--bezel); border: 1px solid var(--bezel-borde); border-radius: 40px; padding: 9px; box-shadow: var(--sombra-dispositivo); position: relative; margin-inline: auto; }
.telefono .phone::before { content: ""; position: absolute; top: 16px; left: 50%; transform: translateX(-50%); width: 84px; height: 22px; background: var(--bezel); border-radius: 12px; z-index: 4; }
.telefono .pscr { width: 100%; height: 100%; border-radius: 32px; overflow: hidden; background: var(--app-bg); color: var(--app-ink); font-family: var(--font-ui); font-size: 12px; line-height: 1.3; position: relative; }
.telefono .pscr .pad { padding: 42px 14px 10px; display: grid; gap: 8px; }
.telefono .lbl-dev { font-size: var(--text-xs); color: var(--fg-suave); margin-top: var(--sp-3); letter-spacing: .04em; text-transform: uppercase; font-weight: 700; }

/* cabecera de la app */
.telefono .ah { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.telefono .ah .nm { font-weight: 800; font-size: 15px; letter-spacing: -.01em; }
.telefono .ah .dia { font-size: 10.5px; color: var(--app-muted); margin-top: 1px; }
.telefono .ah .vivo { display: inline-flex; align-items: center; gap: 5px; font-size: 9.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--app-exito); background: #e6f1eb; border-radius: 999px; padding: 4px 8px; }
.telefono .ah .vivo i { width: 6px; height: 6px; border-radius: 50%; background: var(--app-exito); animation: tt-pulso 1.6s ease-in-out infinite; }
@keyframes tt-pulso { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: .35; transform: scale(.7); } }

/* indicadores */
.telefono .kpis { display: grid; grid-template-columns: 1.4fr 1fr; gap: 8px; }
.telefono .kpi { background: var(--app-surf); border-radius: 12px; padding: 8px 10px; border: 1px solid var(--app-line); }
.telefono .kpi .l { font-size: 9.5px; color: var(--app-muted); text-transform: uppercase; letter-spacing: .06em; font-weight: 700; }
.telefono .kpi .v { font-weight: 800; font-size: 18px; letter-spacing: -.02em; margin-top: 2px; font-variant-numeric: tabular-nums; color: var(--app-marca); }
.telefono .kpi .v.n { color: var(--app-ink); }
.telefono .kpi .d { font-size: 10px; color: var(--app-exito); font-weight: 700; margin-top: 1px; }

/* por hora */
.telefono .horas { background: var(--app-surf); border-radius: 12px; padding: 10px 11px 8px; border: 1px solid var(--app-line); }
.telefono .horas .l { font-size: 9.5px; color: var(--app-muted); text-transform: uppercase; letter-spacing: .06em; font-weight: 700; display: flex; justify-content: space-between; }
.telefono .horas .l span:last-child { color: var(--app-ink); text-transform: none; letter-spacing: 0; }
.telefono .barras { display: grid; grid-template-columns: repeat(13, 1fr); gap: 3px; align-items: end; height: 38px; margin-top: 6px; }
.telefono .barra { background: var(--app-marca); border-radius: 3px 3px 1px 1px; height: var(--h, 0%); transform-origin: bottom; transform: scaleY(0); transition: transform var(--t-lento) cubic-bezier(.2, .8, .2, 1); }
.telefono .barra.ahora { background: var(--app-oro); }
.telefono .barra.futuro { background: transparent; border: 1px dashed var(--app-line); height: 100%; transform: none; transition: none; }
.telefono .on .barra { transform: scaleY(1); }
.telefono .ejes { display: flex; justify-content: space-between; font-size: 8.5px; color: var(--app-muted); margin-top: 4px; }

/* top productos */
.telefono .top { background: var(--app-surf); border-radius: 12px; padding: 10px 11px; border: 1px solid var(--app-line); }
.telefono .top .l { font-size: 9.5px; color: var(--app-muted); text-transform: uppercase; letter-spacing: .06em; font-weight: 700; }
.telefono .top ol { list-style: none; padding: 0; margin: 5px 0 0; display: grid; gap: 3px; }
.telefono .top li { display: grid; grid-template-columns: 88px 1fr auto; gap: 8px; font-size: 11px; align-items: center; }
.telefono .top li b { font-weight: 600; }
.telefono .top li span { font-variant-numeric: tabular-nums; color: var(--app-muted); font-size: 11px; }
.telefono .top li i { height: 4px; border-radius: 2px; background: var(--app-line); position: relative; overflow: hidden; }
.telefono .top li i::after { content: ""; position: absolute; inset: 0; width: var(--w, 0%); background: var(--app-marca); transform-origin: left; transform: scaleX(0); transition: transform var(--t-lento) cubic-bezier(.2, .8, .2, 1); }
.telefono .on .top li i::after { transform: scaleX(1); }

/* lectura con IA */
.telefono .lectura { background: var(--app-surf); border-radius: 12px; padding: 11px; border: 1px solid var(--app-line); border-top: 3px solid var(--app-oro); }
.telefono .lectura .lh { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.telefono .lectura .lh b { font-size: 12px; font-weight: 800; }
.telefono .lectura .lh .ia { font-size: 9px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--j-mandarina-tinta); background: var(--j-mandarina-suave); border-radius: 999px; padding: 3px 7px; white-space: nowrap; }
.telefono .lectura ol { list-style: none; padding: 0; margin: 7px 0 0; display: grid; gap: 6px; counter-reset: h; }
.telefono .lectura li { font-size: 10.5px; line-height: 1.32; padding-left: 18px; position: relative; transition: opacity var(--t-rapido) ease, transform var(--t-rapido) ease; }
.telefono.tt-js .lectura li { opacity: 0; transform: translateY(4px); }
.telefono .lectura li::before { counter-increment: h; content: counter(h); position: absolute; left: 0; top: 1px; width: 13px; height: 13px; border-radius: 50%; background: var(--app-marca); color: #fff; font-size: 8.5px; font-weight: 800; display: grid; place-items: center; }
.telefono .lectura li.ok { opacity: 1; transform: none; }
.telefono .lectura li b { font-weight: 700; }
.telefono .lectura .pie { font-size: 9px; color: var(--app-muted); margin-top: 6px; display: flex; justify-content: space-between; align-items: baseline; gap: 6px; transition: opacity var(--t-rapido) ease; }
.telefono.tt-js .lectura .pie { opacity: 0; }
.telefono .lectura .pie.ok { opacity: 1; }
.telefono .lectura .pie .wa { color: var(--app-marca); font-weight: 700; white-space: nowrap; }

/* notificación push que baja desde arriba */
.telefono .push { position: absolute; left: 10px; right: 10px; top: 10px; z-index: 5; background: rgba(255, 255, 255, .96); backdrop-filter: blur(8px); border-radius: 16px; padding: 9px 11px; box-shadow: 0 10px 30px rgba(30, 42, 69, .22); display: grid; grid-template-columns: 26px 1fr; gap: 8px; align-items: start; transform: translateY(-140%); transition: transform .6s cubic-bezier(.2, .8, .2, 1); }
.telefono .push.ok { transform: translateY(0); }
.telefono .push .ico { width: 26px; height: 26px; border-radius: 7px; background: var(--app-marca); display: grid; place-items: center; }
.telefono .push .ico svg { width: 18px; height: 18px; }
.telefono .push .t { display: flex; justify-content: space-between; font-size: 9.5px; color: var(--app-muted); }
.telefono .push .t b { color: var(--app-ink); font-weight: 700; }
.telefono .push .m { font-size: 11px; line-height: 1.3; margin-top: 1px; }

/* nota al pie de la sección */
.telefono .tt-nota { display: flex; justify-content: space-between; gap: var(--sp-4); flex-wrap: wrap; font-size: var(--text-xs); color: var(--fg-suave); margin-top: var(--sp-5); }
.telefono .tt-nota b { color: var(--fg); font-weight: 600; }

/* ── Responsivo ──────────────────────────────────────────────────────── */
@media (max-width: 860px) {
  .telefono .tt-stage { grid-template-columns: 1fr; gap: var(--sp-6); }
}
@media (max-width: 360px) {
  .telefono .phone { width: 272px; }
}
@media (prefers-reduced-motion: reduce) {
  .telefono .barra, .telefono .top li i::after, .telefono .lectura li, .telefono .lectura .pie, .telefono .push { transition: none; }
  .telefono .ah .vivo i { animation: none; }
}
