/* SMS Corporativo: componentes da página, na linguagem do site.
   Reaproveita os componentes sp-* de softphone.css (seções, títulos,
   cartões, pipeline, números) e acrescenta só o que é do SMS.
   Cores vêm dos tokens de flux-ds.css (tema escuro e claro). */

.sms-page {
  --sms-ok: 158 64% 42%;
  --sms-bad: 347 77% 55%;
}

/* Animações em loop só rodam com a seção na tela (sms-corporativo.js) */
.js .sms-page [data-play]:not(.is-on),
.js .sms-page [data-play]:not(.is-on) * {
  animation-play-state: paused !important;
}

.sms-note {
  color: hsl(var(--ink-light));
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  margin: 1.25rem 0 0;
  text-transform: uppercase;
}

.sms-note--l {
  margin-top: 0.2rem;
  text-align: left;
}

/* ---------- Hero: celular recebendo SMS ---------- */
.sms-hstage {
  align-items: center;
  display: grid;
  gap: 1rem 3.5rem;
  grid-template-areas: "l p r";
  grid-template-columns: auto auto auto;
  justify-content: center;
  margin: 3rem auto 0;
  max-width: 1000px;
  position: relative;
}

.sms-fl {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.sms-fl--l { grid-area: l; }
.sms-fl--r { grid-area: r; }
.sms-hstage .sms-phone { grid-area: p; }

.sms-fc {
  align-items: center;
  animation: sms-float 6s ease-in-out infinite;
  background: hsl(var(--surface));
  border: 1px solid hsl(var(--ink-strong) / 0.1);
  border-radius: 16px;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.18);
  display: flex;
  gap: 0.75rem;
  min-width: 190px;
  padding: 0.75rem 1rem;
  text-align: left;
}

.sms-fc:nth-child(2) { animation-delay: -2s; }
.sms-fl--r .sms-fc { animation-delay: -3s; }
.sms-fl--r .sms-fc:nth-child(2) { animation-delay: -4s; }

.sms-fc > span {
  background: hsl(var(--primary) / 0.14);
  border-radius: 11px;
  color: hsl(var(--primary));
  display: grid;
  flex: none;
  height: 36px;
  place-items: center;
  width: 36px;
}

.sms-fc svg { height: 18px; width: 18px; }

.sms-fc b {
  color: hsl(var(--ink-strong));
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
}

.sms-fc small {
  color: hsl(var(--ink-muted));
  font-size: 0.76rem;
}

@keyframes sms-float {
  0%, 100% { translate: 0 0; }
  50% { translate: 0 -8px; }
}

