/*
 * Pop-up "Entrar no ZapNotei": o mesmo cartão da tela /entrar do app (web/components/auth), sem o rodapé de termos.
 * Medidas e cores copiadas do app; mudou lá, muda aqui.
 */

html:has(.entrar[open]) {
  overflow: hidden;
}

.entrar {
  --e-borda-cartao: #edf1ee;
  --e-borda-campo: #d5dcd7;
  --e-texto: #1a2421;
  --e-mudo: #5a6b62;
  --e-placeholder: #879690;
  --e-erro: #b42318;
  --e-primaria: #1b4332;

  width: min(480px, calc(100% - 32px));
  max-width: none;
  max-height: calc(100dvh - 32px);
  margin: auto;
  padding: 0;
  border: 0;
  border-radius: 24px;
  background: transparent;
  color: var(--e-texto);
  overflow: visible;
}
.entrar::backdrop {
  background: rgb(13 31 20 / 55%);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}
.entrar[open] {
  animation: entrar-abre 320ms var(--ease) both;
}
.entrar[open]::backdrop {
  animation: entrar-fundo 320ms var(--ease) both;
}
@keyframes entrar-abre {
  from { opacity: 0; transform: translateY(12px) scale(0.98); }
}
@keyframes entrar-fundo {
  from { opacity: 0; }
}

.entrar__cartao {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 36px;
  max-height: calc(100dvh - 32px);
  overflow-y: auto;
  padding: 48px 40px;
  border: 1px solid var(--e-borda-cartao);
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 4px 12px rgb(0 0 0 / 6%), 0 40px 80px -40px rgb(13 31 20 / 45%);
  font-family: var(--f-body);
}

.entrar__fechar {
  position: absolute;
  top: 14px;
  right: 14px;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--e-mudo);
  cursor: pointer;
  transition: background-color var(--t-fast), color var(--t-fast);
}
.entrar__fechar:hover {
  background: #f3f4ee;
  color: var(--e-texto);
}

.entrar__marca {
  display: flex;
  justify-content: center;
}
.entrar__marca svg {
  width: 158px;
  height: 48px;
}

.entrar__cabeca {
  display: flex;
  flex-direction: column;
  gap: 16px;
  text-align: center;
}
.entrar__cabeca h2 {
  margin: 0;
  font-family: var(--f-display);
  font-size: 24px;
  font-weight: 600;
  line-height: 30px;
  letter-spacing: -0.2px;
  color: var(--e-texto);
}
.entrar__cabeca p {
  font-size: 14px;
  line-height: 20px;
  color: var(--e-mudo);
}

.entrar__divisor {
  width: 100%;
  height: 1px;
  margin: 0;
  border: 0;
  background: var(--e-borda-cartao);
}

.entrar__form {
  display: flex;
  flex-direction: column;
  gap: 28px;
}
.entrar__campo {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.entrar__campo label {
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
}

.telefone {
  display: flex;
  align-items: stretch;
  height: 48px;
  overflow: hidden;
  border: 1px solid var(--e-borda-campo);
  border-radius: 12px;
  background: #fff;
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
}
.telefone:focus-within {
  border-color: var(--e-primaria);
  box-shadow: 0 0 0 2px rgb(27 67 50 / 25%);
}
.telefone[data-invalido] {
  border-color: var(--e-erro);
}
.telefone[data-invalido]:focus-within {
  box-shadow: 0 0 0 2px rgb(180 35 24 / 25%);
}
.telefone__pais {
  position: relative;
  display: flex;
  flex: none;
  align-items: center;
  gap: 6px;
  padding: 0 8px 0 12px;
  border-right: 1px solid var(--e-borda-campo);
  font-size: 16px;
  font-variant-numeric: tabular-nums;
}
.telefone__bandeira {
  display: flex;
  justify-content: center;
  width: 24px;
  font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif;
  font-size: 17px;
}
.telefone__pais svg {
  color: var(--e-mudo);
}
.telefone__pais select {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}
.telefone input {
  flex: 1;
  min-width: 0;
  height: 100%;
  padding: 0 12px;
  border: 0;
  background: transparent;
  font: inherit;
  font-size: 16px;
  color: var(--e-texto);
  outline: none;
}
.telefone input::placeholder {
  color: var(--e-placeholder);
}
/* O anel do campo já mostra o foco; o contorno global ficaria duplicado. */
.telefone input:focus-visible,
.telefone select:focus-visible {
  outline: none;
}

.entrar__dica,
.entrar__erro {
  font-size: 13px;
  line-height: 18px;
}
.entrar__dica {
  color: var(--e-mudo);
}
.entrar__erro {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--e-erro);
}
.entrar__erro[hidden],
.entrar__dica[hidden] {
  display: none;
}

.entrar__enviar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 48px;
  border: 0;
  border-radius: 12px;
  background: var(--lime);
  color: var(--e-texto);
  font: inherit;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: background-color var(--t-fast), transform var(--t-fast);
}
.entrar__enviar:hover {
  background: var(--lime-2);
}
.entrar__enviar:active {
  transform: scale(0.99);
}
.entrar__enviar:disabled {
  cursor: progress;
  opacity: 0.85;
}
.entrar__giro {
  width: 16px;
  height: 16px;
  border: 2px solid rgb(26 36 33 / 25%);
  border-top-color: var(--e-texto);
  border-radius: 50%;
  animation: entrar-giro 700ms linear infinite;
}
@keyframes entrar-giro {
  to { transform: rotate(360deg); }
}

.entrar__dicas {
  display: flex;
  flex-direction: column;
  gap: 40px;
}
.entrar__dicas p {
  text-align: center;
  font-size: 13px;
  line-height: 20px;
  color: var(--e-mudo);
}
.entrar__dicas strong {
  font-weight: 700;
  color: var(--e-texto);
}
.entrar__dicas .entrar__micro {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 11px;
}

@media (max-width: 520px) {
  .entrar__cartao {
    gap: 32px;
    padding: 40px 28px;
  }
  .entrar__cabeca h2 {
    font-size: 22px;
    line-height: 28px;
  }
}
