@import "../../global/global.css";

@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;700;800&family=Inter:wght@400;500;700&display=swap");

body {
  font-family: "Inter", sans-serif;
  background-image: url("../../../../images/cadastro-login/background.png");
  background-size: cover;
  background-attachment: fixed;
}
::selection {
  background-color: var(--cor-rosa-escuro);
  color: var(--cor-branca);
}
img {
  user-select: none;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

.container-card {
  background-color: rgba(180, 100, 89, 0.35);
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1),
    0 4px 6px -2px rgba(0, 0, 0, 0.05);
  z-index: 10;
  position: relative;
}

.input-style:-webkit-autofill,
.input-style:-webkit-autofill:hover,
.input-style:-webkit-autofill:focus,
.input-style:-webkit-autofill:active {
  box-shadow: 0 0 0 1000px rgba(180, 100, 89, 0.78) inset;
  outline: none;
  /* REMOVIDO: border: none; -> Isso permite que nossa borda de foco funcione */
  -webkit-text-fill-color: var(--cor-branca);
}

  .input-style {
    color: white;
    font-weight: 500;
    padding: 1.15rem;
    /* ALTERADO: de 'border: none;' para uma borda transparente para reservar espaço */
    border: solid 2px transparent;
    border-radius: 0.75rem;
    background-color: rgba(180, 100, 89, 0.58);
    /* ADICIONADO: A transição para suavizar a mudança da cor da borda */
    transition: border-color 0.3s ease-in-out;
  }

.input-style::placeholder {
  color: rgba(255, 255, 255, 0.8);
}

.input-style:focus {
  outline: none;
  /* ALTERADO: de 'border' para 'border-color' para animar apenas a cor */
  /* A cor foi ajustada para ser mais visível que a anterior */
  border-color: rgba(255, 255, 255, 0.6);
}

.senha-input {
  font-size: 1.1rem;
  background-color: rgba(152, 4, 3, 0.58);
}

.senha-input:focus {
  outline: none;
  /* ALTERADO: de 'border' para 'border-color' para animar apenas a cor */
  /* A cor foi ajustada para combinar e ter mais visibilidade */
  border-color: rgba(255, 150, 150, 0.6);
}

.toggle-senha {
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: white;
  cursor: pointer;
  opacity: 0.8;
  transition: opacity 0.2s;
}

.toggle-senha:hover {
  opacity: 1;
}

.link-style {
  color: var(--cor-vermelho);
  border-bottom: 1px solid var(--cor-vermelho);
  font-weight: 500;
  transition: color 0.3s, border-color 0.3s;
}

.link-style:hover {
  color: white;
  border-color: white;
}

.adopt-btn {
  position: relative;
  overflow: hidden;
  transition: transform 0.2s ease-out, box-shadow 0.2s ease-out;
  cursor: pointer;
  background-color: #b92b2b;
  color: #f0e9e9;
  font-family: "Poppins", sans-serif;
  font-weight: 700;
  font-size: 1.5rem; /* Ajustado para caber melhor */
  padding: 0.75rem 0; /* py-3 */
  width: 100%;
  max-width: 280px;
  border-radius: 1rem; /* rounded-2xl */
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2), 0 6px 20px rgba(0, 0, 0, 0.19);
}

.adopt-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.25), 0 10px 25px rgba(0, 0, 0, 0.22);
}

.adopt-btn:active {
  transform: translateY(1px);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.heart-background {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 1;
  font-size: 3.5rem;
  margin-top: 3px;
  line-height: 1;
  color: #a82626;
  user-select: none;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3),
    -1px -1px 2px rgba(255, 255, 255, 0.15);
}

.adopt-btn span {
  position: relative;
  z-index: 2;
  text-shadow: 0px 2px 4px rgba(0, 0, 0, 0.3);
}

.pata-fundo {
  position: fixed;
  bottom: 0;
  right: 0;
  height: 24rem;
  width: 40rem;
  opacity: 1;
  z-index: 0;
  pointer-events: none;
  display: none; /* Oculto por padrão */
}

@media (min-width: 1024px) {
  .pata-fundo {
    display: block;
  }
}

/* --- ESTILOS DAS ABAS --- */
.tab-btn.active {
  color: white;
  border-bottom: 3px solid #f0e9e9;
}

.form-container {
  display: none; /* Esconde todos os formulários por padrão */
}

.form-container.active {
  display: block; /* Mostra apenas o formulário ativo */
  animation: fadeIn 0.5s ease-in-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* --- ESTILOS DO MODAL 'ESQUECI A SENHA' --- */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.6);
  display: none; /* Inicia oculto */
  justify-content: center;
  align-items: center;
  z-index: 1000;
  opacity: 0;
  transition: opacity 0.3s ease-in-out;
}

.modal-overlay.active {
  display: flex;
  opacity: 1;
}

.modal-content {
  background-color: #f7f4f2; /* Cor de fundo suave do site */
  padding: 2.5rem;
  border-radius: 1.5rem;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
  width: 90%;
  max-width: 450px;
  position: relative;
  transform: scale(0.95);
  transition: transform 0.3s ease-in-out;
}

.modal-overlay.active .modal-content {
  transform: scale(1);
}

.modal-close-btn {
  position: absolute;
  top: 10px;
  right: 15px;
  font-size: 2.5rem;
  font-weight: 300;
  color: #888;
  background: none;
  border: none;
  cursor: pointer;
  line-height: 1;
}

.modal-close-btn:hover {
  color: #333;
}

