/**
 * Melhorias responsivas e correções visuais para a página de login minimalista
 * Foco em dispositivos móveis e refinamento de espaçamentos
 */

/* Ajustes gerais e variáveis */
:root {
  --primary-color: #2c578a;
  --text-color: #ffffff;
}

/* Melhorias para dispositivos móveis */
@media (max-width: 992px) {
  .main-card {
    flex-direction: column;
    height: auto;
    max-height: 90vh;
    overflow-y: auto;
    margin: 5vh auto;
  }
  
  .content-side {
    padding: 30px;
    min-height: 300px;
  }
  
  .form-side {
    width: 100%;
    padding: 30px;
  }
  
  .brand-subtitle {
    max-width: 100%;
    font-size: 1rem;
  }
  
  .metrics-container {
    flex-wrap: wrap;
    gap: 15px;
  }
  
  .metric-item {
    min-width: 100px;
    padding: 15px;
  }
}

/* Ajustes específicos para smartphones */
@media (max-width: 576px) {
  body, html {
    overflow-y: auto;
  }
  
  .login-container {
    height: auto;
    min-height: 100vh;
  }
  
  .main-card {
    width: 100%;
    height: auto;
    min-height: 100vh;
    border-radius: 0;
    margin: 0;
    box-shadow: none;
  }
  
  .content-side {
    padding: 25px 20px;
    min-height: 250px;
  }
  
  .form-side {
    padding: 25px 20px;
  }
  
  .brand-title {
    font-size: 2.2rem;
    margin-bottom: 15px;
  }
  
  .brand-subtitle {
    font-size: 0.95rem;
  }
  
  .form-title {
    font-size: 1.6rem;
  }
  
  .form-subtitle {
    font-size: 0.85rem;
  }
  
  .form-group {
    margin-bottom: 20px;
  }
  
  .form-control {
    height: 45px;
  }
  
  .btn {
    height: 45px;
  }
  
  .social-buttons {
    flex-direction: column;
    gap: 10px;
  }
  
  .tabs-container {
    margin-bottom: 20px;
  }
  
  .tab {
    padding: 10px 15px;
    font-size: 0.9rem;
  }
  
  .footer {
    padding: 15px;
    flex-direction: column;
    gap: 10px;
  }
  
  .footer-links {
    flex-wrap: wrap;
    justify-content: center;
  }
}

/* Correções de espaçamento e bugs visuais */
.form-group label {
  margin-bottom: 6px;
}

.form-options {
  flex-wrap: wrap;
  gap: 10px;
}

.form-check {
  margin-bottom: 10px;
}

.password-field {
  display: flex;
  align-items: center;
}

.password-toggle {
  height: 100%;
  padding: 0 15px;
  display: flex;
  align-items: center;
  color: var(--primary-color);
}

/* Melhorias de contraste e legibilidade */
.form-title, .form-subtitle {
  color: var(--primary-color);
}

.form-control {
  background-color: rgba(44, 87, 138, 0.85);
  color: var(--text-color);
  border: 1px solid rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
}

.form-control::placeholder {
  color: rgba(255, 255, 255, 0.6);
}

.form-control:focus {
  border-color: var(--text-color);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.2);
}

.form-group label {
  color: var(--primary-color);
  font-weight: 600;
}

/* Animação suave para transição entre formulários */
.form {
  transition: opacity 0.3s ease, transform 0.3s ease;
  position: absolute;
  width: 100%;
  opacity: 0;
  transform: translateX(20px);
  pointer-events: none;
  display: none;
  max-height: 0;
  overflow: hidden;
}

.form.active {
  opacity: 1;
  transform: translateX(0);
  position: relative;
  pointer-events: all;
  display: block;
  max-height: none;
  overflow: visible;
}

/* Ajuste para o container dos formulários */
.form-side {
  position: relative;
  overflow-y: auto;
  max-height: 85vh;
}

/* Ajustes para formulário de cadastro */
#registerForm {
  padding-top: 0;
  margin-top: 0;
}

/* Garantir que o conteúdo possa ser rolado em dispositivos móveis */
@media (max-width: 576px) {
  .form-side {
    max-height: 80vh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  .main-card {
    overflow-y: auto;
    max-height: 90vh;
  }
  
  .login-container {
    overflow-y: auto;
  }
}

/* Melhorias nos botões e interações */
.btn-primary {
  background: var(--primary-color);
  border: 1px solid transparent;
  transition: all 0.3s ease;
}

.btn-primary:hover {
  background: transparent;
  color: var(--primary-color);
  border-color: var(--primary-color);
}

.social-btn {
  color: var(--primary-color);
  border: 1px solid var(--primary-color);
}

.social-btn:hover {
  background: rgba(44, 87, 138, 0.1);
}

/* Ajustes para o modal de recuperação de senha */
#forgotPasswordModal .modal-content {
  max-width: 90%;
  width: 400px;
  border-radius: var(--card-radius);
}

@media (max-width: 576px) {
  #forgotPasswordModal .modal-content {
    width: 90%;
    padding: 20px;
  }
}

/* Ajustes de acessibilidade */
.form-control:focus,
.btn:focus,
.form-check-input:focus,
.password-toggle:focus {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}

/* Correção para o seletor de país */
.country-selector-container {
  margin-bottom: 20px;
}

.country-select {
  background-color: var(--primary-color);
  color: var(--text-color);
  border: 1px solid rgba(255, 255, 255, 0.2);
  height: 50px;
  border-radius: var(--input-radius);
}

@media (max-width: 576px) {
  .country-select {
    height: 45px;
  }
}
