.free-signup {
  max-width: 28rem;
}

/* No animated purple frame on free signup. */
body.brand-auth .auth-container.free-signup,
body.brand-auth main.free-signup.auth-container {
  border: 0 !important;
  box-shadow: none !important;
  background: transparent !important;
  padding: 0 !important;
}

body.brand-auth .auth-container.free-signup::before,
body.brand-auth main.free-signup.auth-container::before {
  content: none !important;
  display: none !important;
  animation: none !important;
}

.free-signup-providers {
  display: grid;
  gap: 0.65rem;
  width: 100%;
}

/* Social buttons: light card = white; dark mode = dark surface + light text. */
.free-signup .free-signup-provider,
.free-signup a.free-signup-provider,
.free-signup a.btn.free-signup-provider,
body.brand-auth .free-signup-provider,
body.brand-auth .free-signup a.free-signup-provider {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 0.7rem;
  width: 100%;
  min-height: 2.75rem;
  padding: 0.65rem 1rem;
  border-radius: 0.7rem;
  background: #ffffff !important;
  color: #1f1f1f !important;
  border: 1px solid rgba(15, 23, 42, 0.16) !important;
  box-shadow: none !important;
  font-weight: 600;
  text-align: center !important;
  text-decoration: none;
  background-image: none !important;
}

.free-signup .free-signup-provider:hover,
.free-signup .free-signup-provider:focus-visible,
body.brand-auth .free-signup-provider:hover,
body.brand-auth .free-signup-provider:focus-visible {
  background: #f8fafc !important;
  color: #0f172a !important;
}

html[data-theme="dark"] body.brand-auth .free-signup .free-signup-provider,
html[data-theme="dark"] body.brand-auth .free-signup a.free-signup-provider,
html:not([data-theme="light"]) body.brand-auth:not(.light-theme) .free-signup .free-signup-provider,
html:not([data-theme="light"]) body.brand-auth:not(.light-theme) .free-signup a.free-signup-provider {
  background: #18181b !important;
  color: #fafafa !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
}

html[data-theme="dark"] body.brand-auth .free-signup .free-signup-provider:hover,
html[data-theme="dark"] body.brand-auth .free-signup .free-signup-provider:focus-visible,
html:not([data-theme="light"]) body.brand-auth:not(.light-theme) .free-signup .free-signup-provider:hover,
html:not([data-theme="light"]) body.brand-auth:not(.light-theme) .free-signup .free-signup-provider:focus-visible {
  background: #27272a !important;
  color: #ffffff !important;
}

.free-signup-provider__logo {
  width: 1.15rem;
  height: 1.15rem;
  flex: 0 0 auto;
}

.free-signup .btn-primary,
.free-signup-email-btn,
.free-signup .lai-otp-email-form .btn-primary,
.free-signup button[type="submit"].btn-primary {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-height: 2.75rem;
  width: 100%;
  text-align: center !important;
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff;
}

/* Light theme: readable labels/links; correct logo; no inverted white logo. */
html[data-theme="light"] body.brand-auth .free-signup .form-label,
html.light-theme body.brand-auth .free-signup .form-label,
body.brand-auth.light-theme .free-signup .form-label,
html[data-theme="light"] body.brand-auth .free-signup .auth-links a,
html.light-theme body.brand-auth .free-signup .auth-links a,
body.brand-auth.light-theme .free-signup .auth-links a {
  color: #334155 !important;
}

html[data-theme="light"] body.brand-auth .free-signup .logo img,
html.light-theme body.brand-auth .free-signup .logo img,
body.brand-auth.light-theme .free-signup .logo img {
  filter: none !important;
}

html[data-theme="light"] body.brand-auth .free-signup .auth-title,
html.light-theme body.brand-auth .free-signup .auth-title,
body.brand-auth.light-theme .free-signup .auth-title {
  color: #0f172a !important;
}

html[data-theme="light"] body.brand-auth .free-signup .auth-subtitle,
html.light-theme body.brand-auth .free-signup .auth-subtitle,
body.brand-auth.light-theme .free-signup .auth-subtitle {
  color: #64748b !important;
}

html[data-theme="light"] body.brand-auth .free-signup .form-control,
html.light-theme body.brand-auth .free-signup .form-control,
body.brand-auth.light-theme .free-signup .form-control {
  background: #ffffff !important;
  color: #0f172a !important;
  border-color: rgba(15, 23, 42, 0.16) !important;
}

@media (max-width: 390px) {
  .free-signup {
    padding-inline: 1rem;
  }

  .free-signup .form-row {
    flex-direction: column;
  }
}


.free-signup .visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.free-signup .lai-otp-email-form .form-control,
.free-signup .lai-otp-email-form input[type="email"],
.free-signup input[type="email"][data-lai-otp-email-input] {
  border-radius: 999px !important;
  min-height: 2.85rem;
  padding: 0.75rem 2.75rem 0.75rem 1.5rem !important;
  padding-left: 1.5rem !important;
  box-sizing: border-box !important;
  border: 0 !important;
  box-shadow: none !important;
  outline: none;
}

.free-signup .lai-otp-email-form .form-control:focus,
.free-signup .lai-otp-email-form input[type="email"]:focus,
.free-signup input[type="email"][data-lai-otp-email-input]:focus {
  border: 0 !important;
  box-shadow: 0 0 0 2px rgba(167, 139, 250, 0.45) !important;
}

.free-signup .lai-otp-email-form .btn-primary {
  border-radius: 999px;
  text-align: center !important;
}

/* OTP helper links — brand light purple */
.free-signup .lai-otp-link,
.free-signup .lai-otp-code-actions .lai-otp-link {
  color: #a78bfa !important;
  font-size: 0.78rem;
  font-weight: 600;
  text-decoration: none !important;
}

.free-signup .lai-otp-link:hover,
.free-signup .lai-otp-code-actions .lai-otp-link:hover {
  color: #c4b5fd !important;
  text-decoration: none !important;
}
.free-signup .lai-otp-status a,
.free-signup .lai-otp-signin-link {
  color: inherit;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.free-signup {
  display: flex;
  flex-direction: column;
  align-items: stretch;
}

.free-signup .free-signup-email-btn[hidden],
.free-signup [data-lai-otp-email-btn][hidden],
.free-signup [data-lai-otp-email-panel][hidden],
.free-signup [data-lai-otp-code-panel][hidden],
.free-signup [data-lai-otp-providers][hidden],
.free-signup [data-lai-otp-or][hidden],
.free-signup [data-lai-otp-footer][hidden] {
  display: none !important;
}

/* Code step: title → instruction → digits → or → social */
.free-signup[data-otp-step="code"] .logo { order: 0; }
.free-signup[data-otp-step="code"] [data-lai-otp-title] { order: 1; }
.free-signup[data-otp-step="code"] [data-lai-otp-subtitle] { order: 2; }
.free-signup[data-otp-step="code"] [data-lai-otp-status] { order: 3; }
.free-signup[data-otp-step="code"] [data-lai-otp-code-panel] { order: 4; display: block; }
.free-signup[data-otp-step="code"] [data-lai-otp-or] { order: 5; margin-top: 0.75rem; }
.free-signup[data-otp-step="code"] [data-lai-otp-providers] { order: 6; }
.free-signup[data-otp-step="code"] [data-lai-otp-email-panel],
.free-signup[data-otp-step="code"] [data-lai-otp-footer],
.free-signup[data-otp-step="code"] .auth-theme {
  display: none !important;
}
