/* =========================================================
  CONTA.CSS - CONSOLIDADO (SEM CONFLITOS)
========================================================= */

/* =========================
   BASE / VARIÁVEIS
========================= */
:root {
  --orange: #FE5D03;
  --orange-dark: #e04e00;
  --text: #262118;
  --text-light: rgba(38,33,24,0.75);
  --bg: #FAEEDF;
  --white: #ffffff;
  --white-transparent: rgba(255,255,255,0.95);
}

/* =========================
   LAYOUT PRINCIPAL
========================= */
.auth-body {
  background: linear-gradient(135deg, #FAEEDF 0%, #f5e6d5 100%);
  min-height: 100vh;
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--text);
}

.auth {
  max-width: 980px;
  margin: 0 auto;
  padding: 26px 16px 40px;
}

.auth-card {
  max-width: 800px;
  margin: 0 auto;
  background: var(--white-transparent);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 32px;
  padding: 32px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.auth-header {
  text-align: center;
  margin-bottom: 24px;
}

.auth-title {
  margin: 0 0 8px;
  font-family: 'Fira Sans', system-ui, sans-serif;
  font-weight: 900;
  font-size: 32px;
  letter-spacing: -0.02em;
  color: var(--text);
}

.auth-subtitle {
  margin: 0;
  opacity: 0.75;
  font-size: 16px;
  color: var(--text);
}

/* =========================
   GOOGLE BUTTON
========================= */
.auth-btn--google {
  width: 100%;
  border-radius: 999px;
  padding: 16px 24px;
  font-family: 'DM Sans', system-ui, sans-serif;
  font-weight: 600;
  font-size: 16px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  border: 1px solid rgba(0, 0, 0, 0.12);
  background: white;
  color: #1f1f1f;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
}

.auth-btn--google i {
  font-size: 20px;
  color: #4285F4;
}

.auth-btn--google:hover {
  background: #f8f8f8;
  border-color: rgba(0, 0, 0, 0.2);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
}

/* =========================
   DIVIDER
========================= */
.auth-divider {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 24px 0;
  opacity: 0.7;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  height: 1px;
  flex: 1;
  background: rgba(0, 0, 0, 0.12);
}

.auth-divider span {
  font-size: 14px;
  color: rgba(0, 0, 0, 0.5);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* =========================
   TABS
========================= */
.auth-tabs {
  display: flex;
  gap: 12px;
  margin: 24px 0;
  flex-wrap: wrap;
}

.auth-tab {
  flex: 1;
  border-radius: 999px;
  padding: 14px 20px;
  border: 1px solid rgba(0, 0, 0, 0.1);
  background: rgba(255, 255, 255, 0.8);
  cursor: pointer;
  font-family: 'DM Sans', system-ui, sans-serif;
  font-weight: 700;
  font-size: 15px;
  color: rgba(0, 0, 0, 0.7);
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.auth-tab i {
  font-size: 18px;
}

.auth-tab:hover {
  background: white;
  border-color: rgba(254, 93, 3, 0.3);
}

.auth-tab.is-active {
  background: var(--orange);
  border-color: var(--orange);
  color: white;
  box-shadow: 0 10px 20px -5px rgba(254, 93, 3, 0.3);
}

/* =========================
   FORMS - CRÍTICO: VISIBILIDADE
========================= */
.auth-form {
  display: none !important;
}

.auth-form.is-active {
  display: block !important;
}

/* =========================
   GRID DOS FORMULÁRIOS
========================= */
.auth-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-bottom: 20px;
}

@media (max-width: 720px) {
  .auth-grid {
    grid-template-columns: 1fr;
  }
}

.auth-field.full-width {
  grid-column: 1 / -1;
}

/* =========================
   CAMPOS DO FORMULÁRIO
========================= */
.auth-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.auth-field label {
  font-size: 13px;
  font-weight: 700;
  color: rgba(0, 0, 0, 0.8);
  display: flex;
  align-items: center;
  gap: 4px;
}

.auth-field .required {
  color: var(--orange);
  font-size: 16px;
}

.auth-field input,
.auth-field select {
  width: 100%;
  padding: 12px 16px;
  border-radius: 14px;
  border: 1px solid rgba(0, 0, 0, 0.1);
  background: rgba(255, 255, 255, 0.9);
  font-size: 15px;
  transition: all 0.2s ease;
}

.auth-field input:hover,
.auth-field select:hover {
  background: white;
  border-color: rgba(254, 93, 3, 0.3);
}

.auth-field input:focus,
.auth-field select:focus {
  outline: none;
  border-color: var(--orange);
  box-shadow: 0 0 0 4px rgba(254, 93, 3, 0.15);
  background: white;
}

.auth-field input::placeholder {
  color: rgba(0, 0, 0, 0.3);
}

.auth-hint {
  font-size: 12px;
  color: rgba(0, 0, 0, 0.5);
  margin-top: 4px;
}

/* =========================
   CHECKBOX DE TERMOS
========================= */
.auth-checkbox {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin: 24px 0;
  padding: 16px;
  background: rgba(254, 93, 3, 0.03);
  border-radius: 16px;
  border: 1px solid rgba(254, 93, 3, 0.1);
}

.auth-checkbox input[type='checkbox'] {
  width: 20px;
  height: 20px;
  margin-top: 2px;
  accent-color: var(--orange);
  cursor: pointer;
}

.auth-checkbox span {
  font-size: 14px;
  line-height: 1.5;
  color: rgba(0, 0, 0, 0.75);
  flex: 1;
}

.auth-checkbox a {
  color: var(--orange);
  text-decoration: none;
  font-weight: 600;
}

.auth-checkbox a:hover {
  text-decoration: underline;
}

/* =========================
   BOTÃO PRINCIPAL
========================= */
.auth-btn {
  width: 100%;
  border-radius: 999px;
  padding: 16px 24px;
  font-family: 'DM Sans', system-ui, sans-serif;
  font-weight: 700;
  font-size: 16px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 1px solid rgba(0, 0, 0, 0.1);
  color: rgba(0, 0, 0, 0.7); ;
}

.auth-btn--primary {
  background: var(--orange);
  color: white;
  box-shadow: 0 10px 25px -5px rgba(254, 93, 3, 0.4);
}

.auth-btn--primary:hover {
  background: var(--orange-dark);
  transform: translateY(-2px);
  box-shadow: 0 15px 30px -5px rgba(254, 93, 3, 0.5);
}

.auth-btn--primary:active {
  transform: translateY(0);
}

/* =========================
   RODAPÉ DO FORMULÁRIO
========================= */
.auth-footer {
  margin: 24px 0 0;
  font-size: 14px;
  color: rgba(0, 0, 0, 0.6);
  text-align: center;
}

.auth-footer a {
  color: var(--orange);
  text-decoration: none;
  font-weight: 700;
  margin-left: 4px;
}

.auth-footer a:hover {
  text-decoration: underline;
}

/* =========================
   ALERTAS
========================= */
.auth-alert {
  margin-top: 20px;
  padding: 14px 18px;
  border-radius: 16px;
  font-size: 14px;
  font-weight: 500;
  animation: slideIn 0.3s ease;
}

.auth-alert--info {
  background: rgba(0, 102, 204, 0.1);
  color: #0066cc;
  border: 1px solid rgba(0, 102, 204, 0.2);
}

.auth-alert--success {
  background: rgba(46, 125, 50, 0.1);
  color: #2e7d32;
  border: 1px solid rgba(46, 125, 50, 0.2);
}

.auth-alert--error {
  background: rgba(211, 47, 47, 0.1);
  color: #d32f2f;
  border: 1px solid rgba(211, 47, 47, 0.2);
}

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

/* =========================
   ESPECÍFICO DO FORMULÁRIO PF (menos campos)
========================= */
#formPF .auth-grid {
  grid-template-columns: 1fr;
  max-width: 400px;
  margin-left: auto;
  margin-right: auto;
}

@media (min-width: 720px) {
  #formPF .auth-grid {
    grid-template-columns: 1fr 1fr;
  }

  #formPF .auth-field:first-child,
  #formPF .auth-field:nth-child(2) {
    grid-column: 1 / -1;
  }
}

