/*
  Campo de extensões a derivar (hero de /domains).

  - `.mask` recorta a camada ao hero e deixa as palavras visíveis só ao centro,
    atrás do título e da caixa de pesquisa.
  - `.layer` é maior do que o hero (inset negativo) para que o deslocamento nunca
    deixe ver a borda do canvas.
  - O movimento é só este keyframe: o canvas desenha-se uma vez, por isso não há
    custo de JavaScript por frame.
*/

.tld-drift-background_mask__cHssv {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  -webkit-mask-image: radial-gradient(115% 80% at 50% 48%, black 22%, transparent 76%);
  mask-image: radial-gradient(115% 80% at 50% 48%, black 22%, transparent 76%);
}

.tld-drift-background_layer__mQRsJ {
  position: absolute;
  inset: -18% -12%;
  animation: tld-drift-background_tldDrift__D3XRc 48s ease-in-out infinite;
  will-change: transform;
}

.tld-drift-background_canvas__7N1Ot {
  display: block;
  width: 100%;
  height: 100%;
}

@keyframes tld-drift-background_tldDrift__D3XRc {
  0%,
  100% {
    transform: translate3d(-66px, 0, 0);
  }
  25% {
    transform: translate3d(0, -40px, 0);
  }
  50% {
    transform: translate3d(66px, 0, 0);
  }
  75% {
    transform: translate3d(0, 40px, 0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .tld-drift-background_layer__mQRsJ {
    animation: none;
    will-change: auto;
  }
}

/*
  Cartão de resultado de domínio.

  O canto direito é uma janela de 2rem (32px) com overflow:hidden e uma pilha de
  duas linhas de 2rem: o preço e, por baixo, "Comprar". No hover/foco a pilha sobe
  2rem: o preço sai por cima e "Comprar" entra por baixo. CSS puro, por isso a
  animação é interrompível a meio. Em toque não há hover: o cartão inteiro é o
  botão e a pilha fica no preço.
*/

.domain-result-card_card__9clde {
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --row: 2rem;

  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  min-height: 3rem;
  padding: 0 0.6875rem;
  border: 1px solid hsl(var(--border));
  border-radius: 0.75rem;
  background-color: hsl(var(--card));
  color: hsl(var(--foreground));
  font: inherit;
  text-align: left;
  -webkit-tap-highlight-color: transparent;
  transition:
    background-color 100ms ease,
    border-color 150ms ease,
    transform 120ms var(--ease-out);
}

/* Só os cartões comprável/ver carrinho (botões) e "Sob consulta" (link) são interactivos. */
:is(button, a).domain-result-card_card__9clde {
  color: hsl(var(--foreground));
  text-decoration: none;
  cursor: pointer;
  touch-action: manipulation;
}

:is(button, a).domain-result-card_card__9clde:active {
  transform: scale(0.98);
}

:is(button, a).domain-result-card_card__9clde:focus-visible {
  outline: 2px solid hsl(var(--ring));
  outline-offset: 2px;
}

/* Hover só com rato: em toque o :hover colava depois do toque. */
@media (hover: hover) and (pointer: fine) {
  :is(button, a).domain-result-card_card__9clde:hover {
    background-color: hsl(var(--muted));
  }
  :is(button, a).domain-result-card_card__9clde:hover .domain-result-card_stack__tngwP {
    transform: translateY(calc(var(--row) * -1));
  }
}

:is(button, a).domain-result-card_card__9clde:focus-visible .domain-result-card_stack__tngwP {
  transform: translateY(calc(var(--row) * -1));
}

/* Sugestões alternativas: âmbar (token --warning), também no hover. O tom é uma camada
   por cima do fundo do cartão (opaco), para a grelha de pontos da página não passar
   por trás do texto e riscar o "por ano". */
.domain-result-card_card__9clde[data-tone='suggestion'] {
  border-color: hsl(var(--warning) / 0.3);
  background-image: linear-gradient(hsl(var(--warning) / 0.05), hsl(var(--warning) / 0.05));
}

@media (hover: hover) and (pointer: fine) {
  :is(button, a).domain-result-card_card__9clde[data-tone='suggestion']:hover {
    border-color: hsl(var(--warning) / 0.5);
    background-color: hsl(var(--card));
    background-image: linear-gradient(hsl(var(--warning) / 0.1), hsl(var(--warning) / 0.1));
  }
}

/* ---- Nome ---------------------------------------------------------------- */

.domain-result-card_name__hbQVj {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.1875rem;
  min-width: 0;
  flex: 1 1 auto;
  padding: 0.375rem 0;
  transition: opacity 150ms ease;
}

/* Nota de uma linha (razão da IA): corta com reticências, texto completo no title. */
.domain-result-card_note__NH3_c {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.75rem;
  line-height: 1rem;
  /* Sobre o âmbar das sugestões o cinzento do tema ficava a 4,4:1 no claro: mistura-se com o texto do tema (AA nos dois temas). */
  color: hsl(var(--muted-foreground));
  color: color-mix(in srgb, hsl(var(--muted-foreground)) 70%, hsl(var(--foreground)));
}

/* Linha de meta: 10px, maiúsculas, tracking-wide, como na lista anterior. */
.domain-result-card_meta__8cTV6 {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
  overflow: hidden;
  font-size: 0.625rem;
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0.025em;
  text-transform: uppercase;
  white-space: nowrap;
}

.domain-result-card_label__HwjDP {
  display: flex;
  min-width: 0;
  font-size: 0.875rem;
  line-height: 1.125rem;
  font-weight: 500;
  letter-spacing: -0.005em;
}

/* Nomes longos cortam-se no nome, nunca na extensão. */
.domain-result-card_base__Mvi4W {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.domain-result-card_tld__2nMfp {
  flex-shrink: 0;
  font-weight: 700;
  white-space: nowrap;
}

/* ---- Janela do preço ------------------------------------------------------ */

.domain-result-card_win__ygTlx {
  flex-shrink: 0;
  height: var(--row);
  overflow: hidden;
  text-align: right;
}

.domain-result-card_stack__tngwP {
  display: flex;
  flex-direction: column;
  transition: transform 220ms var(--ease-out);
  will-change: transform;
}

.domain-result-card_row__gLnGC {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
  height: var(--row);
}

.domain-result-card_price__yWml2 {
  display: inline-flex;
  align-items: baseline;
  gap: 0.375rem;
  font-size: 0.875rem;
  line-height: 1rem;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.domain-result-card_was__Gxa7T {
  font-size: 0.75rem;
  font-weight: 400;
  color: hsl(var(--muted-foreground));
  text-decoration: line-through;
}

.domain-result-card_sub__INuqY {
  font-size: 0.75rem;
  line-height: 0.875rem;
  color: hsl(var(--muted-foreground));
  color: color-mix(in srgb, hsl(var(--muted-foreground)) 70%, hsl(var(--foreground)));
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.domain-result-card_buy__Xkza3 {
  flex-direction: row;
  align-items: center;
  justify-content: flex-end;
  gap: 0.25rem;
  font-size: 0.875rem;
  font-weight: 600;
  /* O azul do tema sozinho dá menos de 4,5:1 no escuro; misturado com o texto do tema
     (claro no escuro, escuro no claro) passa AA nos dois temas e nos fundos âmbar. */
  color: hsl(var(--primary));
  color: color-mix(in srgb, hsl(var(--primary)) 75%, hsl(var(--foreground)));
  white-space: nowrap;
}

.domain-result-card_inCart__oKXUu {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.875rem;
  line-height: 1rem;
  font-weight: 600;
  white-space: nowrap;
}

.domain-result-card_inCartIcon__KG07v {
  color: hsl(var(--success));
}

/* Em toque não há hover, por isso aparece uma seta fixa a dizer que o cartão é um botão. */
.domain-result-card_touchHint__eFk_H {
  display: none;
  flex-shrink: 0;
  color: hsl(var(--muted-foreground));
}

@media (hover: none), (pointer: coarse) {
  .domain-result-card_touchHint__eFk_H {
    display: inline-flex;
  }
}

/* ---- Estados ------------------------------------------------------------- */

/* A verificar: o nome já está lá, só o preço ainda não. */
.domain-result-card_skeleton__DnFJR {
  display: block;
  width: 4.5rem;
  height: 0.75rem;
  border-radius: 0.25rem;
  background-color: hsl(var(--muted));
  animation: domain-result-card_cardPulse__JJDID 1.4s ease-in-out infinite;
}

/*
  A verificar com preço de tabela: o preço fica esbatido e um brilho passa POR CIMA (uma
  camada, não texto com gradiente), só na zona do preço. Sem movimento: fica só esbatido.
*/
.domain-result-card_pendingPrice__gH5WV {
  position: relative;
  overflow: hidden;
  border-radius: 0.25rem;
  opacity: 0.55;
}

.domain-result-card_shimmer__nZ6Xx {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, hsl(var(--background) / 0.85), transparent);
  transform: translateX(-100%);
  animation: domain-result-card_cardShimmer__QMiPT 1.3s ease-in-out infinite;
}

@keyframes domain-result-card_cardShimmer__QMiPT {
  to {
    transform: translateX(100%);
  }
}

/*
  Falhou a verificação: estado NEUTRO (sem vermelho: não é um erro do cliente), sem preço e sem
  compra. O botão ocupa a altura do cartão (alvo de toque >= 44px) e repete só este domínio.
*/
.domain-result-card_retry__9Qxb4 {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
  align-self: stretch;
  flex-shrink: 0;
  margin: 0 -0.375rem 0 0;
  padding: 0 0.375rem;
  border: 0;
  border-radius: 0.5rem;
  background: none;
  font: inherit;
  text-align: right;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.domain-result-card_retry__9Qxb4:focus-visible {
  outline: 2px solid hsl(var(--ring));
  outline-offset: 0;
}

.domain-result-card_retryMsg__yx7FL {
  font-size: 0.75rem;
  line-height: 1rem;
  color: hsl(var(--muted-foreground));
  color: color-mix(in srgb, hsl(var(--muted-foreground)) 70%, hsl(var(--foreground)));
}

.domain-result-card_retryAction__uWnOf {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.8125rem;
  line-height: 1.125rem;
  font-weight: 600;
  color: hsl(var(--primary));
  color: color-mix(in srgb, hsl(var(--primary)) 75%, hsl(var(--foreground)));
  white-space: nowrap;
}

.domain-result-card_retry__9Qxb4:hover .domain-result-card_retryAction__uWnOf {
  text-decoration: underline;
  text-underline-offset: 2px;
}

.domain-result-card_retry__9Qxb4:active {
  transform: scale(0.97);
}

/* Indisponível: nome esbatido, chip com texto legível, sem interacção. */
.domain-result-card_card__9clde[data-state='unavailable'] {
  border-color: hsl(var(--border) / 0.6);
  cursor: default;
}

.domain-result-card_card__9clde[data-state='unavailable'] .domain-result-card_name__hbQVj {
  opacity: 0.55;
}

.domain-result-card_chip__8Inig {
  flex-shrink: 0;
  padding: 0.125rem 0.4375rem;
  border: 1px solid hsl(var(--border));
  border-radius: 0.375rem;
  font-size: 0.75rem;
  line-height: 1rem;
  font-weight: 600;
  color: hsl(var(--muted-foreground));
  white-space: nowrap;
}

/* Mudança de estado (a verificar, disponível, indisponível): o conteúdo novo entra em 150ms. */
.domain-result-card_fade__atlMp {
  animation: domain-result-card_cardFade__3lirE 150ms ease-out both;
}

@keyframes domain-result-card_cardFade__3lirE {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes domain-result-card_cardPulse__JJDID {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.45;
  }
}

@media (prefers-reduced-motion: reduce) {
  .domain-result-card_card__9clde,
  .domain-result-card_stack__tngwP,
  .domain-result-card_name__hbQVj {
    transition: none;
  }
  :is(button, a).domain-result-card_card__9clde:active {
    transform: none;
  }
  .domain-result-card_retry__9Qxb4:active {
    transform: none;
  }
  .domain-result-card_skeleton__DnFJR {
    animation: none;
  }
  .domain-result-card_shimmer__nZ6Xx {
    display: none;
  }
  .domain-result-card_fade__atlMp {
    animation: none;
  }
}

