/* ==========================================================================
   components.css · Peças reutilizáveis
   --------------------------------------------------------------------------
   1. Botões        2. Badge        3. Card        4. Ícone
   5. Logo          6. Janela de navegador / celular
   ========================================================================== */

/* 1. Botões ---------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 44px; padding-inline: 20px;
  border: 1px solid transparent; border-radius: calc(var(--radius) - 2px);
  font-size: .95rem; font-weight: 500; text-decoration: none; white-space: nowrap;
  cursor: pointer; transition: background-color .2s, border-color .2s, transform .2s;
}
.btn:active { transform: scale(.98); }
.btn svg { width: 18px; height: 18px; }

.btn--primary { background: var(--primary); color: var(--primary-foreground); }
.btn--primary:hover { background: color-mix(in srgb, var(--primary) 88%, var(--foreground)); }

.btn--accent { background: var(--accent); color: var(--accent-foreground); }
.btn--accent:hover { background: color-mix(in srgb, var(--accent) 85%, #fff); }

.btn--outline { background: var(--background); border-color: var(--border); color: var(--foreground); }
.btn--outline:hover { background: var(--muted); }

.btn--ghost { background: transparent; color: var(--foreground); }
.btn--ghost:hover { background: var(--muted); }

.btn--sm { height: 36px; padding-inline: 14px; font-size: .875rem; }
.btn--icon { width: 36px; height: 36px; padding: 0; }

/* 2. Badge ----------------------------------------------------------------- */
.badge {
  display: inline-flex; align-items: center; gap: 8px;
  height: 28px; padding-inline: 12px;
  border: 1px solid var(--border); border-radius: 999px;
  background: var(--card); font-size: .8rem; font-weight: 500; color: var(--muted-foreground);
}
.badge__dot { width: 7px; height: 7px; border-radius: 50%; background: #22c55e; box-shadow: 0 0 0 3px rgb(34 197 94 / .2); }

/* 3. Card ------------------------------------------------------------------ */
.card {
  background: var(--card); color: var(--card-foreground);
  border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

/* 4. Ícone (SVG de linha, padrão Lucide) ------------------------------------ */
.icon {
  display: inline-grid; place-items: center;
  width: 40px; height: 40px; border-radius: calc(var(--radius) - 2px);
  border: 1px solid var(--border); background: var(--muted); color: var(--accent-text);
}
.icon svg { width: 20px; height: 20px; }

/* 5. Logo ------------------------------------------------------------------ */
.logo { display: inline-flex; align-items: center; text-decoration: none; }
.logo__img { display: block; height: 32px; width: auto; }
/* Versão para fundo escuro: tema escuro escolhido, ou sistema escuro sem escolha manual */
.logo__img--dark { display: none; }
:root[data-theme="dark"] .logo__img--light { display: none; }
:root[data-theme="dark"] .logo__img--dark { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .logo__img--light { display: none; }
  :root:not([data-theme="light"]) .logo__img--dark { display: block; }
}

/* 6. Janela de navegador e celular (usados no hero) ------------------------- */
.browser { position: relative; border: 1px solid var(--border); border-radius: var(--radius); background: var(--card); box-shadow: var(--shadow-lg); }
.browser__bar { display: flex; align-items: center; gap: 6px; height: 40px; padding-inline: 14px; border-bottom: 1px solid var(--border); }
.browser__dot { width: 10px; height: 10px; border-radius: 50%; background: var(--border); }
.browser__url { flex: 1; margin-left: 10px; height: 24px; display: flex; align-items: center; padding-inline: 10px; border-radius: 6px; background: var(--muted); font-family: var(--font-mono); font-size: .72rem; color: var(--muted-foreground); }
.browser__screen { position: relative; aspect-ratio: 16 / 10; overflow: hidden; border-radius: 0 0 var(--radius) var(--radius); }
.browser__shot { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: top; opacity: 0; transition: opacity .8s ease; }
.browser__shot.is-active { opacity: 1; }

.phone { position: absolute; right: -22px; bottom: -34px; width: 27%; aspect-ratio: 9 / 18; border: 6px solid #0b1f3a; border-radius: 26px; overflow: hidden; background: #0b1f3a; box-shadow: var(--shadow-lg); }
.phone img { width: 100%; height: 100%; object-fit: cover; object-position: top; }

/* 7. Botão flutuante do WhatsApp -----------------------------------------  */
.wa-float { position: fixed; right: 20px; bottom: 20px; z-index: 30; display: grid; place-items: center; width: 56px; height: 56px; border-radius: 50%; background: #25d366; color: #fff; box-shadow: 0 6px 20px rgba(0, 0, 0, .22); transition: transform .2s, box-shadow .2s; }
.wa-float svg { width: 30px; height: 30px; }
.wa-float:hover { transform: scale(1.06); box-shadow: 0 8px 26px rgba(0, 0, 0, .28); }
.wa-float:focus-visible { outline: 3px solid #d4a84b; outline-offset: 3px; }
@media (max-width: 600px) { .wa-float { right: 16px; bottom: 16px; width: 52px; height: 52px; } .wa-float svg { width: 28px; height: 28px; } }
@media (prefers-reduced-motion: reduce) { .wa-float { transition: none; } }
