/**
 * Pagou UI overrides — AUTH pages only (html.pagou-auth)
 * Never applied to dashboard shell/header.
 */

/* ---- Login: hide legal/footer extras ---- */
html.pagou-auth #footer,
html.pagou-auth #tc-text,
html.pagou-auth [data-testid="footer"],
html.pagou-auth [data-testid="tc-text"] {
  display: none !important;
}
html.pagou-auth div:has(> #footer),
html.pagou-auth div:has(> #tc-text) {
  display: none !important;
}

/* ---- Remove public signup line ---- */
html.pagou-auth #card-subtitle,
html.pagou-auth [data-testid="card-subtitle"],
html.pagou-auth .flex.text-sm.items-center.gap-2:has(#card-subtitle) {
  display: none !important;
}

/* ---- Center login modal ---- */
html.pagou-auth,
html.pagou-auth body {
  height: 100% !important;
  min-height: 100dvh !important;
  margin: 0 !important;
  overflow-x: hidden !important;
}
html.pagou-auth body #app,
html.pagou-auth body > div {
  min-height: 100dvh !important;
}
html.pagou-auth .h-full.flex.flex-col.items-center.justify-between {
  justify-content: center !important;
  min-height: 100dvh !important;
  height: 100dvh !important;
  width: 100% !important;
  max-width: 100% !important;
  padding: 1rem !important;
  box-sizing: border-box !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
}
html.pagou-auth .flex.flex-col.items-center.gap-6.flex-1 {
  flex: 0 1 auto !important;
  margin-top: 0 !important;
  margin-bottom: 0 !important;
  width: 100% !important;
  max-width: 30rem !important;
  padding: 0 !important;
}
html.pagou-auth .w-96 {
  width: 100% !important;
  max-width: 24rem !important;
}
html.pagou-auth [class*="w-30-rem"] {
  width: 100% !important;
  max-width: 30rem !important;
}
html.pagou-auth .bg-white.w-full.text-black {
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
  margin-left: auto !important;
  margin-right: auto !important;
  overflow: hidden !important;
}

/* Logo centered on login card only */
html.pagou-auth .bg-white .px-7.py-6 {
  display: flex !important;
  justify-content: center !important;
  align-items: center !important;
  text-align: center !important;
  width: 100% !important;
  box-sizing: border-box !important;
  padding: 1.5rem 1.5rem 1.25rem !important;
}
html.pagou-auth .bg-white .px-7.py-6 > * {
  display: flex !important;
  justify-content: center !important;
  align-items: center !important;
  width: 100% !important;
  margin-left: auto !important;
  margin-right: auto !important;
}
html.pagou-auth img[src*="pagou-logo"] {
  height: 2.75rem !important;
  width: auto !important;
  max-width: min(220px, 72vw) !important;
  object-fit: contain !important;
  display: block !important;
  margin-left: auto !important;
  margin-right: auto !important;
}

html.pagou-auth .bg-white .p-7 {
  padding: 1.5rem 1.75rem 1.75rem !important;
  gap: 1.25rem !important;
  box-sizing: border-box !important;
}
html.pagou-auth form {
  gap: 1.15rem !important;
}
html.pagou-auth #card-header {
  text-align: left !important;
  margin-bottom: 0.25rem !important;
}
html.pagou-auth .gap-2.h-fit.mb-7 {
  margin-bottom: 0.75rem !important;
  gap: 0.35rem !important;
}

/* Continue button contrast (login only) */
html.pagou-auth #auth-submit-btn button:not(.hidden),
html.pagou-auth #auth-submit-btn .bg-button-primary-bg,
html.pagou-auth #auth-submit-btn .primary-gradient-button {
  background-color: #0b5fff !important;
  background-image: none !important;
  color: #ffffff !important;
  border-color: transparent !important;
  font-weight: 600 !important;
  opacity: 1 !important;
  min-height: 2.75rem !important;
  box-shadow: 0 2px 10px rgba(11, 95, 255, 0.4) !important;
}
html.pagou-auth #auth-submit-btn button:not(.hidden):hover {
  background-color: #0847d6 !important;
}
html.pagou-auth #auth-submit-btn button:not(.hidden) * {
  color: #ffffff !important;
  font-weight: 600 !important;
}

/* ---- 2FA mobile (only while skip-now exists; still under pagou-auth) ---- */
html.pagou-auth body:has([data-testid="skip-now"]) .w-200,
html.pagou-auth body:has([data-testid="skip-now"]) .w-133 {
  width: min(100%, 36rem) !important;
  max-width: calc(100vw - 1.25rem) !important;
  height: auto !important;
  max-height: calc(100dvh - 1.25rem) !important;
  overflow-y: auto !important;
  margin: 0.5rem auto !important;
  box-sizing: border-box !important;
}
html.pagou-auth body:has([data-testid="skip-now"]) .h-40-rem,
html.pagou-auth body:has([data-testid="skip-now"]) .h-20-rem {
  height: auto !important;
}

@media (max-width: 640px) {
  html.pagou-auth {
    /* login padding */
  }
  html.pagou-auth .h-full.flex.flex-col.items-center.justify-between {
    padding: 0.75rem !important;
  }
  html.pagou-auth .bg-white .px-7.py-6 {
    padding: 1.25rem 1.15rem 1rem !important;
  }
  html.pagou-auth .bg-white .p-7 {
    padding: 1.15rem !important;
  }
  html.pagou-auth img[src*="pagou-logo"] {
    height: 2.5rem !important;
    max-width: min(200px, 75vw) !important;
  }
  html.pagou-auth body:has([data-testid="skip-now"]) .grid.grid-cols-2 {
    grid-template-columns: 1fr !important;
  }
  html.pagou-auth body:has([data-testid="skip-now"]) .px-8,
  html.pagou-auth body:has([data-testid="skip-now"]) .px-12 {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  html.pagou-auth body:has([data-testid="skip-now"]) .w-16.h-16 {
    width: 2.35rem !important;
    height: 2.35rem !important;
    min-width: 2.35rem !important;
  }
  html.pagou-auth body:has([data-testid="skip-now"]) .flex.justify-center.relative {
    gap: 0.25rem !important;
    width: 100% !important;
    max-width: 100% !important;
  }
  html.pagou-auth body:has([data-testid="skip-now"]) .flex.justify-end.gap-4 {
    flex-wrap: wrap !important;
    justify-content: center !important;
  }
}

/* Dashboard: ensure logo in sidebar/header is not mangled */
/* (no rules — intentionally empty outside html.pagou-auth) */
