/* ==========================================================================
   Componentes reutilizáveis
   ========================================================================== */

/* Botões ----------------------------------------------------------------- */

.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 14px 16px 14px 24px;
  font-weight: 600;
  font-size: .95rem;
  line-height: 1.2;
  border-radius: var(--r-full);
  isolation: isolate;
  overflow: hidden;
  transition: transform .4s var(--ease), box-shadow .4s var(--ease), background-color .3s, color .3s;
  will-change: transform;
}
.btn--sm { padding: 9px 10px 9px 18px; font-size: .86rem; }
.btn--lg { padding: 15px 16px 15px 24px; font-size: .98rem; }
.btn--block { width: 100%; padding-inline: 24px; }

.btn--primary { color: var(--black); background: var(--yellow); box-shadow: 0 10px 24px -10px rgba(242, 176, 0, .7); }
.btn--primary::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  background: var(--black);
  transform: translateY(101%);
  transition: transform .5s var(--ease);
}
.btn--primary:hover { color: var(--white); box-shadow: 0 16px 30px -12px rgba(14, 17, 22, .5); }
.btn--primary:hover::before { transform: none; }

.btn--ghost {
  padding-inline: 26px;
  color: var(--ink);
  background: transparent;
  box-shadow: inset 0 0 0 1.5px var(--line);
}
.btn--ghost:hover { box-shadow: inset 0 0 0 1.5px var(--ink); }

.btn__arrow {
  display: grid;
  place-items: center;
  flex: none;
  width: 32px; height: 32px;
  border-radius: 50%;
  color: var(--yellow);
  background: var(--black);
  transition: background-color .4s var(--ease), color .4s var(--ease);
}
.btn--sm .btn__arrow { width: 26px; height: 26px; }
.btn__arrow svg { width: 16px; height: 16px; transition: transform .45s var(--ease); }
.btn:hover .btn__arrow { color: var(--black); background: var(--yellow); }
.btn:hover .btn__arrow svg { transform: translateX(2px) rotate(-45deg); }
.btn__lead { width: 22px; height: 22px; }

/* Pílula e links --------------------------------------------------------- */

.pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 7px 14px 7px 12px;
  font-size: .8rem;
  font-weight: 600;
  color: var(--blue);
  background: var(--blue-50);
  border-radius: var(--r-full);
}
.pill__dot {
  position: relative;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--blue);
}
.pill__dot::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: var(--blue);
  animation: ping 2s var(--ease) infinite;
}
@keyframes ping {
  0% { transform: scale(1); opacity: .6; }
  80%, 100% { transform: scale(3); opacity: 0; }
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  color: var(--blue);
  background: linear-gradient(currentColor, currentColor) 0 100% / 0 1.5px no-repeat;
  transition: background-size .4s var(--ease);
}
.text-link:hover { background-size: 100% 1.5px; }
.text-link svg { width: 18px; height: 18px; transition: transform .4s var(--ease); }
.text-link:hover svg { transform: translateX(4px); }

/* Selos e notas ---------------------------------------------------------- */

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips li {
  padding: 9px 16px;
  font-size: .86rem;
  font-weight: 600;
  border-radius: var(--r-full);
  background: var(--bg-soft);
  border: 1px solid var(--line);
  transition: background-color .3s, color .3s, border-color .3s, transform .3s var(--ease);
}
.chips li:hover { color: var(--white); background: var(--blue); border-color: var(--blue); transform: translateY(-2px); }

.note, .fineprint {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: .88rem;
  color: var(--ink-2);
}
.note svg, .fineprint svg { width: 20px; height: 20px; flex: none; margin-top: 1px; color: var(--blue); }
.fineprint { max-width: 520px; }

/* Formulário ------------------------------------------------------------- */

.field { display: grid; gap: 8px; margin: 0 0 18px; padding: 0; border: 0; min-width: 0; }
.field > label:not(.choice),
.field legend { padding: 0; font-size: .82rem; font-weight: 600; color: var(--ink); }
.field__opt { font-weight: 500; color: var(--ink-3); }

