/* =========================================================================
   auth-skin.css — restyle the shared auth dialogs to match the Class League
   home's clean contact-form look. Loaded ONLY by home-cl.html, after
   dialog.css + sign-in-forms.css, so it overrides them without touching the
   live index.html (which keeps its own home.css styling).

   Every auth.js dialog is built by showDialog() with the same chrome
   (.custom-dialog-overlay > .custom-dialog > .dialog-message), so this one file
   covers sign-in, sign-up, the "sign in failed" error, verify-email and
   password-reset. Tokens (--surface/--border/--ink/--muted/--accent/--radius-md)
   come from the CL stack, the same ones the contact form's .auth-form uses.
   ========================================================================= */

/* ---- Card: white, Outfit, sane px sizing (dialog.css uses vmin), room for a
        corner close button. ---- */
.custom-dialog {
  position: relative;
  font-family:
    'Outfit',
    -apple-system,
    BlinkMacSystemFont,
    'Segoe UI',
    Roboto,
    sans-serif;
  background: var(--surface, #fff);
  color: var(--ink, #1f2a37);
  padding: 30px clamp(22px, 4vw, 40px);
  border-radius: 16px;
  min-width: 0;
  width: min(460px, 92vw);
  max-width: 92vw;
  box-shadow: 0 30px 80px rgba(8, 12, 20, 0.28);
}

/* ---- Copy: kill dialog.css's ultra-thin weight 100 + vmin font sizes. ---- */
.custom-dialog p {
  font-weight: 400;
  font-size: 1rem;
  line-height: 1.5;
  color: var(--ink, #1f2a37);
  margin: 0 0 8px;
}
.custom-dialog p:first-of-type {
  /* the title, e.g. "Sign In" / "Sign in failed" */
  font-weight: 800;
  font-size: 1.4rem;
  margin-bottom: 14px;
  color: var(--accent, #3498db);
}
.custom-dialog .uppercase {
  text-transform: uppercase;
}
.custom-dialog .veryBoldFont {
  font-weight: 800 !important;
}
.custom-dialog .boldFont {
  font-weight: 700;
  color: var(--ink, #1f2a37);
}
.custom-dialog .smallPrint {
  /* dialog.css forces .smallPrint to 1.25vmin / 700 / uppercase with
     !important, so the Terms link in the auth dialogs renders as tiny bold
     caps that shrink further on narrow windows. Match the !important to bring
     it back to a calm, readable small link. */
  font-size: 0.85rem !important;
  font-weight: 400 !important;
  text-transform: none;
  color: var(--muted, #5b6b7a);
}
/* dialog.css also sizes the LAST <p> (the reassurance line) at 1.75vmin via a
   higher-specificity p:last-of-type rule; pin it to a steady 1rem. */
.custom-dialog p:last-of-type {
  font-size: 1rem;
  margin-bottom: 0;
}
.custom-dialog .smallFont {
  font-size: 0.85rem;
}
.custom-dialog a {
  color: var(--ink, #1f2a37);
}

/* ---- Forms: left-aligned, full-width fields, exactly like the contact form. ---- */
#signin-form-dialog,
#signup-form-dialog,
#reset-password-form-dialog {
  width: 100%;
  align-items: stretch;
  row-gap: 10px;
  margin-top: 28px;
}
#signin-form-dialog input,
#signup-form-dialog input,
#reset-password-form-dialog input {
  min-width: 0;
  width: 100%;
  text-align: left;
  font: inherit;
  font-size: 1rem;
  padding: 10px 12px;
  margin: 4px 0;
  border: 1px solid var(--border, #d7dee6);
  border-radius: var(--radius-md, 10px);
  background: var(--surface, #fff);
  color: var(--ink, #1f2a37);
  box-sizing: border-box;
}
#signin-form-dialog input:focus,
#signup-form-dialog input:focus,
#reset-password-form-dialog input:focus {
  outline: 2px solid var(--accent, #3498db);
  outline-offset: 1px;
}
.password-wrapper {
  min-width: 0;
  width: 100%;
}
/* sign-in-forms.css pads the password input's right side at 3.5vmin !important
   and pins the eye toggle at 0.8vmin, so both drift as the window resizes.
   Override at higher specificity (+ !important to beat theirs) with fixed px. */
.custom-dialog .password-wrapper input {
  padding-right: 40px !important;
}
.custom-dialog .password-toggle {
  right: 10px;
  padding: 4px;
}

/* ---- Buttons. greenButton keeps buttons.css's #16a085 (the Triptico action
        colour). redButton's colour token (--red-colour) is a home.css var that's
        undefined here AND set !important, so it rendered with no background —
        give the Cancel button a clean outline, !important to beat that rule. ---- */
.custom-dialog .simpleButton {
  font: inherit;
  font-weight: 700;
  font-size: 1rem;
  padding: 11px 20px;
  border: none;
  border-radius: var(--radius-md, 10px);
  cursor: pointer;
  transition: background-color 0.15s ease;
}
.custom-dialog .redButton {
  background: transparent !important;
  color: var(--muted, #5b6b7a);
  border: 1px solid var(--border, #d7dee6);
}
.custom-dialog .redButton:hover {
  background: rgba(0, 0, 0, 0.04) !important;
}

/* ---- Submit row + footer links + dividers. ---- */
.button-holder {
  width: 100%;
  margin-top: 4px;
}
.signin-footer {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  margin-top: 8px;
}
.custom-dialog .horizontalDivider {
  border-top: 1px solid var(--border, #e6ebf0);
  width: 100%;
  height: 0;
}
.custom-dialog .addSpaceAboveBelow {
  margin: 14px 0;
}
.custom-dialog .addMoreSpaceAbove {
  margin-top: 16px;
}

/* ---- Corner close (×): both auth dialogs now ship one in their markup
        (#cancel-signin-dialog / #cancel-signup-dialog, the latter replacing the
        old Cancel button). Circular, top-right, with a background — replacing the
        centred thin glyph whose positioning lived in the unloaded home.css. ---- */
#cancel-signin-dialog,
#cancel-signup-dialog {
  position: absolute;
  top: 12px;
  right: 12px;
  margin: 0;
  padding: 0;
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  font-weight: 400 !important;
  line-height: 1;
  color: var(--ink, #1f2a37);
  background: rgba(0, 0, 0, 0.06);
  border: none;
  border-radius: 50%;
  cursor: pointer;
}
#cancel-signin-dialog:hover,
#cancel-signup-dialog:hover {
  background: rgba(0, 0, 0, 0.12);
}