#resend-button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  text-decoration: none;
  border-bottom: 1px solid transparent;
}
/* ==========================================================================
   BOTÃO VOLTAR - Estilo e Posicionamento Fixo/Responsivo
   ========================================================================== */
.btn-voltar {
  /* --- Posicionamento --- */
  position: absolute; /* Ou 'fixed' se quiser que ele permaneça mesmo com scroll */
  top: 2rem; /* 32px do topo */
  left: 2rem; /* 32px da esquerda */
  z-index: 100; /* Garante que fique acima de outros elementos */
  display: inline-flex; /* Alinha o ícone e o texto corretamente */
  align-items: center;
  gap: 0.5rem; /* Espaço entre o ícone e o texto */
  padding: 0.75rem 1.25rem;
  color: var(--cor-vermelho);
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
}

.btn-voltar:focus-visible {
  outline: 2px solid var(--cor-branca);
  outline-offset: 2px;
}

/* --- AJUSTES RESPONSIVOS (Mobile First) --- */

/* Telas de tablet e menores */
@media (max-width: 768px) {
  .btn-voltar {
    top: 0.1rem; /* Menor distância do topo */
    left: 1rem; /* Menor distância da esquerda */
    padding: 0.5rem;
    font-size: 0.9rem;
  }
}

/* Telas de celular (bem pequenas) */
@media (max-width: 480px) {
  .btn-voltar {
    padding: 0.5rem;
    top: 0.2rem;
    left: 0.2rem;
  }
}
/* Telas de celular (bem pequenas) */
@media (max-width: 380px) {
  .btn-voltar {
    padding: 0.25rem;
    top: 0;
    left: 0;
  }
}


.mensagem-validacao {
  color: #f15151; /* Tom de vermelho do seu toast de erro */
  transition: opacity 0.3s ease-in-out;
  opacity: 0; /* Começa invisível */
}

.mensagem-validacao.visivel {
  opacity: 1; /* Torna visível com uma transição suave */
  font-size: 1rem; /* 14px */
  font-weight: 500;
  margin-top: 0.3rem;
  height: 30px; /* Garante uma altura fixa para não "empurrar" o layout */
}

/* Estilo para inputs inválidos */
.input-style.invalido {
  border-color: #f87171;
}



/* ==========================================================================
   TOAST/MODAL DE NOTIFICAÇÃO - Estilos e Animações
   ========================================================================== */
.toast {
  position: fixed;
  top: 2rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2000;
  display: flex;
  align-items: center;
  margin-top: 1.5rem;
  min-width: 350px;
  max-width: 90%;
  border-radius: 12px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
  font-family: "Poppins", sans-serif;
}

.toast.show {
  opacity: 1;
  pointer-events: auto;
  animation: slideIn 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

.toast.hide {
  animation: slideOut 0.5s cubic-bezier(0.55, 0.085, 0.68, 0.53) forwards;
}

.toast-icon {
  flex-shrink: 0;
  width: 110px;
  height: 110px;
  margin-right: 1rem;
}

.toast-content {
  flex-grow: 1;
}

.toast-message {
  margin: 0;
  font-weight: 500;
  font-size: 1rem;
  line-height: 1.4;
}

/* --- Cores por tipo --- */
.toast--success {
  background-color: #d1fae5; /* Verde claro */
  color: #065f46; /* Verde escuro */
}
.toast--warning,
.toast--danger {
  background-color: #fee2e2; /* Vermelho claro */
  color: #991b1b; /* Vermelho escuro */
}

/* --- Barra de Progresso --- */
.toast-progress-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 5px;
}
.toast--success .toast-progress-bar {
  background-color: #34d399;
}
.toast--warning .toast-progress-bar,
.toast--danger .toast-progress-bar {
  background-color: #f87171;
}

.toast.show .toast-progress-bar {
  animation: shrink 5s linear forwards;
}
/* --- Animações --- */
@keyframes slideIn {
  from {
    top: -100px;
    opacity: 0;
  }
  to {
    top: 2rem;
    opacity: 1;
  }
}

@keyframes slideOut {
  from {
    top: 2rem;
    opacity: 1;
  }
  to {
    top: -100px;
    opacity: 0;
  }
}

@keyframes shrink {
  from {
    width: 100%;
  }
  to {
    width: 0%;
  }
}


/* Estilos específicos para os campos de Cidade/UF */
.grid-cols-1.md\:grid-cols-4 {
    gap: 1rem; /* 16px no mobile */
}

@media (min-width: 768px) {
    .grid-cols-1.md\:grid-cols-4 {
        gap: 1.5rem; /* 24px no desktop */
    }
}

/* Ajustes específicos para o campo UF */
.input-style.text-center.md\:text-left {
    min-width: 60px; /* Largura mínima para o campo UF */
}

/* Melhorias para mobile */
@media (max-width: 767px) {
    .grid-cols-1 > div {
        width: 100%;
    }
    
    /* Ajuste específico para o campo UF no mobile */
    .md\:col-span-1 input {
        text-align: center;
        font-weight: 600;
    }
    
    /* Garante que os inputs tenham tamanho adequado no mobile */
    .input-style {
        padding: 1rem;
        font-size: 16px; /* Previne zoom no iOS */
    }
}

/* Melhoria adicional para telas muito pequenas */
@media (max-width: 380px) {
    .grid-cols-1.md\:grid-cols-4 {
        gap: 0.75rem;
    }
    
    .input-style {
        padding: 0.875rem;
    }
}