/* Celular (tela clara de SMS, igual nos dois temas) */
.sms-phone {
  aspect-ratio: 9 / 18.6;
  background: linear-gradient(145deg, #2b3242, #0d1018 45%, #232a38);
  border-radius: 38px;
  box-shadow: 0 0 0 1px #4b556b, 0 34px 80px rgba(0, 0, 0, 0.35), 0 0 70px hsl(var(--primary) / 0.22);
  overflow: hidden;
  padding: 9px;
  position: relative;
  text-align: left;
  width: 250px;
}

.sms-scr {
  background: #f8faff;
  border-radius: 30px;
  display: flex;
  flex-direction: column;
  font-family: Outfit, Inter, ui-sans-serif, system-ui, sans-serif;
  height: 100%;
  overflow: hidden;
  position: relative;
}

.sms-bar {
  align-items: center;
  color: #0f172a;
  display: flex;
  font-size: 11px;
  font-weight: 600;
  justify-content: space-between;
  padding: 10px 18px 4px;
}

.sms-bar i {
  background: #0f172a;
  border-radius: 3px;
  height: 10px;
  width: 22px;
}

.sms-th {
  align-items: center;
  background: #fff;
  border-bottom: 1px solid rgba(15, 23, 42, 0.07);
  display: flex;
  gap: 9px;
  padding: 8px 14px 10px;
}

.sms-av {
  background: linear-gradient(135deg, #5e81f4, #7c6cf0);
  border-radius: 50%;
  color: #fff;
  display: grid;
  font-size: 11px;
  font-weight: 700;
  height: 30px;
  place-items: center;
  width: 30px;
}

.sms-th b { color: #0f172a; display: block; font-size: 12.5px; }
.sms-th small { color: #64748b; font-size: 10px; }

.sms-msgs {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 9px;
  min-height: 0;
  overflow: hidden;
  padding: 12px 10px;
}

.sms-sb {
  background: #fff;
  border: 1px solid rgba(15, 23, 42, 0.07);
  border-radius: 16px 16px 16px 4px;
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.06);
  padding: 9px 11px;
}

.js .sms-sb { opacity: 0; }
.js .sms-sb.b0 { animation: sms-in0 9s infinite; }
.js .sms-sb.b1 { animation: sms-in1 9s infinite; }
.js .sms-sb.b2 { animation: sms-in2 9s infinite; }

.sms-sbh {
  color: #5e81f4;
  display: flex;
  font-size: 8.5px;
  font-weight: 700;
  justify-content: space-between;
  letter-spacing: 0.12em;
}

.sms-sbh em { color: #94a3b8; font-style: normal; font-weight: 500; letter-spacing: 0; }
.sms-sb p { color: #1e293b; font-size: 11px; line-height: 1.42; margin: 4px 0 0; }
.sms-ok { color: #059669; display: block; font-size: 9px; font-weight: 600; margin-top: 4px; }

@keyframes sms-in0 {
  0%, 4% { opacity: 0; transform: translateY(14px); }
  9%, 92% { opacity: 1; transform: none; }
  97%, 100% { opacity: 0; }
}

@keyframes sms-in1 {
  0%, 26% { opacity: 0; transform: translateY(14px); }
  31%, 92% { opacity: 1; transform: none; }
  97%, 100% { opacity: 0; }
}

@keyframes sms-in2 {
  0%, 48% { opacity: 0; transform: translateY(14px); }
  53%, 92% { opacity: 1; transform: none; }
  97%, 100% { opacity: 0; }
}

@media (max-width: 899px) {
  .sms-hstage {
    gap: 1.5rem 0.75rem;
    grid-template-areas: "p p" "l r";
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }
  .sms-hstage .sms-phone { justify-self: center; width: 230px; }
  .sms-fc { min-width: 0; padding: 0.65rem 0.7rem; gap: 0.55rem; }
  .sms-fc > span { height: 30px; width: 30px; }
  .sms-fc b { font-size: 0.8rem; }
  .sms-fc small { font-size: 0.68rem; }
}

/* ---------- A solução: mensagens entregues ---------- */
.sms-eb-stack {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin: 0 auto;
  max-width: 440px;
  width: 100%;
}

.sms-eb {
  background: hsl(var(--surface));
  border: 1px solid hsl(var(--primary) / 0.25);
  border-radius: 20px 20px 20px 6px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.16);
  padding: 1rem 1.15rem;
  text-align: left;
}

.sms-eb:nth-child(2) { margin-left: 2.5rem; }

.sms-eb > span {
  color: hsl(var(--primary));
  font-size: 0.64rem;
  font-weight: 600;
  letter-spacing: 0.18em;
}

.sms-eb p {
  color: hsl(var(--ink-strong));
  font-size: 0.92rem;
  line-height: 1.45;
  margin: 0.4rem 0 0;
}

.sms-eb small {
  color: hsl(var(--sms-ok));
  display: block;
  font-size: 0.72rem;
  font-weight: 600;
  margin-top: 0.5rem;
}

@media (max-width: 640px) {
  .sms-eb:nth-child(2) { margin-left: 1rem; }
}

/* ---------- Casos de uso ---------- */
.sms-uc {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr;
  margin-top: 2.5rem;
  text-align: left;
  width: 100%;
}

@media (min-width: 640px) {
  .sms-uc { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 1000px) {
  .sms-uc { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

.sms-ucc {
  border-radius: 20px;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  padding: 1.25rem;
}

.sms-uh {
  align-items: center;
  display: flex;
  gap: 0.65rem;
}

.sms-uh b {
  color: hsl(var(--ink-strong));
  font-size: 1rem;
  font-weight: 600;
}

.sms-bub {
  background: hsl(var(--primary) / 0.08);
  border: 1px solid hsl(var(--primary) / 0.2);
  border-radius: 16px 16px 16px 4px;
  color: hsl(var(--ink-strong));
  font-size: 0.82rem;
  line-height: 1.45;
  padding: 0.75rem 0.9rem;
}

.js .sms-bub {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.6s ease, transform 0.6s ease;
  transition-delay: var(--k, 0ms);
}

.js .sms-ucc.is-in .sms-bub {
  opacity: 1;
  transform: none;
}

.sms-bub small {
  color: hsl(var(--sms-ok));
  display: block;
  font-size: 0.66rem;
  font-weight: 600;
  margin-top: 0.4rem;
}

.sms-ucc p {
  color: hsl(var(--ink-muted));
  font-size: 0.85rem;
  line-height: 1.45;
  margin: 0;
}

/* ---------- Como funciona: pipeline de 4 passos ---------- */
@media (min-width: 900px) {
  .sms-pipe4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .sms-pipe4 .sp-track {
    left: calc(100% / 8);
    right: calc(100% / 8);
  }
}

/* ---------- Roteamento: diagrama animado ---------- */
.sms-panel {
  border-radius: 24px;
  margin-top: 2.5rem;
  padding: 1.4rem 1.5rem 1rem;
  width: 100%;
}

.sms-panel .sms-note { margin-top: 0.6rem; text-align: left; }

.sms-dg {
  display: block;
  height: auto;
  max-height: 440px;
  overflow: visible;
  width: 100%;
}

.sms-dg .nd {
  fill: hsl(var(--surface));
  stroke: hsl(var(--ink-strong) / 0.14);
  stroke-width: 1.2;
}

.sms-dg .nd.on {
  stroke: hsl(var(--primary));
  stroke-width: 2;
  filter: drop-shadow(0 10px 24px hsl(var(--primary) / 0.3));
}

.sms-dg .acc {
  fill: url(#smsAccg);
  filter: drop-shadow(0 16px 30px rgba(94, 129, 244, 0.35));
}

.sms-dg .t1 {
  fill: hsl(var(--ink-strong));
  font-family: Outfit, Inter, sans-serif;
  font-size: 15px;
  font-weight: 600;
}

.sms-dg .t1.w { fill: #fff; }

.sms-dg .t2 {
  font-family: Outfit, Inter, sans-serif;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 1.6px;
}

.sms-dg .t2.w { fill: rgba(255, 255, 255, 0.85); }

.sms-dg .ct {
  fill: hsl(var(--sms-ok));
  font-family: Outfit, Inter, sans-serif;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.6px;
}

.sms-dg .ln {
  animation: sms-dash 3s linear infinite;
  fill: none;
  stroke: hsl(var(--primary) / 0.5);
  stroke-dasharray: 6 6;
  stroke-width: 2;
}

.sms-dg .pk { fill: #5e81f4; filter: drop-shadow(0 0 6px rgba(94, 129, 244, 0.8)); }
.sms-dg .pk.v { fill: #7c6cf0; filter: drop-shadow(0 0 6px rgba(124, 108, 240, 0.8)); }
.sms-dg .pk.g { fill: #10b981; filter: drop-shadow(0 0 6px rgba(16, 185, 129, 0.7)); }

@keyframes sms-dash {
  to { stroke-dashoffset: -200; }
}

/* versão vertical para telas estreitas */
.sms-vflow { display: none; }

@media (max-width: 699px) {
  .sms-panel { padding: 1.1rem 1rem 0.9rem; }
  .sms-dg { display: none; }
  .sms-vflow {
    align-items: stretch;
    display: flex;
    flex-direction: column;
  }
}

.sms-vrow {
  display: grid;
  gap: 0.45rem;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.sms-vb {
  align-items: center;
  background: hsl(var(--surface));
  border: 1px solid hsl(var(--ink-strong) / 0.14);
  border-radius: 12px;
  color: hsl(var(--ink-strong));
  display: flex;
  font-size: 0.74rem;
  font-weight: 600;
  justify-content: center;
  line-height: 1.25;
  min-height: 3rem;
  padding: 0.5rem 0.35rem;
  text-align: center;
}

.sms-vb--end {
  align-self: center;
  border-color: hsl(var(--primary));
  flex-direction: column;
  gap: 0.2rem;
  min-width: 9rem;
}

.sms-vb--end em {
  color: hsl(var(--sms-ok));
  font-size: 0.68rem;
  font-style: normal;
  letter-spacing: 0.06em;
}

.sms-vcore {
  background: linear-gradient(135deg, #5e81f4, #7c6cf0);
  border-radius: 16px;
  box-shadow: 0 16px 30px rgba(94, 129, 244, 0.3);
  color: #fff;
  padding: 0.9rem;
  text-align: center;
}

.sms-vcore b { display: block; font-size: 1.05rem; letter-spacing: 0.12em; }
.sms-vcore small { color: rgba(255, 255, 255, 0.85); font-size: 0.66rem; letter-spacing: 0.12em; text-transform: uppercase; }

.sms-fv {
  background: repeating-linear-gradient(hsl(var(--primary) / 0.6) 0 6px, transparent 6px 12px);
  height: 34px;
  margin: 0 auto;
  position: relative;
  width: 2px;
}

.sms-fv i {
  animation: sms-drop 1.6s linear infinite;
  background: hsl(var(--primary));
  border-radius: 50%;
  box-shadow: 0 0 0 4px hsl(var(--primary) / 0.18);
  height: 10px;
  left: -4px;
  position: absolute;
  width: 10px;
}

.sms-fv i:nth-child(2) { animation-delay: 0.8s; }

@keyframes sms-drop {
  from { opacity: 0; top: -6px; }
  20% { opacity: 1; }
  to { opacity: 0; top: 100%; }
}

/* ---------- Funcionalidades e relatórios: proporções ---------- */
@media (min-width: 900px) {
  .sms-split--feat { grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); }
  .sms-split--dash { grid-template-columns: minmax(0, 0.75fr) minmax(0, 1.25fr); }
}

/* ---------- Relatórios: painel ---------- */
.sms-dash {
  border-radius: 24px;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  min-width: 0;
  padding: 1.25rem 1.3rem 0.9rem;
}

.sms-dh {
  align-items: baseline;
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem 1rem;
  justify-content: space-between;
}

.sms-dh b { color: hsl(var(--ink-strong)); font-size: 1.05rem; font-weight: 600; }
.sms-dh span { color: hsl(var(--ink-light)); font-size: 0.75rem; }

.sms-kps {
  display: grid;
  gap: 0.6rem;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.sms-kp {
  background: hsl(var(--primary) / 0.06);
  border: 1px solid hsl(var(--primary) / 0.16);
  border-radius: 16px;
  min-width: 0;
  padding: 0.75rem 0.85rem;
}

.sms-dash small {
  color: hsl(var(--ink-muted));
  display: block;
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.16em;
}

.sms-kp b {
  color: hsl(var(--ink-strong));
  display: block;
  font-size: clamp(1.2rem, 1.8vw, 1.75rem);
  font-variant-numeric: tabular-nums;
  font-weight: 300;
  margin-top: 0.25rem;
  white-space: nowrap;
}

.sms-kp--on b { color: hsl(var(--primary)); font-weight: 500; }

.sms-dg2 {
  display: grid;
  gap: 0.9rem;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
}

.sms-chart,
.sms-last {
  border: 1px solid hsl(var(--ink-strong) / 0.08);
  border-radius: 16px;
  padding: 0.75rem 0.9rem;
}

.sms-bars {
  align-items: flex-end;
  display: flex;
  gap: 7px;
  height: 150px;
  margin-top: 0.6rem;
}

.sms-bars i {
  background: linear-gradient(180deg, #7c6cf0, #5e81f4);
  border-radius: 6px 6px 2px 2px;
  flex: 1;
  height: var(--h);
  transform-origin: bottom;
}

.js .sms-bars i {
  transform: scaleY(0);
  transition: transform 1s cubic-bezier(0.2, 0.7, 0.2, 1);
  transition-delay: calc(var(--k) + 400ms);
}

.js .sms-chart.is-in .sms-bars i { transform: none; }

.sms-last {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.sms-rw {
  align-items: center;
  border-bottom: 1px solid hsl(var(--ink-strong) / 0.07);
  color: hsl(var(--ink-secondary));
  display: flex;
  font-size: 0.8rem;
  gap: 0.5rem;
  justify-content: space-between;
  padding: 0.42rem 0;
}

.sms-rw:last-child { border-bottom: 0; }

.sms-rw em {
  border-radius: 99px;
  flex: none;
  font-size: 0.66rem;
  font-style: normal;
  font-weight: 600;
  padding: 0.2rem 0.55rem;
}

.sms-rw em.g { background: hsl(var(--sms-ok) / 0.14); color: hsl(var(--sms-ok)); }
.sms-rw em.b { background: hsl(var(--primary) / 0.14); color: hsl(var(--primary)); }
.sms-rw em.r { background: hsl(var(--sms-bad) / 0.14); color: hsl(var(--sms-bad)); }

@media (max-width: 899px) {
  .sms-kps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sms-dg2 { grid-template-columns: 1fr; }
  .sms-bars { height: 120px; }
}

/* ---------- Na prática ---------- */
.sms-cases {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr;
  margin-top: 2.5rem;
  text-align: left;
  width: 100%;
}

@media (min-width: 800px) {
  .sms-cases { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

.sms-case {
  border-radius: 22px;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  padding: 1.4rem;
}

.sms-tg {
  align-self: flex-start;
  background: hsl(var(--primary) / 0.14);
  border-radius: 99px;
  color: hsl(var(--primary));
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  padding: 0.3rem 0.65rem;
}

.sms-case h3 {
  color: hsl(var(--ink-strong));
  font-size: 1.1rem;
  font-weight: 600;
  margin: 0.2rem 0 0;
}

.sms-case p {
  color: hsl(var(--ink-muted));
  font-size: 0.9rem;
  line-height: 1.5;
  margin: 0;
}

.sms-rs {
  border-top: 1px solid hsl(var(--ink-strong) / 0.08);
  color: hsl(var(--primary));
  font-size: 0.85rem;
  font-weight: 500;
  margin-top: auto;
  padding-top: 0.75rem;
}

/* ---------- Comparativo ---------- */
.sms-cmpbox {
  border-radius: 24px;
  min-width: 0;
  overflow-x: auto;
  padding: 0.5rem 0.5rem 0.25rem;
}

.sms-cmp {
  border-collapse: separate;
  border-spacing: 0;
  font-size: 0.95rem;
  width: 100%;
}

.sms-cmp th,
.sms-cmp td {
  border-bottom: 1px solid hsl(var(--ink-strong) / 0.08);
  padding: 0.95rem 1rem;
  text-align: left;
  vertical-align: top;
}

.sms-cmp tr:last-child td { border-bottom: 0; }

.sms-cmp th {
  color: hsl(var(--ink-muted));
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.sms-cmp td { color: hsl(var(--ink-secondary)); }

.sms-cmp th.us {
  background: hsl(var(--primary));
  border-radius: 12px 12px 0 0;
  color: #fff;
}

.sms-cmp td.us {
  background: hsl(var(--primary) / 0.08);
  color: hsl(var(--ink-strong));
  font-weight: 500;
}

.sms-cmp tr:last-child td.us { border-radius: 0 0 12px 12px; }
.sms-cmp td.them { color: hsl(var(--ink-light)); }

.sms-cmp .yes,
.sms-cmp .no {
  font-weight: 800;
  margin-right: 0.45rem;
}

.sms-cmp .yes { color: hsl(var(--sms-ok)); }
.sms-cmp .no { color: hsl(var(--sms-bad)); }

@media (max-width: 640px) {
  .sms-cmp { font-size: 0.8rem; }
  .sms-cmp th,
  .sms-cmp td { padding: 0.7rem 0.55rem; }
  .sms-cmp th { font-size: 0.58rem; letter-spacing: 0.1em; }
}

/* ---------- Tema claro: sombras mais leves ---------- */
html[data-theme="light"] .sms-fc,
html[data-theme="light"] .sms-eb {
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.08);
}

html[data-theme="light"] .sms-page {
  --sms-ok: 160 84% 30%;
  --sms-bad: 347 77% 45%;
}

/* ---------- Celular: padding lateral de 20 px ---------- */
@media (max-width: 640px) {
  .sms-page .sp-sec {
    padding-left: 1.25rem;
    padding-right: 1.25rem;
  }
}

/* ---------- Respeitar "reduzir movimento" ---------- */
@media (prefers-reduced-motion: reduce) {
  .js .sms-sb,
  .js .sms-bub {
    opacity: 1;
    transform: none;
  }
  .js .sms-bars i { transform: none; }
}
