/* Estilos para o formulário de registro */
@import './styles.css';

html {
  text-size-adjust: 100%;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: 'Poppins', sans-serif;
  margin: 0;
  padding: 0;
  background-color: #f8f8f8;
  display: flex;
  justify-content: center;
  align-items: center;
  height: auto;
}

input, button, textarea, select, a {
  font-family: 'Poppins', sans-serif;
}

.main-container {
  display: flex;
  flex-direction: row;
  width: 90%;
  max-width: 1200px;
  background-color: #fff;
  border-radius: 10px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  margin: auto;
  margin-top: 10px;
  margin-bottom: 10px;
  overflow: hidden;
}

.login-left {
  width: 50%;
  padding: 40px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
}

.terms-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.terms-group input[type="checkbox"] {
  transform: scale(1.2); /* Tamanho consistente com o checkbox superior */
  cursor: pointer;
}

.terms-group .terms-label {
  color: #34495e;
  font-size: 14px;
  font-weight: normal;
  margin-top: 0;
}

/* Sobrescrevendo estilos globais apenas para o formulário de registro */
#registerForm {
  width: 100%;
}

#registerForm input[type="password"] {
  width: 100%;
  padding: 10px 40px 10px 10px; /* Espaço à direita para o ícone do olho */
  margin-bottom: 0px; /* Substitui o margin do style.css */
  border: 1px solid #ccc; /* Sobrescreve a cor da borda */
  border-radius: 5px; /* Bordas arredondadas */
  font-size: 1rem; /* Tamanho da fonte padrão */
  box-sizing: border-box; /* Garante que o padding não aumente a largura total */
}

/* ========= Estilo do Container login-right ========= */
.login-right {
  flex: none; /* Impede o crescimento automático */
  width: 50%; /* Define a largura desejada */
  max-width: 600px; /* Limite máximo de largura */
  background: #f2bfe4;
  color: #555;
  display: flex;
  flex-direction: column;
  justify-content: center; /* Centraliza verticalmente */
  align-items: center;
  height: auto;
  border-radius: 10px;
  padding: 20px;
  margin-left: auto; /* Alinha à direita */
  margin-right: 20px;
  margin-top: 20px;
  margin-bottom: 20px;
}

/* ========= Cabeçalho ========= */
.login-header {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  width: 98%;
  margin-bottom: 10px;
  padding: 20px 30px 0 0;
}

.icon-and-text {
  display: flex;
  align-items: center;
  gap: 8px;
}

.icon-and-text img {
  width: 25px;
  height: 25px;
}

.contact-info {
  color: #555;
  font-size: 1rem;
}

/* ========= Corpo ========= */
.login-body {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  margin-top: 10px;
}

.secondary_logo {
  width: 150px;
  height: auto;
  object-fit: contain;
  margin: 0 auto;
}

/* ========= Rodapé ========= */
.login-footer {
  width: 100%;
  text-align: left;
  padding: 0px 0px 80px 80px;
}

.login-footer h2 {
  font-size: 1.5rem;
  margin-bottom: 10px;
  margin-left: 20px;
}

.login-footer h2,
.login-footer p {
  margin: 0;
  padding: 0;
  text-align: left;
}

.footer-text {
  font-size: 1rem;
  color: #555;
  margin-top: 5px;
  line-height: 1.5;
}

/* ========= Demais estilos ========= */
h1 {
  font-size: 2rem;
  font-weight: 500;
  margin-bottom: 10px;
}

p {
  font-size: 1rem;
  color: #555;
  line-height: 1.5;
}

p a {
  color: #fc7dda;
  font-weight: bold;
  text-decoration: none;
}

p a:hover {
  color: #fcade7;
  text-decoration: underline;
}

.input-group {
  margin-bottom: 15px;
  display: flex;
  flex-direction: column;
}

.input-group label {
  font-size: 1rem;
  color: #bebebe;
  margin-bottom: 5px;
}

.input-group input {
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 5px;
  font-size: 1rem;
  box-sizing: border-box;
}

.input-group input:focus {
  border-color: #f2bfe4;
  outline: none;
}

.btn {
  width: 100%;
  background-color: #f2bfe4;
  color: #555;
  border: none;
  border-radius: 5px;
  padding: 10px;
  font-size: 1rem;
  cursor: pointer;
  margin-top: 15px;
}

.btn:hover {
  background-color: #f3b1e2;
}

/* Ajustando stilo da mensgaem das regras do password */
.password-rules {
  padding: 0; /* Padrão: sem padding */
  margin-top: 0; /* Padrão: sem margin */
  opacity: 0;
  visibility: hidden;
  height: 0;
  overflow: hidden;
  background-color: #f9f9f9;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 14px;
  color: #555;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: all 0.3s ease-in-out; /* Transição suave */
}

.password-rules.visible {
  opacity: 1;
  visibility: visible;
  height: auto; /* Ajusta o tamanho conforme o conteúdo */
  padding: 10px; /* Adiciona padding quando visível */
  margin-top: 10px; /* Adiciona margin quando visível */
}

.rule {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: #888;
}

.rule .icon {
  font-size: 18px;
  width: 18px;
}

.rule.valid .icon {
  color: #28a745; /* Verde de confirmação */
  content: "✅";
}

.rule.valid {
  color: #28a745; /* Texto em verde */
}

.rule.invalid .icon {
  color: #dc3545; /* Vermelho para regras não cumpridas */
  content: "⛔";
}

.rule.invalid {
  color: #dc3545; /* Texto em vermelho */
}

.rule .hint {
  color: #666;
}

/* Ajustando o ícone para ficar dentro do input */
.input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

