/* ================================================================
   Sonar Promos — notificações simuladas in-page
   Camada fixa (zero CLS), skin Android (Material You), gestos de swipe.
   ================================================================ */

/* A notificação mora no rodapé: não depende da altura da nav e fica
   ao alcance do polegar em telas móveis, inclusive com zoom. */
.sn-layer {
  position: fixed;
  top: auto;
  bottom: max(0.75rem, env(safe-area-inset-bottom, 0px));
  left: 0;
  right: 0;
  z-index: 40; /* nav = 50 */
  display: grid;
  justify-items: center;
  padding: 0 0.75rem;
  pointer-events: none;
}

.sn-card {
  pointer-events: auto;
  width: min(420px, 100%);
  padding: 0.7rem 0.85rem 0.75rem;
  cursor: grab;
  touch-action: pan-y; /* swipe horizontal nosso; scroll vertical da página */
  user-select: none;
  -webkit-user-select: none;
  will-change: transform, opacity;
}
.sn-card--drag { cursor: grabbing; }

/* ---------- Cabeçalho comum ---------- */

.sn-card__head {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin-bottom: 0.4rem;
}
.sn-card__icon { border-radius: 5px; }
.sn-card__app {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}
.sn-card__time { font-size: 0.7rem; opacity: 0.7; }
.sn-card__chevron {
  display: inline-grid;
  place-items: center;
  width: 1.35rem;
  height: 1.35rem;
  border-radius: 50%;
}
.sn-card__demo {
  font-size: 0.6rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.08rem 0.45rem;
  border-radius: 999px;
}
.sn-card__close {
  margin-left: auto;
  font: inherit;
  font-size: 1.05rem;
  line-height: 1;
  width: 2.75rem;
  height: 2.75rem;
  margin-top: -0.35rem;
  margin-right: -0.35rem;
  border: 0;
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
  opacity: 0.6;
}
.sn-card__close:hover { opacity: 1; }

.sn-card__title {
  margin: 0 0 0.15rem;
  font-family: var(--font-title, "Space Grotesk", sans-serif);
  font-weight: 700;
  font-size: 0.9rem;
  line-height: 1.3;
}
.sn-card__body {
  margin: 0;
  font-size: 0.85rem;
  line-height: 1.4;
}

.sn-card__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  margin-top: 0.45rem;
}
.sn-card__meta { font-size: 0.68rem; opacity: 0.7; }

.sn-card__action {
  font-size: 0.78rem;
  font-weight: 600;
  text-decoration: none;
  padding: 0.32rem 0.8rem;
  border-radius: 999px;
  white-space: nowrap;
}

/* ================================================================
   Skin Material — heads-up do Android 13/14 (Material You):
   raio 28dp, superfície tonal clara (seed verde), cabeçalho
   "ícone · app · agora" com chevron de expandir, Roboto,
   ação como text-button. Curva "emphasized decelerate" do M3.
   ================================================================ */

.sn-card--material {
  font-family: Roboto, var(--font-body, "Manrope"), system-ui, sans-serif;
  border-radius: 28px;
  background: #eef4ee; /* surface container tonal, dynamic color seed verde */
  color: #1a1c1a;      /* on-surface */
  padding: 0.8rem 1rem 0.85rem;
  box-shadow:
    0 1px 3px rgba(0, 0, 0, 0.15),
    0 8px 20px rgba(0, 0, 0, 0.16);
  animation: sn-in-material 0.4s cubic-bezier(0.05, 0.7, 0.1, 1) both;
}

/* Cabeçalho: ícone pequeno + "Sonar Promos • agora" + chevron */
.sn-card--material .sn-card__icon {
  width: 16px;
  height: 16px;
  border-radius: 50%;
}
.sn-card--material .sn-card__app {
  font-size: 0.75rem;
  font-weight: 400;
  color: #444746; /* on-surface-variant */
}
.sn-card--material .sn-card__time { color: #444746; }
.sn-card--material .sn-card__time::before {
  content: "• ";
  color: #444746;
}
.sn-card--material .sn-card__demo {
  margin-left: auto;
  color: #06422e;
  background: rgba(14, 159, 110, 0.16);
}
.sn-card--material .sn-card__chevron {
  color: #444746;
  background: rgba(26, 28, 26, 0.08); /* círculo do expander do Android 12+ */
}
.sn-card--material .sn-card__close { color: #444746; }

.sn-card--material .sn-card__title {
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 500; /* Roboto Medium, como no título real */
  color: #1a1c1a;
}
.sn-card--material .sn-card__body {
  font-size: 0.85rem;
  color: #444746;
}
.sn-card--material .sn-card__meta { color: #444746; }

/* Ação = text button do Material (sem fundo, cor de acento) */
.sn-card--material .sn-card__action {
  color: #0a7d57;
  background: transparent;
  font-weight: 500;
  padding: 0.32rem 0.6rem;
  border-radius: 999px;
}
.sn-card--material .sn-card__action:hover {
  background: rgba(14, 159, 110, 0.12); /* state layer 12% */
}

@keyframes sn-in-material {
  from { transform: translateY(120%); opacity: 0; }
  to   { transform: translateY(0); opacity: 1; }
}

/* ---------- Saída ---------- */

.sn-card--out {
  animation: sn-out 0.24s cubic-bezier(0.3, 0, 0.8, 0.15) both;
  pointer-events: none;
}

@keyframes sn-out {
  from { transform: translateY(0); opacity: 1; }
  to   { transform: translateY(130%); opacity: 0; }
}

/* ---------- Botão de demonstração (passo 3 da landing) ---------- */

.btn-demo {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin-top: 1.2rem;
  font: inherit;
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--signal, #66f2aa);
  background: rgba(102, 242, 170, 0.08);
  border: 1px dashed rgba(102, 242, 170, 0.45);
  border-radius: 999px;
  padding: 0.55rem 1.15rem;
  min-height: 44px;
  cursor: pointer;
  transition: background 0.15s ease;
}
.btn-demo:hover { background: rgba(102, 242, 170, 0.16); }

.btn-demo:disabled {
  cursor: not-allowed;
  opacity: 0.5;
  border-style: solid;
}

.simulation-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem 0.8rem;
  margin-top: 0.75rem;
}

.btn-demo-toggle {
  min-height: 44px;
  padding: 0.5rem 0.8rem;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--muted, #8fa897);
  background: transparent;
  border: 1px solid rgba(143, 168, 151, 0.38);
  border-radius: 999px;
  cursor: pointer;
}

.btn-demo-toggle:hover { color: var(--text, #edf7ef); border-color: rgba(102, 242, 170, 0.55); }

.simulation-status {
  margin: 0;
  font-size: 0.78rem;
  color: var(--muted, #8fa897);
}

/* ---------- Movimento reduzido ---------- */

@media (prefers-reduced-motion: reduce) {
  .sn-card--material {
    animation: sn-fade-in 0.2s ease both;
  }
  .sn-card--out { animation: sn-fade-out 0.15s ease both; }
  @keyframes sn-fade-in  { from { opacity: 0; } to { opacity: 1; } }
  @keyframes sn-fade-out { from { opacity: 1; } to { opacity: 0; } }
}
