/* ==========================================================================
   SIM, ACEITO! — ESTILOS DE AUTENTICAÇÃO E CADASTRO DE USUÁRIOS
   ========================================================================== */

/* Modal de Autenticação */
.auth-modal {
  position: fixed;
  inset: 0;
  z-index: 10001;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.auth-modal.is-open {
  opacity: 1;
  visibility: visible;
}

.auth-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(26, 25, 24, 0.78);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.auth-dialog {
  position: relative;
  z-index: 2;
  background: #ffffff;
  width: 100%;
  max-width: 450px;
  max-height: calc(100vh - 2rem);
  max-height: calc(100dvh - 2rem);
  border-radius: 20px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.28);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  margin: auto;
  transform: translateY(20px) scale(0.98);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.auth-modal.is-open .auth-dialog {
  transform: translateY(0) scale(1);
}

.auth-header {
  flex-shrink: 0;
  padding: 1.2rem 1.5rem 1rem;
  background: #faf8f5;
  border-bottom: 1px solid #ede6dc;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.auth-header__title {
  font-family: "Playfair Display", Georgia, serif;
  font-size: 1.35rem;
  color: #2b2825;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.auth-close {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: none;
  background: #ede6dc;
  color: #6e6963;
  font-size: 1.4rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
}

.auth-close:hover {
  background: #dfd7cc;
  color: #2b2825;
}

/* Abas (Tabs): Cadastrar vs Entrar */
.auth-tabs {
  flex-shrink: 0;
  display: flex;
  border-bottom: 1px solid #ede6dc;
  background: #ffffff;
}

.auth-tab {
  flex: 1;
  padding: 0.85rem 1rem;
  text-align: center;
  font-size: 0.9rem;
  font-weight: 600;
  color: #6e6963;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  transition: all 0.2s ease;
}

.auth-tab.is-active {
  color: #c5a880;
  border-bottom-color: #c5a880;
  font-weight: 700;
}

.auth-body {
  padding: 1.3rem 1.5rem 1.5rem;
  overflow-y: auto;
  flex: 1 1 auto;
  min-height: 0;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

.auth-form-group {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  margin-bottom: 0.85rem;
}

.auth-label {
  font-size: 0.85rem;
  font-weight: 700;
  color: #2b2825;
}

.auth-input {
  width: 100%;
  padding: 0.7rem 0.9rem;
  border: 1.5px solid #ede6dc;
  border-radius: 10px;
  font-size: 0.92rem;
  font-family: inherit;
  transition: border-color 0.2s;
  background: #ffffff;
  color: #2b2825;
  box-sizing: border-box;
}

.auth-input:focus {
  outline: none;
  border-color: #c5a880;
  box-shadow: 0 0 0 3px rgba(197, 168, 128, 0.15);
}

.auth-help {
  font-size: 0.78rem;
  color: #6e6963;
}

.auth-feedback {
  padding: 0.7rem 1rem;
  border-radius: 8px;
  font-size: 0.85rem;
  margin-bottom: 1rem;
  display: none;
}

.auth-feedback.is-error {
  display: block;
  background: #fff5f5;
  color: #c53030;
  border: 1px solid #feb2b2;
}

.auth-feedback.is-success {
  display: block;
  background: #f0fdf4;
  color: #15803d;
  border: 1px solid #bbf7d0;
}

.auth-btn-submit {
  width: 100%;
  padding: 0.8rem 1.2rem;
  background: linear-gradient(135deg, #c5a880 0%, #b76e79 100%);
  color: #ffffff;
  font-size: 0.95rem;
  font-weight: 700;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(197, 168, 128, 0.3);
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.auth-btn-submit:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(197, 168, 128, 0.4);
}

.auth-btn-submit:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
}

/* Usuário Logado - Perfil Dialog */
.auth-user-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: #2b2825;
}

/* Responsividade Mobile - Modal 100% Ajustado ao Viewport */
@media (max-width: 480px) {
  .auth-modal {
    padding: 0.5rem;
    align-items: center;
  }

  .auth-dialog {
    max-height: calc(100vh - 1rem);
    max-height: calc(100dvh - 1rem);
    border-radius: 18px;
    width: 100%;
    margin: auto;
  }

  .auth-header {
    padding: 0.9rem 1.1rem 0.8rem;
  }

  .auth-header__title {
    font-size: 1.15rem;
  }

  .auth-close {
    width: 30px;
    height: 30px;
    font-size: 1.25rem;
  }

  .auth-tab {
    padding: 0.75rem 0.5rem;
    font-size: 0.84rem;
  }

  .auth-body {
    padding: 1rem 1.1rem 1.2rem;
  }

  .auth-form-group {
    margin-bottom: 0.7rem;
    gap: 0.2rem;
  }

  .auth-label {
    font-size: 0.8rem;
  }

  .auth-input {
    padding: 0.58rem 0.75rem;
    font-size: 0.88rem;
    border-radius: 8px;
  }

  .auth-help {
    font-size: 0.7rem;
    line-height: 1.25;
  }

  .auth-feedback {
    padding: 0.55rem 0.8rem;
    font-size: 0.8rem;
    margin-bottom: 0.75rem;
  }

  .auth-btn-submit {
    padding: 0.72rem 1rem;
    font-size: 0.92rem;
    margin-top: 0.3rem;
    border-radius: 8px;
  }
}