/* Ajusta o input para deixar espaço para o ícone */
.input-wrapper input {
  width: 100%;
  padding-right: 40px; /* Espaço extra para o ícone */
  height: 45px;
  border: 1px solid #ccc;
  border-radius: 5px;
  font-size: 1rem;
  box-sizing: border-box;
}

/* Posiciona o ícone dentro do input */
.toggle-password {
  position: absolute;
  right: 10px; /* Alinha o ícone à direita */
  top: 50%;
  transform: translateY(-50%);
  cursor: pointer;
  width: 22px;
  height: 22px;
  opacity: 0.6;
  transition: opacity 0.3s ease;
}

.toggle-password:hover {
  opacity: 1; /* Suaviza a aparência */
}

.input-group.terms-group {
  display: flex;
  align-items: center;
  gap: 15px;                
  font-weight: normal;    
  font-family: 'Poppins', sans-serif;
  font-size: 14px;
  color: #333;
  margin-bottom: 10px;
  flex-direction: row;
}

.terms-group input[type="checkbox"] {
  width: 24px;             /* Define uma largura padrão para o checkbox */
  height: 24px;            /* Define uma altura padrão */
  margin-right: 10;               /* Remove margens extras */
  padding: 0;              /* Remove preenchimento interno */
  cursor: pointer;         /* Estilo de cursor para melhor UX */
  vertical-align: middle;  /* Alinha o checkbox verticalmente ao texto */
  appearance: auto;        /* Garante o estilo padrão do navegador */
}  


.terms-label {
  font-weight: normal;     /* Remove o negrito */
  line-height: 1.5;        /* Ajusta o espaçamento entre linhas */
  display: inline;         /* Garante que o texto fique alinhado ao checkbox */
}

.terms-label a {
  color: #007BFF;          /* Cor azul para links */
  text-decoration: none;  
  font-weight: normal;
}

.terms-label a:hover {
  text-decoration: underline; /* Sublinha o link ao passar o mouse */
}

.error-message {
  color: red;
  font-size: 0.9em;
  margin-top: 5px;
}

/* ========= Media Query para telas pequenas ========= */
@media (max-width: 768px) {
  .main-container {
    flex-direction: column;
    width: 95%;
  }

  .login-left, .login-right {
    width: 90%;
    max-width: 400px;
    padding: 20px;
    margin: auto;
  }

  h1 {
    font-size: 1.5rem;
  }

  .btn {
    padding: 8px;
    font-size: 0.9rem;
  }

  .login-right {
    display: none;
  }
}

.error-message {
  background-color: #fff0f0;
  color: #b00020;
  padding: 10px;
  border: 1px solid #b00020;
  border-radius: 5px;
  margin-bottom: 10px;
  font-size: 0.9rem;
}

.loader-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.9);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

.spinner-circle {
  width: 50px;
  height: 50px;
  border: 4px solid #e0e0e0;
  border-top: 4px solid #fc7dda;
  border-radius: 50%;
  animation: spin 1.2s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* ========= Estilos para o Reset de Senha ========= */
.reset-password-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  max-width: 500px;
  background: white;
  padding: 40px;
  border-radius: 10px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

/* Centraliza o título e parágrafos */
.reset-password-container h2, 
.reset-password-container p {
  text-align: center;
}

/* Estiliza o grupo de input */
.reset-password-container .input-group {
  width: 100%;
  margin-bottom: 15px;
  display: flex;
  flex-direction: column;
}

/* Ajusta os inputs de senha */
.reset-password-container .input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

/* Ajusta o tamanho dos inputs */
.reset-password-container input[type="password"] {
  width: 100%;
  padding-right: 40px;
  height: 45px;
  border: 1px solid #ccc;
  border-radius: 5px;
  font-size: 1rem;
  box-sizing: border-box;
}

/* Posiciona o ícone de visualizar senha */
.reset-password-container .toggle-password {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  cursor: pointer;
  width: 22px;
  height: 22px;
  opacity: 0.6;
  transition: opacity 0.3s ease;
}

.reset-password-container .toggle-password:hover {
  opacity: 1;
}

/* Estilos para as regras de senha */
.reset-password-container .password-rules {
  display: block;  /* Sempre presente na estrutura */
  opacity: 0;
  visibility: hidden;
  height: auto; /* Permite que o conteúdo se expanda naturalmente */
  overflow: hidden;
  background-color: #f9f9f9;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 14px;
  color: #555;
  padding: 0;
  margin-top: 0;
  transition: opacity 0.3s ease-in-out, visibility 0.3s ease-in-out;
}

/* Quando ativado via JavaScript, a seção aparece */
.reset-password-container .password-rules.visible {
  opacity: 1;
  visibility: visible;
  padding: 10px; /* Adiciona espaçamento ao exibir */
  margin-top: 10px;
}

/* Ajuste para os ícones de validação */
.reset-password-container .rule {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: #888;
}

.reset-password-container .rule .icon {
  font-size: 18px;
  width: 18px;
}

/* Estilização das regras atendidas */
.reset-password-container .rule.valid {
  color: #28a745;
}

/* Estilização das regras não atendidas */
.reset-password-container .rule.invalid {
  color: #dc3545;
}

/* Botão de Atualizar Senha */
.reset-password-container .btn {
  width: 100%;
  background-color: #f2bfe4;
  color: #555;
  border: none;
  border-radius: 5px;
  padding: 10px;
  font-size: 1rem;
  cursor: pointer;
  margin-top: 15px;
}

.reset-password-container .btn:hover {
  background-color: #f3b1e2;
}
