/* Bluconta landing: the hero's phone scenes and their animation states (portal screens + the contador's
   WhatsApp). landing-scenes.js arms a scene (hiding what will appear) and adds step classes; without JS
   or with reduced motion the steps still play, only without movement (01-base.css). */

/* Portal scenes share the app's body and cross-fade. */
.pw-body > .scene { position: absolute; inset: 0; opacity: 0; visibility: hidden; transition: opacity 260ms ease, visibility 0s linear 260ms; }
.pw-body > .scene.is-active { opacity: 1; visibility: visible; transition: opacity 260ms ease; }
.scene [data-at], .scene .tr { transition: opacity 380ms ease, transform 460ms var(--ease), background-color 900ms ease; }
.is-armed [data-at]:not(.is-in) { opacity: 0; transform: translateY(8px); }
.scene .tr.is-in { animation: row-flash 1400ms ease; }
@keyframes row-flash { 0%, 40% { background: var(--pw-brand-soft); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes msg-in { from { opacity: 0; transform: translateY(8px) scale(0.98); } }

/* Facturas: the SAT sync bar turns from working to done. */
.sync { display: flex; align-items: center; gap: 8px; min-height: 30px; margin-bottom: 10px; padding: 6px 11px; border-radius: 9px; background: var(--pw-brand-soft); color: var(--pw-brand-dark); font-size: 11px; font-weight: 500; }
.sync svg { width: 13px; height: 13px; stroke-width: 2.4; }
.spin { width: 12px; height: 12px; border: 2px solid rgba(31, 95, 196, 0.25); border-top-color: var(--pw-brand-dark); border-radius: 50%; animation: spin 700ms linear infinite; }
.sync-a, .sync .spin { display: none; }
.sync-b { display: flex; align-items: center; gap: 6px; }
.is-armed:not(.s-synced) .sync .spin, .is-armed:not(.s-synced) .sync-a { display: block; }
.is-armed:not(.s-synced) .sync-b { display: none; }
.s-synced .sync, .scene:not(.is-armed) .sync { background: var(--pw-ok-soft); color: var(--pw-ok); }

/* Factura rápida: two selects with dropdowns, a summary, the emit bar. */
.qk { display: grid; }
.qk-h { font-size: 15px; font-weight: 700; letter-spacing: -0.015em; }
.qk-p { margin: 3px 0 12px; font-size: 11px; color: var(--pw-body); }
.qk-l { margin: 0 0 4px; font-size: 10.5px; font-weight: 600; }
.sel { position: relative; display: flex; align-items: center; justify-content: space-between; height: 36px; margin-bottom: 10px; padding: 0 10px 0 12px; border: 1px solid #D9DDE5; border-radius: 9px; font-size: 12px; transition: border-color 200ms ease, box-shadow 200ms ease; }
.sel > svg { width: 14px; height: 14px; color: var(--pw-muted); }
.sel-ph { color: var(--pw-muted); }
.sel-val { display: none; font-weight: 500; }
.sel.is-set .sel-ph, .scene:not(.is-armed) .sel .sel-ph { display: none; }
.sel.is-set .sel-val, .scene:not(.is-armed) .sel .sel-val { display: block; }
.sel.is-open { border-color: var(--pw-brand); box-shadow: 0 0 0 3px rgba(47, 123, 233, 0.16); }
.dd {
  position: absolute; z-index: 5; left: -1px; right: -1px; top: calc(100% + 4px); display: grid; padding: 4px;
  background: var(--white); border: 1px solid var(--pw-line); border-radius: 10px; box-shadow: 0 12px 28px -12px rgba(16, 24, 40, 0.3);
  opacity: 0; visibility: hidden; transform: translateY(-4px); transition: opacity 160ms ease, transform 200ms var(--ease), visibility 0s linear 200ms;
}
.sel.is-open .dd { opacity: 1; visibility: visible; transform: none; transition: opacity 160ms ease, transform 200ms var(--ease); }
.dd span { padding: 7px 8px; border-radius: 7px; font-size: 11.5px; transition: background-color 150ms ease; }
.dd span.is-hover { background: var(--pw-brand-soft); color: var(--pw-brand-dark); }
.qk-sum { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; margin-top: 4px; padding: 10px 12px; border-radius: 10px; background: var(--pw-soft); font-size: 11.5px; color: var(--pw-body); font-variant-numeric: tabular-nums; transition: opacity 350ms ease, transform 450ms var(--ease); }
.qk-sum b { text-align: right; color: var(--pw-ink); }
.qk-sum .t { padding-top: 5px; border-top: 1px dashed #D9DDE5; font-weight: 700; color: var(--pw-ink); }
.is-armed:not(.s-sum) .qk-sum { opacity: 0; transform: translateY(6px); }
.emit-bar { position: absolute; left: 8px; right: 8px; bottom: 8px; display: flex; align-items: center; justify-content: flex-end; gap: 10px; padding: 9px 10px 9px 14px; border: 1px solid var(--pw-line); border-radius: 12px; background: var(--white); box-shadow: 0 10px 30px -14px rgba(16, 24, 40, 0.35); }
.emit-total { padding: 3px 9px; border-radius: 999px; background: var(--pw-ok-soft); color: var(--pw-ok); font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums; }
.pw-btn-primary.is-pressed { transform: scale(0.95); }
.pw-btn-primary.is-working { background: var(--pw-brand-dark); }
.pw-btn-primary.is-working::before { content: ""; width: 11px; height: 11px; border: 2px solid rgba(255, 255, 255, 0.35); border-top-color: var(--white); border-radius: 50%; animation: spin 700ms linear infinite; }
.pw-btn-primary.is-done { background: var(--pw-ok); }
.pw-toast { transition: opacity 280ms ease, transform 400ms var(--ease); }
.is-armed:not(.s-toast) [data-toast] { opacity: 0; transform: translate(-50%, 12px); }
/* Above the emit bar, so the total stays visible. */
.emit-bar + .pw-toast { bottom: 66px; }

/* Blu in the hero: the portal's assistant opens as a sheet over Inicio. */
.cp-under { opacity: 0.5; transition: opacity 300ms ease; }
/* Before the sheet opens, Inicio reads normally; the sheet dims it as it comes up. */
.is-armed:not(.s-cp) .cp-under { opacity: 1; }
.cp {
  position: absolute; inset: 8px; display: flex; flex-direction: column;
  background: var(--white); border: 1px solid var(--pw-line); border-radius: 16px; box-shadow: 0 18px 50px rgba(16, 24, 40, 0.22);
  transition: opacity 260ms ease, transform 420ms var(--ease);
}
.is-armed:not(.s-cp) .cp { opacity: 0; transform: translateY(14px) scale(0.98); }
.cp-head { display: flex; align-items: center; gap: 6px; padding: 10px 12px; border-bottom: 1px solid var(--pw-line); font-size: 13px; }
.cp-beta { padding: 1px 5px; border-radius: 999px; background: var(--pw-brand-soft); color: var(--pw-brand-dark); font-size: 8px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; }
.cp-x { margin-left: auto; font-size: 15px; color: var(--pw-muted); }
.cp-log { display: flex; flex: 1; flex-direction: column; justify-content: flex-end; gap: 6px; min-height: 0; padding: 10px; overflow: hidden; }
.cp-msg { flex-shrink: 0; align-self: flex-start; max-width: 88%; padding: 7px 10px; border-radius: 12px; border-bottom-left-radius: 4px; background: #F0F2F5; font-size: 11.5px; line-height: 1.45; }
.cp-msg--me { align-self: flex-end; border-radius: 12px; border-bottom-right-radius: 4px; background: var(--pw-brand); color: var(--white); }
.is-armed:not(.s-q1) [data-cp-q1], .is-armed:not(.s-a1) [data-cp-a1], .is-armed:not(.s-q2) [data-cp-q2],
.is-armed:not(.s-card) [data-cp-card], .is-armed:not(.s-done) [data-cp-done] { display: none; }
.s-q1 [data-cp-q1], .s-a1 [data-cp-a1], .s-q2 [data-cp-q2], .s-card [data-cp-card], .s-done [data-cp-done] { animation: msg-in 280ms var(--ease) both; }
.cp-card { flex-shrink: 0; padding: 9px 10px; border: 1px solid var(--pw-line); border-radius: 12px; background: var(--white); font-size: 10.5px; box-shadow: 0 8px 20px -14px rgba(16, 24, 40, 0.45); }
.cp-card > b { display: block; margin-bottom: 6px; font-size: 11px; }
.cp-card-g { display: grid; grid-template-columns: auto 1fr; gap: 3px 10px; }
.cp-card-g span:nth-child(odd) { color: var(--pw-muted); }
.cp-card-g span:nth-child(even) { font-weight: 600; text-align: right; }
.cp-card-a { display: flex; gap: 6px; margin-top: 8px; }
.cp-card-a span { display: grid; flex: 1; place-items: center; height: 26px; border: 1px solid var(--pw-line); border-radius: 8px; font-size: 10.5px; font-weight: 600; color: var(--pw-body); }
.cp-card-a .cp-yes { border-color: transparent; background: var(--pw-brand); color: var(--white); transition: transform 150ms ease, background-color 200ms ease; }
.cp-yes.is-pressed { transform: scale(0.94); }
.cp-yes.is-working { background: var(--pw-brand-dark); }
.cp-yes.is-done { background: var(--pw-ok); }
.cp-form { display: flex; gap: 6px; padding: 8px; border-top: 1px solid var(--pw-line); }
.cp-input { flex: 1; min-width: 0; padding: 7px 11px; border: 1px solid var(--pw-line); border-radius: 999px; background: var(--pw-soft); font-size: 11px; color: var(--pw-muted); }
.cp-draft { display: block; overflow: hidden; white-space: nowrap; }
.cp-send { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--pw-brand); color: var(--white); }
.cp-send svg { width: 13px; height: 13px; stroke-width: 2.2; }

/* Declarar: the contador's WhatsApp, drawn over the portal inside the same phone screen. The same
   bubbles (.wa-msg) are reused, larger, in the contador band (08-story.css). */
.phone-screen > .wa-app {
  position: absolute; inset: 36px 0 0; z-index: 10; display: flex; flex-direction: column; background: #EFEAE2;
  opacity: 0; visibility: hidden; transform: translateY(16px); transition: opacity 260ms ease, transform 380ms var(--ease), visibility 0s linear 380ms;
}
.phone-screen > .wa-app.is-active { opacity: 1; visibility: visible; transform: none; transition: opacity 260ms ease, transform 380ms var(--ease); }
.wa-head { display: flex; align-items: center; gap: 9px; height: 52px; padding: 0 12px 0 6px; background: #008069; color: var(--white); }
.wa-back svg { width: 20px; height: 20px; stroke-width: 2.2; }
.wa-av { display: grid; place-items: center; flex-shrink: 0; width: 34px; height: 34px; border-radius: 50%; background: var(--ink); color: var(--white); font-size: 12px; font-weight: 700; }
.wa-who { display: grid; line-height: 1.25; }
.wa-who b { font-size: 13px; }
.wa-who small { font-size: 10.5px; opacity: 0.85; }
.wa-body { display: flex; flex: 1; flex-direction: column; justify-content: flex-end; gap: 6px; min-height: 0; padding: 10px 10px 12px; overflow: hidden; }
.wa-day { align-self: center; margin-bottom: 4px; padding: 3px 10px; border-radius: 7px; background: #FFFFFF; color: #54656F; font-size: 10px; font-weight: 500; box-shadow: 0 1px 0.5px rgba(11, 20, 26, 0.13); }
.wa-msg { position: relative; align-self: flex-start; max-width: 86%; padding: 6px 9px 16px; border-radius: 9px; border-top-left-radius: 2px; background: var(--white); color: #111B21; font-size: 12.5px; line-height: 1.38; box-shadow: 0 1px 0.5px rgba(11, 20, 26, 0.13); }
.wa-msg time { position: absolute; right: 8px; bottom: 3px; display: flex; gap: 3px; font-size: 9.5px; color: #667781; }
.wa-msg--me { align-self: flex-end; border-radius: 9px; border-top-right-radius: 2px; background: #D9FDD3; }
.wa-ticks { letter-spacing: -2px; color: #53BDEB; }
.wa-doc { display: flex; align-items: center; gap: 9px; min-width: 210px; padding: 8px 9px 18px; }
.wa-pdf { display: grid; place-items: center; flex-shrink: 0; width: 32px; height: 38px; border-radius: 5px; background: #E5484D; color: var(--white); font-size: 9px; font-weight: 700; }
.wa-file { display: grid; line-height: 1.3; }
.wa-file b { font-size: 12px; }
.wa-file small { font-size: 10px; color: #667781; }
.wa-bar { display: flex; align-items: center; gap: 7px; padding: 6px 8px 10px; }
.wa-input { flex: 1; padding: 9px 14px; border-radius: 999px; background: var(--white); color: #8696A0; font-size: 12.5px; }
.wa-mic { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: #00A884; color: var(--white); }
.wa-mic svg { width: 17px; height: 17px; }
