/* Página da assinatura digital (modelo "assinatura"): a jornada do contrato no motor da jornada do Hotsite. O que é
   comum (abertura, trilho, palco, legendas, janela do painel, menu, topo, tabelas, modais, celular, "o que está no ar")
   vem do hotsite.css; aqui fica só o que é desta cena. Prefixo mk-as-. Roteiro em docs/ASSINATURA-JORNADA.md.
   As rampas usam --cb (o progresso do ato em batidas), escrito pelo controller; data-on/data-saiu vêm de
   data-surge/data-some. */

/* ---------------------------------------------------------------- os atos */
.mk-as-ato--cliente .mk-hj-grade { grid-template-columns: none; }
@media (min-width: 64rem) { .mk-as-ato--cliente .mk-hj-grade { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
.mk-as-surge { opacity: 0; translate: 0 6px; transition: opacity 320ms ease-out, translate 420ms cubic-bezier(0.2, 0.8, 0.2, 1); }
.mk-as-surge[data-on] { opacity: 1; translate: 0 0; }
.mk-as-pressa { transition: scale 160ms, filter 160ms; }
.mk-as-pressa[data-on] { scale: 0.94; filter: brightness(0.85); }

/* ---------------------------------------------------------------- o painel: menu em Clientes › Contratos */
.mk-as .mk-hj-menu__grupo--clientes .mk-hj-menu__sub { grid-template-rows: 1fr; }
.mk-as .mk-hj-menu__grupo--clientes > .mk-hj-menu__item { color: #FFFFFF; font-weight: 500; }
.mk-as .mk-hj-menu__grupo--clientes > .mk-hj-menu__item > i { rotate: 45deg; }
.mk-as [data-menu="contratos"] { background: rgb(255 255 255 / 0.12); color: #FFFFFF; font-weight: 500; }
.mk-as [data-menu="contratos"]::before { content: ""; position: absolute; left: -4px; top: 5px; bottom: 5px; width: 3px; border-radius: 0 3px 3px 0; background: #5590FD; }

/* o contrato: o cartão à esquerda e o conteúdo da aba à direita */
.mk-hj-tela.mk-as-contrato { display: grid; grid-template-columns: 196px minmax(0, 1fr); grid-template-rows: minmax(0, 1fr); gap: 0.5rem; }
.mk-as-lateral { display: grid; align-content: start; gap: 0.35rem; min-height: 0; overflow: hidden; padding: 0.5rem 0.55rem; border: 1px solid #DDE3EA; border-radius: 8px; background: #FFFFFF; font-size: 11px; color: #213045; }
.mk-as-lateral__cab { display: flex; align-items: center; gap: 0.4rem; margin: 0; font-size: 12.5px; font-weight: 700; color: #0A294F; }
.mk-as-ponto { width: 9px; height: 9px; border: 2px solid #DC2626; border-radius: 50%; }
.mk-as-lateral__acoes { display: flex; gap: 0.3rem; margin: 0 0 0.2rem; }
.mk-as-ic { display: inline-grid; place-items: center; flex: none; width: 22px; height: 22px; border: 1.5px solid #0166FC; border-radius: 5px; color: #0153CF; font-size: 12px; font-style: normal; transition: background-color 200ms, color 200ms, scale 160ms; }
.mk-as-ic svg { width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.mk-as-ic--vermelho { border-color: #DC2626; color: #B91C1C; }
.mk-as-ic--enviar[data-on] { background: #0166FC; color: #FFFFFF; scale: 0.92; }
.mk-as-lateral__titulo { margin-block-start: 0.2rem; font-size: 12px; font-weight: 700; color: #121D2C; }
.mk-as-status { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 0.3rem 0.5rem; align-items: center; margin: 0; }
.mk-as-status dt { text-align: end; color: #364559; }
.mk-as-status dd { margin: 0; min-width: 0; }
.mk-as-status--info dd b { font-weight: 600; color: #121D2C; }
.mk-as-pill { display: inline-block; padding: 0.1rem 0.45rem; border-radius: 4px; font-size: 10.5px; font-weight: 700; line-height: 1.25; letter-spacing: 0.01em; text-transform: uppercase; }
.mk-as-pill--ativo, .mk-as-pill--assinado { background: #DCFCE7; color: #166534; }
.mk-as-pill--pendente { background: #FEF3C7; color: #92400E; }
.mk-as-pill--novo { background: #E3F2FD; color: #1565C0; }
.mk-as-pill--rascunho { background: #0153CF; color: #FFFFFF; }
.mk-as-pulsa[data-on] { animation: as-pulsa 1.6s ease-in-out 2; }
@keyframes as-pulsa { 50% { box-shadow: 0 0 0 4px rgb(245 158 11 / 0.35); } }
.mk-as-confirmar { justify-self: start; margin-block: 0.2rem; }
.mk-as-total-contrato { display: flex; justify-content: space-between; gap: 0.5rem; margin: 0.3rem 0 0; padding-block-start: 0.4rem; border-block-start: 1px solid #EDF1F5; }
.mk-as-total-contrato b { font-size: 12.5px; color: #121D2C; }

.mk-as-conteudo { display: flex; flex-direction: column; gap: 0.45rem; min-width: 0; min-height: 0; }
.mk-as-abas { padding-inline: 0.2rem; }
.mk-as-abas b { font-weight: 600; color: #0153CF; border: 0; border-block-end: 2px solid #0166FC; border-radius: 0; background: transparent; }
.mk-as-tabela { --cols: 28px minmax(0, 1.5fr) minmax(0, 0.7fr) minmax(0, 1fr) 136px 88px; }
.mk-as-tabela .mk-hj-tabela__linha b { font-weight: 600; color: #121D2C; }
.mk-as-doc-status { justify-self: start; }
.mk-as-opcoes { display: flex; gap: 0.25rem; }
.mk-as-total { margin: 0.4rem 0 0; font-size: 11px; color: #4D5D72; }
.mk-as-lembrete { margin-block-start: 0.1rem; }
.mk-as-lembrete svg { width: 14px; height: 14px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; }

/* versões do documento (o PDF assinado que voltou) */
.mk-as-versoes { display: grid; gap: 0.35rem; font-size: 11px; }
.mk-as-versoes__cab { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.3rem 0.8rem; margin: 0; }
.mk-as-versoes__cab > b { font-size: 12px; color: #121D2C; }
.mk-as-versoes__cab span { color: #4D5D72; }
.mk-as-versao { display: flex; align-items: center; gap: 0.5rem; margin: 0; padding: 0.4rem 0.5rem; border: 1px solid #EDF1F5; border-radius: 6px; }
.mk-as-versao > i { display: grid; place-items: center; flex: none; width: 26px; height: 22px; border-radius: 5px; background: #F5F7FA; font-style: normal; font-weight: 700; color: #364559; }
.mk-as-versao > span { display: grid; min-width: 0; }
.mk-as-versao b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; color: #0153CF; }
.mk-as-versao small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #4D5D72; }
.mk-as-versao em { margin-inline-start: auto; }
.mk-as-versao--nova { background: #F0FDF4; border-color: #BBF7D0; }
.mk-as-versao--nova > i { background: #16A34A; color: #FFFFFF; }

/* o modal Criar novo Documento */
.mk-as-modal { width: min(520px, calc(100% - 1rem)); }
.mk-as-linha { display: grid; grid-template-columns: 118px minmax(0, 1fr); gap: 0.5rem; align-items: center; font-size: 11.5px; color: #121D2C; }
.mk-as-linha > span:first-child { text-align: end; }

/* a aba Logs */
.mk-as-tabela-logs { --cols: 72px 70px minmax(0, 1fr); }
.mk-as-tabela-logs .mk-hj-tabela__linha b { font-weight: 600; color: #121D2C; }
.mk-as-log--assinou { background: #F0FDF4; }

/* o aviso em tempo real: desliza da direita, por cima da janela */
.mk-as-toast {
  position: absolute; right: 10px; top: 38px; z-index: 9; display: flex; align-items: flex-start; gap: 0.5rem; width: 272px; padding: 0.55rem 0.6rem 0.6rem;
  border: 1px solid #BBF7D0; border-inline-start: 4px solid #16A34A; border-radius: 10px; background: #FFFFFF; color: #121D2C; font-size: 11px; line-height: 1.35;
  box-shadow: 0 22px 44px -18px rgb(10 41 79 / 0.55); opacity: 0; translate: 28px 0; transition: opacity 320ms ease-out, translate 480ms cubic-bezier(0.2, 0.8, 0.2, 1);
}
.mk-as-toast[data-on] { opacity: 1; translate: 0 0; }
.mk-as-toast > i { display: grid; place-items: center; flex: none; width: 24px; height: 24px; border-radius: 50%; background: #16A34A; color: #FFFFFF; font-size: 13px; font-style: normal; font-weight: 700; }
.mk-as-toast > span { display: grid; gap: 0.1rem; min-width: 0; }
.mk-as-toast b { font-size: 12.5px; color: #14532D; }
.mk-as-toast strong { font-weight: 600; color: #121D2C; }
.mk-as-toast small { color: #4D5D72; }
.mk-as-toast small u { color: #0153CF; }
.mk-as-toast > em { margin-inline-start: auto; color: #66778B; font-style: normal; font-size: 14px; line-height: 1; }
.mk-as-toast--assinado { width: 300px; border-inline-start-width: 5px; box-shadow: 0 0 0 4px rgb(22 163 74 / 0.14), 0 26px 50px -18px rgb(10 41 79 / 0.6); }
.mk-as-toast--assinado > i { width: 30px; height: 30px; font-size: 16px; }
.mk-as-toast--assinado b { font-size: 14px; }

/* ---------------------------------------------------------------- o celular da cliente */
.mk-as-quadro--fone { --dw: 460px; --dh: 560px; }
.mk-as-fone { --k1: 0; --k2: 0; position: absolute; left: 50%; top: 50%; width: 252px; padding: 8px; border-radius: 34px; background: #1C1C1E; box-shadow: 0 34px 56px -26px rgb(0 0 0 / 0.5); translate: -50% -50%; }
.mk-as-fone::before { content: ""; position: absolute; top: 14px; left: 50%; translate: -50% 0; z-index: 3; width: 64px; height: 16px; border-radius: 10px; background: #000000; }
.mk-as-fone__tela { height: 520px; border-radius: 27px; }
.mk-as-telas { position: relative; flex: 1; min-height: 0; }
.mk-as-tela { position: absolute; inset: 0; display: flex; flex-direction: column; min-height: 0; }
.mk-as-wa { background: #EFEAE2; }
.mk-as-wa .mk-hj-fone__corpo { justify-content: flex-start; padding-block-start: 0.7rem; }
.mk-as-ava--zs { background: #0F172A; color: #FFFFFF; }
.mk-as-link { color: #027EB5; text-decoration: underline; word-break: break-all; }
.mk-hj-msg b { font-weight: 700; }
/* o toque no link */
.mk-as-toque { position: absolute; left: 118px; top: 196px; z-index: 4; width: 28px; height: 28px; border-radius: 50%; background: rgb(1 102 252 / 0.35); box-shadow: 0 0 0 5px rgb(1 102 252 / 0.16); opacity: 0; scale: 0.5; transition: opacity 240ms, scale 320ms cubic-bezier(0.3, 1.6, 0.5, 1); }
.mk-as-toque[data-on] { opacity: 1; scale: 1; }

/* a página da ZapSign com a marca do provedor (a cor é a dele, como no hotsite) */
.mk-as-zs { --pv: #C2410C; --pv-texto: #FFFFFF; gap: 0.5rem; padding: 0.65rem 0.65rem 0.75rem; background: #F8FAFC; color: #0F172A; font-size: 11px; line-height: 1.35; }
.mk-as-zs__topo { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; padding-block-end: 0.4rem; border-block-end: 1px solid #E2E8F0; }
.mk-as-marca { display: inline-flex; align-items: center; gap: 0.4rem; font-size: 14px; font-weight: 800; letter-spacing: -0.02em; }
.mk-as-marca i { width: 14px; height: 14px; border-radius: 50%; border: 3px solid var(--pv); box-shadow: inset 0 0 0 2px #FFFFFF, inset 0 0 0 5px var(--pv); }
.mk-as-zs__topo small { font-size: 10px; color: #64748B; }
.mk-as-zs__ola { margin: 0; color: #334155; }
.mk-as-zs__ola b { color: #0F172A; }
.mk-as-zs__ola small { display: block; margin-block-start: 0.1rem; font-size: 10px; color: #64748B; }
.mk-as-zs__pad-titulo { margin-block-start: 0.2rem; }
.mk-as-zs__doc { display: flex; align-items: center; gap: 0.5rem; padding: 0.45rem 0.5rem; border: 1px solid #E2E8F0; border-radius: 8px; background: #FFFFFF; }
.mk-as-zs__doc > i { display: grid; place-items: center; flex: none; width: 30px; height: 30px; border-radius: 6px; background: #FEE2E2; color: #B91C1C; font-size: 9px; font-style: normal; font-weight: 800; }
.mk-as-zs__doc > span { display: grid; min-width: 0; }
.mk-as-zs__doc b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11.5px; }
.mk-as-zs__doc small { font-size: 10px; color: #64748B; }
.mk-as-papel { flex: 1; min-height: 0; overflow: hidden; padding: 0.55rem 0.6rem; border: 1px solid #E2E8F0; border-radius: 8px; background: #FFFFFF; }
.mk-as-papel__folha { display: grid; gap: 0.3rem; font-size: 8.5px; line-height: 1.35; color: #334155; translate: 0 calc(-84px * clamp(0, (var(--cb, 0) - 1.6) / 1, 1)); transition: translate 160ms linear; }
.mk-as-papel__folha b { font-size: 9px; color: #0F172A; text-align: center; }
.mk-as-papel__folha p { margin: 0; }
.mk-as-papel__folha i { height: 6px; border-radius: 3px; background: #E2E8F0; }
.mk-as-zs__botao { justify-self: stretch; margin-block-start: auto; padding: 0.55rem; font-size: 12px; }
.mk-as-assinar .mk-hj-rotulo { font-size: 10px; }
.mk-as-assinar .mk-hj-campo { min-height: 28px; padding-block: 0.2rem; font-size: 11px; }
.mk-as-pad { position: relative; height: 92px; border: 1.5px dashed #94A3B8; border-radius: 8px; background: #FFFFFF; }
.mk-as-pad svg { position: absolute; inset: 6px 8px; width: calc(100% - 16px); height: calc(100% - 12px); overflow: visible; }
.mk-as-traco { fill: none; stroke: #0F172A; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 700; stroke-dashoffset: calc(700 * (1 - clamp(0, (var(--cb, 0) - 3.3) / 1.1, 1))); transition: stroke-dashoffset 160ms linear; }
.mk-as-pad__limpar { position: absolute; right: 8px; bottom: 5px; font-size: 10px; color: #64748B; }
.mk-as-fim { align-items: center; justify-content: center; gap: 0.55rem; text-align: center; }
.mk-as-fim p { margin: 0; max-width: 15rem; color: #475569; }
.mk-as-fim__titulo { font-size: 15px; font-weight: 800; letter-spacing: -0.02em; color: #0F172A; }
.mk-as-fim__carimbo { padding: 0.4rem 0.6rem; border: 1px dashed #94A3B8; border-radius: 8px; font-size: 10px; }
.mk-as-fim__carimbo b { color: #0F172A; }

/* ---------------------------------------------------------------- tablet e celular */
@media (max-width: 63.99rem) {
  .mk-as-quadro--fone { --dw: 420px; --dh: 560px; }
  .mk-hj-tela.mk-as-contrato { grid-template-columns: 176px minmax(0, 1fr); }
  .mk-as .mk-hj-menu__grupo--clientes > .mk-hj-menu__item { background: rgb(255 255 255 / 0.16); }
  .mk-as-tabela { --cols: 24px minmax(0, 1.6fr) minmax(0, 0.7fr) minmax(0, 1fr) 112px 84px; }
}
@media (max-width: 47.99rem) {
  .mk-as-quadro--fone { --dw: 320px; --dh: 430px; }
  .mk-as-fone { width: 222px; padding: 6px; border-radius: 28px; }
  .mk-as-fone::before { top: 10px; width: 50px; height: 12px; }
  .mk-as-fone__tela { height: 404px; border-radius: 23px; }
  .mk-as-toque { left: 102px; top: 172px; }
  .mk-as-papel__folha { translate: 0 calc(-60px * clamp(0, (var(--cb, 0) - 1.6) / 1, 1)); }
  .mk-as-pad { height: 76px; }
  .mk-hj-tela.mk-as-contrato { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); }
  .mk-as-lateral { grid-template-columns: minmax(0, 1fr) auto; align-items: start; gap: 0.25rem 0.5rem; padding: 0.4rem 0.45rem; }
  .mk-as-lateral__cab { grid-column: 1 / -1; font-size: 11.5px; }
  .mk-as-lateral__acoes, .mk-as-lateral__titulo { display: none; }
  .mk-as-status { grid-column: 1 / -1; grid-template-columns: auto minmax(0, 1fr) auto minmax(0, 1fr); gap: 0.2rem 0.35rem; }
  .mk-as-confirmar { grid-column: 1 / -1; }
  .mk-as-pill { font-size: 10.5px; padding-inline: 0.3rem; }
  .mk-as-abas { gap: 0.2rem; font-size: 11px; }
  .mk-as-abas > * { padding: 0.3rem 0.35rem; }
  .mk-as-tabela { --cols: minmax(0, 1fr) 112px; }
  .mk-as-tabela-logs { --cols: 64px minmax(0, 1fr); }
  .mk-as-versoes__cab span { display: none; }
  .mk-as-versao em { display: none; }
  .mk-as-toast { top: 30px; right: 6px; width: 232px; }
  .mk-as-toast--assinado { width: 250px; }
  .mk-as-modal { width: calc(100% - 0.6rem); }
  .mk-as-linha { grid-template-columns: minmax(0, 1fr); gap: 0.15rem; }
  .mk-as-linha > span:first-child { text-align: start; font-size: 10.5px; color: #4D5D72; }
}

/* reduzir movimento: sem a pulsação; o traço da assinatura aparece inteiro no fim da batida (o --cb já vem do controller) */
@media (prefers-reduced-motion: reduce) {
  .mk-as-pulsa[data-on] { animation: none; }
}
