/* Clerk SignIn widget — plain-CSS port of the React landing appearance config.
   The SPA passes Tailwind/typo classes to Clerk; this static app has no Tailwind,
   so equivalent rules live here. Clerk's own stylesheet also loads — use .card
   #clerk-signin … selectors to win specificity for centering. */

#clerk-signin {
  width: 100%;
  overflow: visible;
}

.clerk-card-box {
  display: grid;
  width: 100%;
  max-width: none;
  margin: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.clerk-card {
  display: grid;
  gap: 1rem;
  width: 100%;
  max-width: none;
  padding: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
  text-align: center;
}

.clerk-header-title,
.clerk-header-subtitle {
  width: 100%;
  text-align: center;
}

.clerk-header-title {
  margin: 0 0 1rem;
  font-family: var(--font-body);
  font-size: 27px;
  font-weight: 600;
  line-height: 32px;
  letter-spacing: -0.3px;
  color: var(--primary-700);
}

.clerk-header-subtitle {
  margin: 0 0 1rem;
  font-size: 16px;
  line-height: 24px;
  color: var(--neutral-500);
}

.clerk-label-row {
  display: none;
}

.clerk-input,
.clerk-input-email {
  box-sizing: border-box;
  width: 100%;
  max-height: 60px;
  padding: 24px 16px;
  border: 1px solid var(--neutral-300);
  border-radius: 8px;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 24px;
  color: var(--neutral-700);
  background: #fff;
  text-align: left;
}

.clerk-input::placeholder,
.clerk-input-email::placeholder {
  color: var(--neutral-500);
}

.clerk-input:focus,
.clerk-input-email:focus {
  outline: none;
  border-color: var(--neutral-400);
}

.clerk-password-row {
  display: none;
}

.clerk-btn-primary {
  width: 100%;
  padding: 16px 24px;
  border: 0;
  border-radius: 9999px;
  background: var(--primary-500);
  color: #fff;
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 600;
  line-height: 24px;
  cursor: pointer;
}

.clerk-btn-primary:hover {
  background: var(--primary-600, #0e5ca8);
}

.clerk-btn-arrow {
  display: none;
}

.clerk-social-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.375rem;
  height: 48px;
  padding: 0 0.5rem;
  background: #fff;
  border: 1px solid var(--neutral-300);
  border-radius: 8px;
}

.clerk-social-text {
  font-size: 14px;
  line-height: 20px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.clerk-social-icon {
  min-width: 20px;
}

.clerk-footer {
  display: none;
}

.clerk-otp-input {
  min-width: 38px;
  max-width: 56px;
  min-height: 58px;
  border-radius: 8px;
  background: #fff;
  font-size: 27px;
  font-weight: 600;
  text-align: center;
}

@media (min-width: 768px) {
  .clerk-otp-input {
    min-width: 48px;
  }
}

.clerk-resend-link {
  font-size: 16px;
  line-height: 24px;
}

.clerk-identity-text {
  font-size: 16px;
  line-height: 24px;
}

.clerk-edit-icon {
  display: none;
  min-width: 20px;
  height: auto;
}

/* Override Clerk's default max-width and left-aligned layout inside our card */
.card #clerk-signin > div,
.card #clerk-signin [class^="cl-rootBox"],
.card #clerk-signin [class^="cl-cardBox"],
.card #clerk-signin [class^="cl-card"]:not([class*="cardBox"]),
.card #clerk-signin [class^="cl-main"],
.card #clerk-signin [class^="cl-signIn-"] {
  box-sizing: border-box;
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0;
}

.card #clerk-signin .cl-rootBox,
.card #clerk-signin .cl-cardBox,
.card #clerk-signin .cl-card,
.card #clerk-signin .cl-main,
.card #clerk-signin .cl-signIn-start,
.card #clerk-signin .clerk-card-box,
.card #clerk-signin .clerk-card {
  box-sizing: border-box;
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0;
  text-align: center;
}

/* Clerk lays the card box out as a grid with an auto, flex-start column, so the
   inner card only grows to its content width. Force a single full-width column
   with stretched items so the card fills the outer .card. */
.card #clerk-signin .cl-rootBox,
.card #clerk-signin .cl-cardBox,
.card #clerk-signin .cl-card,
.card #clerk-signin .cl-main,
.card #clerk-signin .clerk-card-box,
.card #clerk-signin .clerk-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) !important;
  justify-items: stretch !important;
  justify-content: stretch !important;
}

/* Match the React landing: horizontal padding lives on the Clerk card itself
   (px-[--spacing-2xlarge] = 24px), not the outer wrapper, so inputs stay inside
   the cardBox's overflow:hidden edge and their box-shadow border isn't clipped.
   Also zero Clerk's default -1px card margin that offset content by 1px. */
.card #clerk-signin .cl-card,
.card #clerk-signin .clerk-card {
  padding: 0 24px !important;
  margin: 0 !important;
}

.card #clerk-signin .cl-header,
.card #clerk-signin .cl-headerTitle,
.card #clerk-signin .cl-headerSubtitle,
.card #clerk-signin .cl-headerTitleText,
.card #clerk-signin .cl-headerSubtitleText,
.card #clerk-signin .clerk-header-title,
.card #clerk-signin .clerk-header-subtitle {
  display: block;
  width: 100%;
  text-align: center !important;
}

.card #clerk-signin .cl-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.card #clerk-signin .cl-dividerRow {
  display: flex;
  align-items: center;
  gap: 1rem;
  width: 100%;
  margin: 0.5rem 0;
}

.card #clerk-signin .cl-dividerLine {
  flex: 1;
}

.card #clerk-signin .cl-dividerText {
  color: var(--neutral-500);
  font-size: 14px;
}

.card #clerk-signin .cl-socialButtons,
.card #clerk-signin .cl-socialButtonsRoot {
  display: flex;
  flex-wrap: nowrap;
  justify-content: stretch;
  gap: 0.5rem;
  width: 100%;
  margin: 0 auto 0.5rem;
}

.card #clerk-signin .cl-footer,
.card #clerk-signin .cl-footerAction,
.card #clerk-signin .cl-footerPages,
.card #clerk-signin .cl-footerActionLink,
.card #clerk-signin .clerk-footer {
  display: none !important;
  margin: 0 !important;
  padding: 0 !important;
  height: 0 !important;
  overflow: hidden;
}

.card #clerk-signin .cl-socialButtonsIconButton,
.card #clerk-signin .cl-socialButtonsBlockButton,
.card #clerk-signin .clerk-social-btn {
  flex: 1 1 0;
  min-width: 0;
  max-width: none;
  border-radius: 8px !important;
}

@media (min-width: 768px) {
  .clerk-social-btn {
    height: 56px;
    padding: 0 0.75rem;
  }

  .clerk-social-text {
    font-size: 16px;
    line-height: 24px;
  }

  .card #clerk-signin .cl-socialButtons,
  .card #clerk-signin .cl-socialButtonsRoot {
    gap: 0.75rem;
  }
}

.card #clerk-signin .cl-form,
.card #clerk-signin .cl-formFieldRow,
.card #clerk-signin .cl-formButtonPrimary {
  width: 100%;
}

.card #clerk-signin .cl-formButtonPrimary {
  margin-top: 0.25rem;
}
