/* Conferência automática do @ no checkout. */

/* O cartão não pode alargar a coluna do formulário no celular. */
.field:has(.target-wrap) {
  grid-template-columns: minmax(0, 1fr);
}

.target-wrap {
  position: relative;
}

.target-wrap input {
  width: 100%;
  padding-right: 48px;
}

/* Campo pulsando em laranja até a pessoa tocar nele: é ali que ela começa. */
.target-wrap.target-calling input {
  animation: target-call 1.8s ease-in-out infinite;
}

@keyframes target-call {
  0%,
  100% {
    border-color: rgba(255, 138, 0, 0.35);
    box-shadow: 0 0 0 0 rgba(255, 138, 0, 0);
  }

  50% {
    border-color: rgba(255, 138, 0, 0.95);
    box-shadow: 0 0 0 4px rgba(255, 138, 0, 0.18), 0 0 18px rgba(255, 138, 0, 0.28);
  }
}

.target-status {
  position: absolute;
  top: 50%;
  right: 14px;
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  transform: translateY(-50%);
  pointer-events: none;
}

.target-status[hidden] {
  display: none;
}

.target-status svg {
  animation: target-pop 0.28s ease-out;
}

/* Lápis escrevendo enquanto a pessoa digita. */
.target-status .target-pencil {
  animation: pencil-write 0.5s ease-in-out infinite alternate;
  transform-origin: 20% 80%;
}

.target-pencil .pencil-line {
  stroke-dasharray: 6;
  animation: pencil-line 0.9s linear infinite;
}

@keyframes pencil-write {
  from {
    transform: translate(-2px, 1px) rotate(-8deg);
  }

  to {
    transform: translate(2px, -1px) rotate(6deg);
  }
}

@keyframes pencil-line {
  from {
    stroke-dashoffset: 6;
  }

  to {
    stroke-dashoffset: -6;
  }
}

.target-spinner {
  width: 20px;
  height: 20px;
  border: 2.5px solid rgba(255, 255, 255, 0.18);
  border-top-color: #ff8a00;
  border-radius: 50%;
  animation: target-spin 0.7s linear infinite;
}

@keyframes target-spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes target-pop {
  from {
    transform: scale(0.4);
    opacity: 0;
  }

  to {
    transform: scale(1);
    opacity: 1;
  }
}

.profile-check {
  margin-top: 12px;
  padding: 12px 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
  animation: profile-check-in 0.25s ease-out;
}

.profile-check[hidden] {
  display: none;
}

.profile-check:has(.profile-check-row) {
  border-color: rgba(34, 197, 94, 0.45);
}

.profile-check:has(.profile-check-alert) {
  border-color: rgba(239, 68, 68, 0.5);
}

@keyframes profile-check-in {
  from {
    transform: translateY(-4px);
    opacity: 0;
  }

  to {
    transform: none;
    opacity: 1;
  }
}

/* Perfil e seguidores lado a lado; em tela estreita, um embaixo do outro. */
.profile-check-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 12px 20px;
}

.profile-check-row > .profile-check-card {
  flex: 1 1 190px;
  min-width: 0;
}

.profile-check-row > .profile-check-growth {
  flex: 1 1 230px;
}

.profile-check-card {
  display: flex;
  align-items: center;
  gap: 12px;
}

.profile-check-photo {
  width: 52px;
  height: 52px;
  flex: none;
  border: 2px solid rgba(255, 255, 255, 0.14);
  border-radius: 50%;
  object-fit: cover;
  background: rgba(255, 255, 255, 0.08);
}

.profile-check-text {
  display: grid;
  gap: 1px;
  min-width: 0;
}

.profile-check-text strong,
.profile-check-text span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-check-text span,
.profile-check-text small {
  color: rgba(255, 255, 255, 0.66);
}

.profile-check-growth {
  display: grid;
  grid-template-columns: auto auto auto;
  justify-content: space-evenly;
  align-items: center;
  gap: 8px 14px;
  padding: 10px 18px;
  border-radius: 12px;
  background: rgba(255, 138, 0, 0.08);
}

.profile-check-growth > div {
  display: grid;
  gap: 1px;
}

.profile-check-growth small {
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.66);
}

.profile-check-growth strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: clamp(0.95rem, 4.4vw, 1.2rem);
  font-variant-numeric: tabular-nums;
}

.growth-now,
.growth-next {
  justify-items: center;
  text-align: center;
}

.growth-total {
  display: flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
}

.growth-next strong {
  color: #ffad4d;
}

.growth-next em {
  font-size: 0.72rem;
  font-style: normal;
  font-weight: 700;
  color: #4ade80;
}

.growth-arrow {
  font-size: 1.1rem;
  color: #ff8a00;
}

/* Seta verde balançando para cima, como quem está subindo. */
.growth-rise {
  display: inline-grid;
  flex: none;
  animation: growth-rise 0.9s ease-in-out infinite;
}

@keyframes growth-rise {
  0%,
  100% {
    transform: translateY(2px);
    opacity: 0.75;
  }

  50% {
    transform: translateY(-4px);
    opacity: 1;
  }
}

.profile-check-alert {
  margin: 0;
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.45;
  color: #f87171;
}

.profile-check-card + .profile-check-alert {
  margin-top: 10px;
}

.profile-check-retry {
  margin-top: 10px;
  padding: 8px 14px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 10px;
  background: transparent;
  color: inherit;
  font: inherit;
  font-size: 0.875rem;
  cursor: pointer;
}

.profile-check-retry:hover {
  border-color: rgba(255, 255, 255, 0.4);
}

.profile-check-link {
  display: inline-block;
  font-size: 0.875rem;
}

.purchase-panel button[type="submit"]:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  filter: grayscale(0.4);
}

@media (prefers-reduced-motion: reduce) {
  .target-spinner {
    animation-duration: 2s;
  }

  .target-wrap.target-calling input,
  .target-status svg,
  .target-status .target-pencil,
  .target-pencil .pencil-line,
  .growth-rise,
  .profile-check {
    animation: none;
  }
}

/* Conferência do link da publicação: miniatura no lugar da foto do perfil. */
.post-check-thumb {
  position: relative;
  flex: none;
  width: 56px;
  height: 70px;
  overflow: hidden;
  border: 2px solid rgba(255, 255, 255, 0.14);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.08);
}

.post-check-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Reel ou vídeo: um triângulo de play por cima da miniatura. */
.post-check-thumb.is-video::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-top: 8px solid transparent;
  border-bottom: 8px solid transparent;
  border-left: 13px solid rgba(255, 255, 255, 0.92);
  filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.6));
  transform: translate(-40%, -50%);
}

.post-check-caption {
  font-size: 0.82rem;
}

/* Oferta marcada ou desmarcada: o total dá um pulo e brilha enquanto conta de novo. */
.profile-check-growth.growth-bump .growth-next strong,
.profile-check-growth.growth-bump .growth-next em {
  animation: growth-bump 0.7s ease-out;
}

@keyframes growth-bump {
  0% {
    transform: scale(1);
    text-shadow: none;
  }
  35% {
    transform: scale(1.18);
    text-shadow: 0 0 14px rgba(255, 173, 77, 0.75);
  }
  100% {
    transform: scale(1);
    text-shadow: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .profile-check-growth.growth-bump .growth-next strong,
  .profile-check-growth.growth-bump .growth-next em {
    animation: none;
  }
}