/* =========================
   HEADER DROPDOWN (já existente)
========================= */
.header-dropdown .dropdown-item {
  transition: background-color 0.15s ease, color 0.15s ease;
}

.header-dropdown .dropdown-item:hover,
.header-dropdown .dropdown-item:focus-visible {
  background-color: #faeedf;
  color: #002ed6;
}

.header-dropdown button.dropdown-item {
  background: none;
  border: none;
  width: 100%;
  text-align: left;
}

/* =========================
   RESPONSIVO
========================= */
@media (max-width: 480px) {
  .auth-card {
    padding: 24px 16px;
  }

  .auth-tab {
    font-size: 14px;
    padding: 12px 16px;
  }

  .auth-tab i {
    font-size: 16px;
  }
}

/* Force PJ form to show when active */
body #formPJ.auth-form.is-active {
  display: block !important;
}

/* =========================================================
   GOOGLE PLACES - FORÇAR VISIBILIDADE
========================================================= */

/* Força o container a ter tamanho */
.auth-field.full-width {
  min-height: 70px !important;
  height: auto !important;
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
}

/* Remove qualquer conteúdo anterior e garante que o novo elemento apareça */
.auth-field.full-width:empty {
  display: none !important;
}

/* Estilo ultra-específico para o elemento de autocomplete */
html body main .auth .auth-card .auth-form#formPJ .auth-grid .auth-field.full-width gmp-place-autocomplete {
  display: block !important;
  width: 100% !important;
  min-width: 300px !important;
  height: 52px !important;
  min-height: 52px !important;
  background-color: white !important;
  border: 2px solid red !important; /* Borda vermelha para teste */
  border-radius: 14px !important;
  visibility: visible !important;
  opacity: 1 !important;
  position: relative !important;
  z-index: 9999 !important;
}

/* Estilo para o input interno */
html body main .auth .auth-card .auth-form#formPJ .auth-grid .auth-field.full-width gmp-place-autocomplete::part(input) {
  display: block !important;
  width: 100% !important;
  height: 52px !important;
  padding: 0 16px !important;
  border: none !important;
  background: transparent !important;
  font-size: 16px !important;
  line-height: 52px !important;
  color: #333 !important;
  visibility: visible !important;
  opacity: 1 !important;
}

/* Garante que o dropdown apareça */
gmp-place-autocomplete::part(suggestions) {
  display: block !important;
  background: white !important;
  border: 1px solid #ccc !important;
  border-radius: 8px !important;
  box-shadow: 0 4px 20px rgba(0,0,0,0.2) !important;
  z-index: 10000 !important;
}

.pac-container, [class*="place-autocomplete-suggestions"] {
  z-index: 10000 !important;
}