.field input[type="text"] {
  width: 100%;
  padding: 15px 16px;
  font-size: 1rem;
  background: var(--bg-soft);
  border: 1.5px solid transparent;
  border-radius: var(--r-sm);
  transition: border-color .25s, background-color .25s, box-shadow .25s;
}
.field input[type="text"]::placeholder { color: var(--ink-3); }
.field input[type="text"]:hover { background: #EEF0F5; }
.field input[type="text"]:focus {
  outline: none;
  background: var(--white);
  border-color: var(--blue);
  box-shadow: 0 0 0 4px var(--blue-100);
}

.field--choice { grid-template-columns: 1fr 1fr; gap: 10px; }
.field--choice legend { margin-bottom: 8px; }
.field--choice .field__error { grid-column: 1 / -1; }

.choice { position: relative; cursor: pointer; }
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice__box {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  height: 100%;
  padding: 14px;
  background: var(--bg-soft);
  border: 1.5px solid transparent;
  border-radius: var(--r-sm);
  transition: border-color .25s, background-color .25s, box-shadow .25s;
}
.choice__box strong { display: block; font-size: .88rem; line-height: 1.3; }
.choice__box small { display: block; margin-top: 2px; font-size: .76rem; color: var(--ink-3); }
.choice__radio {
  position: relative;
  flex: none;
  width: 18px; height: 18px;
  margin-top: 1px;
  border-radius: 50%;
  border: 1.5px solid var(--ink-3);
  background: var(--white);
  transition: border-color .25s;
}
.choice__radio::after {
  content: "";
  position: absolute;
  inset: 3px;
  border-radius: 50%;
  background: var(--blue);
  transform: scale(0);
  transition: transform .35s var(--ease);
}
.choice:hover .choice__box { background: #EEF0F5; }
.choice input:checked + .choice__box { background: var(--white); border-color: var(--blue); box-shadow: 0 0 0 4px var(--blue-100); }
.choice input:checked + .choice__box .choice__radio { border-color: var(--blue); }
.choice input:checked + .choice__box .choice__radio::after { transform: scale(1); }
.choice input:focus-visible + .choice__box { outline: 2px solid var(--blue); outline-offset: 2px; }

.field__error { display: none; font-size: .78rem; font-weight: 600; color: #D93025; }
.field.has-error .field__error { display: block; animation: shake .4s var(--ease); }
.field.has-error input[type="text"] { border-color: #D93025; background: #FFF6F5; }
@keyframes shake {
  25% { transform: translateX(-4px); }
  75% { transform: translateX(4px); }
}

/* Acordeão --------------------------------------------------------------- */

.qa {
  margin-bottom: 10px;
  border-radius: var(--r);
  background: var(--bg-soft);
  transition: background-color .3s, box-shadow .3s;
}
.qa[open] { background: var(--white); box-shadow: var(--sh); }
.qa summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 22px 24px;
  font-weight: 600;
  line-height: 1.4;
  cursor: pointer;
  list-style: none;
}
.qa summary::-webkit-details-marker { display: none; }
.qa__icon {
  display: grid;
  place-items: center;
  flex: none;
  width: 34px; height: 34px;
  border-radius: 50%;
  background: var(--white);
  box-shadow: var(--sh-sm);
  transition: transform .45s var(--ease), background-color .3s;
}
.qa__icon svg { width: 16px; height: 16px; }
.qa summary:hover .qa__icon { background: var(--yellow); }
.qa[open] .qa__icon { transform: rotate(135deg); background: var(--yellow); }
.qa__body { overflow: hidden; }
.qa__body p { padding: 0 64px 24px 24px; color: var(--ink-2); }

/* Botão flutuante -------------------------------------------------------- */

.wa-float {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 90;
  display: grid;
  place-items: center;
  width: 60px; height: 60px;
  border-radius: 50%;
  color: var(--white);
  background: #25D366;
  box-shadow: 0 12px 28px -8px rgba(37, 211, 102, .6);
  transform: scale(0);
  transition: transform .5s var(--ease);
}
.wa-float::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid #25D366;
  z-index: -1;
  animation: wa-ring 2.4s var(--ease) infinite;
}
@keyframes wa-ring {
  0% { transform: scale(1); opacity: .7; }
  100% { transform: scale(1.45); opacity: 0; }
}
.wa-float__bubble {
  position: absolute;
  right: calc(100% + 12px);
  top: 50%;
  padding: 8px 14px;
  font-size: .8rem;
  font-weight: 600;
  white-space: nowrap;
  color: var(--ink);
  background: var(--white);
  border-radius: 12px;
  box-shadow: var(--sh);
  opacity: 0;
  transform: translate(8px, -50%);
  transition: opacity .4s var(--ease), transform .4s var(--ease);
  pointer-events: none;
}
.wa-float:hover .wa-float__bubble,
.wa-float.is-greeting .wa-float__bubble { opacity: 1; transform: translate(0, -50%); }
.wa-float.is-visible { transform: scale(1); }
.wa-float:hover { transform: scale(1.08); }
.wa-float svg { width: 30px; height: 30px; }
