/* Original Oddity auth-gate form state + layout corrections. Version: v009
   Owns state visibility, modal fit, spacing, compact verification, and legal presentation. */

.oddity-auth-gate-root [hidden] {
  display: none !important;
}

.oddity-auth-gate-root .oddity-auth-gate-field:has([data-auth-gate-confirm-password]) {
  display: none !important;
}

.oddity-auth-gate-root,
.oddity-auth-gate-root *,
.oddity-auth-gate-root *::before,
.oddity-auth-gate-root *::after {
  box-sizing: border-box;
}

.oddity-auth-gate-root {
  width: 100%;
  max-width: 100vw;
  overflow: hidden;
  overscroll-behavior: none;
  touch-action: pan-y;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.oddity-auth-gate-dialog {
  width: min(500px, calc(100vw - 28px));
  max-width: calc(100vw - 28px);
  max-height: calc(100svh - 28px);
  overflow: hidden !important;
  overscroll-behavior: none;
}

.oddity-auth-gate-close {
  top: 12px;
  right: 12px;
  width: 32px;
  height: 32px;
  z-index: 3;
}

.oddity-auth-gate-content {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  padding: 54px 26px 24px;
}

.oddity-auth-gate-form-mount,
.oddity-auth-gate-form,
[data-auth-gate-main-view],
.oddity-auth-gate-email-form,
.oddity-auth-gate-secondary-view,
.oddity-auth-gate-secondary-view form,
.oddity-auth-gate-field,
.oddity-auth-gate-password-wrap,
.oddity-auth-gate-options,
.oddity-auth-gate-verification-actions,
.oddity-auth-gate-legal-view {
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

.oddity-auth-gate-field input,
.oddity-auth-gate-password-wrap input,
.oddity-auth-gate-google,
.oddity-auth-gate-submit,
.oddity-auth-gate-tabs {
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

[data-auth-gate-main-view] {
  display: grid;
  gap: 10px;
}

.oddity-auth-gate-tabs {
  margin: 0;
}

.oddity-auth-gate-tab {
  min-height: 36px;
}

.oddity-auth-gate-google {
  min-height: 40px;
  margin: 0;
}

.oddity-auth-gate-divider {
  margin: -1px 0 0;
  gap: 9px;
  font-size: 10px;
}

.oddity-auth-gate-email-form {
  gap: 10px;
}

.oddity-auth-gate-field {
  gap: 5px;
}

.oddity-auth-gate-field > span:first-child {
  font-weight: 650;
}

.oddity-auth-gate-field input {
  min-height: 39px;
  padding-top: 8px;
  padding-bottom: 8px;
}

.oddity-auth-gate-password-toggle {
  padding: 5px 8px;
}

.oddity-auth-gate-forgot-row {
  margin-top: -2px;
}

.oddity-auth-gate-options {
  gap: 7px;
  margin-top: 0;
  padding: 8px 10px;
}

.oddity-auth-gate-check {
  gap: 7px;
  font-size: 10.5px;
  line-height: 1.35;
}

.oddity-auth-gate-submit {
  min-height: 40px;
  margin-top: 1px;
}

.oddity-auth-gate-form-message,
.oddity-auth-gate-verification-message {
  min-height: 0;
}

.oddity-auth-gate-form-message:empty,
.oddity-auth-gate-verification-message:empty {
  display: none;
}

.oddity-auth-gate-secondary-view {
  display: grid;
  gap: 14px;
}

.oddity-auth-gate-secondary-view form {
  display: grid;
  gap: 11px;
}

.oddity-auth-gate-secondary-view > h3,
.oddity-auth-gate-legal-heading h3 {
  margin: 0;
  padding-right: 42px;
  font-size: 25px;
  font-weight: 720;
  line-height: 1.15;
  letter-spacing: -.022em;
}

.oddity-auth-gate-secondary-view > p,
.oddity-auth-gate-legal-heading p {
  max-width: 390px;
  margin: 0;
  font-size: 13px;
  line-height: 1.45;
}

/* Compact modal-specific strength indicator. */
.oddity-auth-gate-strength {
  display: grid;
  gap: 5px;
  width: 100%;
  margin-top: -2px;
  padding: 2px 0 1px;
}

.oddity-auth-gate-strength-bars {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 4px;
}

.oddity-auth-gate-strength-bars > span {
  height: 4px;
  border-radius: 999px;
  background: rgba(255,255,255,.14);
}

.oddity-auth-gate-strength[data-level="weak"] .oddity-auth-gate-strength-bars > span.is-active { background: #ff8585; }
.oddity-auth-gate-strength[data-level="fair"] .oddity-auth-gate-strength-bars > span.is-active { background: #f28a1f; }
.oddity-auth-gate-strength[data-level="good"] .oddity-auth-gate-strength-bars > span.is-active { background: #f3c35b; }
.oddity-auth-gate-strength[data-level="strong"] .oddity-auth-gate-strength-bars > span.is-active { background: #8ee6ad; }

.oddity-auth-gate-strength-meta {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: rgba(255,255,255,.52);
  font-size: 10px;
  line-height: 1.2;
}

.oddity-auth-gate-strength-meta [data-auth-gate-strength-label] {
  color: rgba(255,255,255,.82);
  font-weight: 700;
}

/* Compact verification experience. */
.oddity-auth-gate-form[data-mode="verification"] {
  min-height: 0;
}

.oddity-auth-gate-verification-compact {
  display: grid;
  justify-items: center;
  gap: 14px;
  text-align: center;
}

.oddity-auth-gate-verify-mark {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(242,138,31,.32);
  border-radius: 50%;
  background: radial-gradient(circle at 50% 40%, rgba(242,138,31,.11), rgba(242,138,31,.035) 62%, transparent 63%);
  box-shadow: 0 0 26px rgba(242,138,31,.08);
  color: #f5a23b;
}

.oddity-auth-gate-verify-mark svg,
.oddity-auth-gate-email-pill-icon svg {
  width: 26px;
  height: 26px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.oddity-auth-gate-verify-mark.is-verified,
.oddity-auth-gate-email-pill-icon.is-verified {
  color: #8ee6ad;
}

.oddity-auth-gate-verification-compact > h3,
.oddity-auth-gate-verify-heading h3 {
  margin: 0;
  padding: 0;
  font-size: 28px;
  font-weight: 760;
  line-height: 1.08;
  letter-spacing: -.028em;
}

.oddity-auth-gate-verify-support {
  margin: -4px 0 0;
  color: rgba(255,255,255,.68);
  font-size: 13px;
  line-height: 1.4;
}

.oddity-auth-gate-email-pill {
  width: min(390px, 100%);
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 10px 14px;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 999px;
  background: rgba(255,255,255,.045);
  color: #fff;
  font-size: 14px;
  font-weight: 720;
  overflow-wrap: anywhere;
}

.oddity-auth-gate-email-pill-icon {
  width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  color: rgba(255,255,255,.76);
}

.oddity-auth-gate-email-pill-icon svg {
  width: 18px;
  height: 18px;
}

.oddity-auth-gate-verify-instruction {
  max-width: 370px;
  margin: 0;
  color: rgba(255,255,255,.68);
  font-size: 13px;
  line-height: 1.45;
}

.oddity-auth-gate-verification-compact .oddity-auth-gate-verification-message {
  max-width: 380px;
  margin: -4px 0 0;
}

.oddity-auth-gate-verify-primary {
  width: 100%;
  min-height: 48px;
  margin-top: 2px;
  font-size: 15px;
}

.oddity-auth-gate-verify-secondary {
  width: 100%;
  display: grid;
  grid-template-columns: 1fr 1px 1fr;
  align-items: center;
  gap: 16px;
  margin-top: 2px;
}

.oddity-auth-gate-verify-secondary .oddity-auth-gate-text-button {
  justify-self: center;
  color: #f28a1f;
  font-size: 12px;
  font-weight: 750;
}

.oddity-auth-gate-verify-divider {
  width: 1px;
  height: 18px;
  background: rgba(255,255,255,.12);
}

/* Verified continuation uses only verified identity + password + Continue. */
.oddity-auth-gate-form-mount.is-email-verified-continuation [data-auth-gate-main-view] {
  gap: 16px;
}

.oddity-auth-gate-form-mount.is-email-verified-continuation .oddity-auth-gate-tabs,
.oddity-auth-gate-form-mount.is-email-verified-continuation .oddity-auth-gate-google,
.oddity-auth-gate-form-mount.is-email-verified-continuation .oddity-auth-gate-divider,
.oddity-auth-gate-form-mount.is-email-verified-continuation .oddity-auth-gate-field:has([data-auth-gate-email]),
.oddity-auth-gate-form-mount.is-email-verified-continuation .oddity-auth-gate-forgot-row {
  display: none !important;
}

.oddity-auth-gate-verified-header {
  display: grid;
  justify-items: center;
  gap: 12px;
  text-align: center;
}

.oddity-auth-gate-verified-header .oddity-auth-gate-email-pill {
  margin-bottom: 0;
}

.oddity-auth-gate-verified-guidance {
  margin: 2px 0 4px;
  color: rgba(255,255,255,.64);
  font-size: 13px;
  line-height: 1.4;
}

.oddity-auth-gate-form-mount.is-email-verified-continuation .oddity-auth-gate-email-form {
  gap: 14px;
}

.oddity-auth-gate-form-mount.is-email-verified-continuation .oddity-auth-gate-field:has([data-auth-gate-password]) {
  margin-top: 2px;
}

.oddity-auth-gate-form-mount.is-email-verified-continuation .oddity-auth-gate-submit {
  min-height: 46px;
}

.oddity-auth-gate-form-mount.is-email-verified-continuation .oddity-auth-gate-form-message {
  display: block;
  margin-top: -4px;
  text-align: center;
}

.oddity-auth-gate-form-mount.is-email-verified-continuation .oddity-auth-gate-form-message:empty {
  display: none;
}

.oddity-auth-gate-form-mount.is-email-verified-loading .oddity-auth-gate-submit {
  cursor: wait;
}

.oddity-auth-gate-form-mount.is-email-verified-loading .oddity-auth-gate-submit::before {
  content: "";
  width: 14px;
  height: 14px;
  display: inline-block;
  margin-right: 8px;
  border: 2px solid rgba(0,0,0,.28);
  border-top-color: #000;
  border-radius: 50%;
  vertical-align: -2px;
  animation: oddity-auth-gate-spin .7s linear infinite;
}

@keyframes oddity-auth-gate-spin {
  to { transform: rotate(360deg); }
}

/* Legal documents use the same information hierarchy as the full legal page,
   scaled to the auth modal. Reading the document is optional; only this inner
   document region scrolls. */
.oddity-auth-gate-legal-view {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 12px;
  height: min(650px, calc(100svh - 108px));
  min-height: 360px;
}

.oddity-auth-gate-legal-heading {
  display: grid;
  justify-items: start;
  gap: 6px;
  width: 100%;
}

.oddity-auth-gate-legal-heading [data-auth-gate-legal-back] {
  justify-self: start !important;
  margin: 0 0 3px !important;
  text-align: left !important;
}

.oddity-auth-gate-legal-heading h3 { width: 100%; }

.oddity-auth-gate-legal-body {
  width: 100%;
  min-height: 0;
  max-height: none;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  padding: 16px;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 14px;
  background: #0a0a0a;
  scrollbar-gutter: stable;
}

.oddity-auth-gate-legal-markdown {
  color: rgba(247,247,251,.82);
  font-size: 13px;
  line-height: 1.62;
}

.oddity-auth-gate-legal-markdown > :first-child { margin-top: 0 !important; }
.oddity-auth-gate-legal-markdown h2,
.oddity-auth-gate-legal-markdown h3,
.oddity-auth-gate-legal-markdown h4,
.oddity-auth-gate-legal-markdown h5,
.oddity-auth-gate-legal-markdown h6 {
  color: #fff;
  line-height: 1.2;
  letter-spacing: -.02em;
}
.oddity-auth-gate-legal-markdown h2 {
  margin: 30px 0 12px;
  padding-top: 14px;
  border-top: 1px solid rgba(242,138,31,.28);
  font-size: 22px;
}
.oddity-auth-gate-legal-markdown h3 { margin: 24px 0 10px; font-size: 18px; }
.oddity-auth-gate-legal-markdown h4,
.oddity-auth-gate-legal-markdown h5,
.oddity-auth-gate-legal-markdown h6 { margin: 20px 0 8px; font-size: 15px; }
.oddity-auth-gate-legal-markdown p { margin: 0 0 14px; }
.oddity-auth-gate-legal-markdown strong { color: #fff; font-weight: 800; }
.oddity-auth-gate-legal-markdown em { color: rgba(255,255,255,.76); }
.oddity-auth-gate-legal-markdown a {
  color: #fff;
  text-decoration-color: #f28a1f;
  text-underline-offset: 3px;
  overflow-wrap: anywhere;
}
.oddity-auth-gate-legal-markdown a:hover { color: #ff9b37; }
.oddity-auth-gate-legal-markdown ul,
.oddity-auth-gate-legal-markdown ol { margin: 0 0 16px; padding-left: 22px; }
.oddity-auth-gate-legal-markdown li { margin: 6px 0; }
.oddity-auth-gate-legal-markdown li::marker { color: #f28a1f; }
.oddity-auth-gate-legal-markdown blockquote {
  margin: 18px 0;
  padding: 3px 0 3px 14px;
  border-left: 2px solid #f28a1f;
  color: rgba(255,255,255,.68);
}
.oddity-auth-gate-legal-markdown code {
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 5px;
  background: rgba(255,255,255,.055);
  padding: 2px 4px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: .9em;
}
.oddity-auth-gate-legal-markdown pre {
  max-width: 100%;
  overflow: auto;
  margin: 16px 0;
  padding: 12px;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 10px;
  background: #08090c;
}
.oddity-auth-gate-legal-markdown pre code { border: 0; background: transparent; padding: 0; }
.oddity-auth-gate-legal-markdown hr { margin: 26px 0; border: 0; border-top: 1px solid rgba(242,138,31,.28); }
.oddity-auth-gate-legal-view [data-auth-gate-legal-full] { justify-self: start; }

html.oddity-auth-gate-open,
html.oddity-auth-gate-open body {
  width: 100% !important;
  max-width: 100vw !important;
  overflow: hidden !important;
  overscroll-behavior: none;
}

@media (max-width: 520px) {
  .oddity-auth-gate-dialog {
    width: calc(100vw - 20px);
    max-width: calc(100vw - 20px);
    max-height: calc(100svh - 20px);
  }

  .oddity-auth-gate-content { padding: 52px 16px 20px; }
  .oddity-auth-gate-legal-view { height: calc(100svh - 92px); }
  .oddity-auth-gate-legal-body { padding: 13px; }
  .oddity-auth-gate-verify-secondary { gap: 10px; }
  .oddity-auth-gate-email-pill { font-size: 12.5px; }
}
