/* JD Pools e-Sign additions to the jdpoolstech sign-in design.
   signin.css next to this file is a verbatim copy of apps/collab/src/app/signin/signin.css;
   keep it that way and put DocuSeal-specific rules here. */

html, body { margin: 0; }

.sgn-root {
  --font-prompt: 'Prompt';
  font-family: 'DM Sans', 'Prompt', ui-sans-serif, system-ui, sans-serif;
}

/* ---- One screen, no scroll ----
   Wide screens: the sign-in card on the left, the four features in a compact 2x2 on the right, the
   attribution along the bottom, all inside 100vh. Narrow screens stack them (a phone cannot fit
   the features beside the card, so it scrolls, card first). */
.jdp-stage {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
  padding: 1.5rem 1.25rem 1rem;
  place-items: initial;
}
.jdp-layout {
  flex: 1;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 2rem;
  width: 100%;
  max-width: 68rem;
  margin: 0 auto;
}
@media (min-width: 60rem) {
  .jdp-layout {
    grid-template-columns: 25.5rem minmax(0, 1fr);
    align-items: center;
    gap: 3.5rem;
  }
}

.sgn-alert {
  margin: 1.25rem 0 0;
  padding: 0.75rem 1rem;
  border-radius: 10px;
  background: #fdecec;
  color: #a61b1b;
  font-size: 0.8125rem;
  line-height: 1.5;
}
.sgn-alert[data-kind="notice"] { background: #e8f4fb; color: #0b5a85; }

.sgn-signer-note {
  margin: 0.5rem 0 0;
  color: var(--sgn-muted);
  font-size: 0.75rem;
  line-height: 1.6;
}

/* ---- Admin sign-in: folded inside the card ---- */
.sgn-admin {
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid var(--sgn-line);
  text-align: left;
}
.sgn-admin summary {
  cursor: pointer;
  list-style: none;
  text-align: center;
  color: var(--sgn-muted);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.02em;
}
.sgn-admin summary::-webkit-details-marker { display: none; }
.sgn-admin summary::after { content: ' ▾'; }
.sgn-admin[open] summary::after { content: ' ▴'; }
.sgn-admin summary:focus-visible { outline: 2px solid var(--sgn-ring); outline-offset: 3px; border-radius: 6px; }

.sgn-admin form { margin-top: 1rem; display: grid; gap: 0.75rem; }
.sgn-field { display: grid; gap: 0.3rem; }
.sgn-field label { color: var(--sgn-ink); font-size: 0.8125rem; font-weight: 500; }
.sgn-field input {
  width: 100%;
  padding: 0.7rem 0.85rem;
  border: 1px solid #d8dbe8;
  border-radius: 10px;
  background: #ffffff;
  color: var(--sgn-ink);
  font: inherit;
  font-size: 0.9375rem;
}
.sgn-field input:focus { outline: 2px solid var(--sgn-ring); outline-offset: 1px; border-color: transparent; }
.sgn-secondary {
  margin-top: 0.25rem;
  width: 100%;
  cursor: pointer;
  padding: 0.75rem 1rem;
  border: 1px solid var(--sgn-cta);
  border-radius: 10px;
  background: #ffffff;
  color: var(--sgn-cta);
  font: inherit;
  font-size: 0.875rem;
  font-weight: 500;
}
.sgn-secondary:hover { background: #f4f5f9; }
.sgn-admin .sgn-forgot { display: block; margin-top: 0.75rem; text-align: center; color: #0074ab; font-size: 0.75rem; }

/* ---- What e-Sign is: beside the card, on the same water ---- */
.sgn-features { width: 100%; max-width: 40rem; }
.sgn-features-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.875rem;
}
@media (min-width: 36rem) {
  .sgn-features-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.sgn-feature {
  display: flex;
  gap: 0.875rem;
  align-items: flex-start;
  padding: 1.125rem 1.125rem 1.25rem;
  border: 1px solid rgb(255 255 255 / 0.12);
  border-radius: 20px;
  background: rgb(255 255 255 / 0.06);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  text-align: left;
}
.sgn-feature-icon {
  flex: none;
  display: inline-grid;
  place-items: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 999px;
  background: rgb(0 149 218 / 0.18);
  color: #7fd3f7;
}
.sgn-feature-icon svg { width: 1.25rem; height: 1.25rem; }
.sgn-feature h2 {
  margin: 0;
  font-family: var(--font-prompt, inherit);
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.3;
  color: #ffffff;
}
.sgn-feature p {
  margin: 0.3rem 0 0;
  color: rgb(247 248 252 / 0.72);
  font-size: 0.8125rem;
  line-height: 1.55;
}
.sgn-root:lang(th) .sgn-feature h2 { line-height: 1.45; }

.sgn-attribution {
  margin-top: 1.25rem;
  color: rgb(247 248 252 / 0.55);
  font-size: 0.75rem;
  text-align: center;
}
.sgn-attribution a { color: inherit; }

.sgn-scroll-hint {
  color: rgb(247 248 252 / 0.5);
  font-size: 0.75rem;
  text-align: center;
}

/* The toggle options are links here (no JS needed), where collab's are buttons. */
.sgn-lang-option { text-decoration: none; }

/* The water, sky and grain cover the VIEWPORT, not the first screen of the scroll container:
   absolute layers inside the scrolling .sgn-root stop at its first screen, which left the feature
   cards on a plain dark band. Fixed layers stay behind everything as the page scrolls. */
.sgn-root > .sgn-layer,
.sgn-root > .sgn-water {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
}

/* ---- Signer help (/help/signing): one wider card with numbered steps ---- */
.jdp-help {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  width: 100%;
  max-width: 36rem;
  margin: 0 auto;
}
.jdp-help-card { text-align: left; padding: 2.5rem 2.25rem 2rem; }
.jdp-help-card .sgn-logo, .jdp-help-card .sgn-title { text-align: center; }
.jdp-help-card .sgn-title { font-size: 1.875rem; }
.jdp-help-lede { max-width: none; text-align: center; }
.jdp-help-heading {
  margin: 1.75rem 0 0.75rem;
  font-family: var(--font-prompt, inherit);
  font-size: 1rem;
  font-weight: 500;
  color: var(--sgn-ink);
}
.jdp-help-steps {
  counter-reset: jdp-step;
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.75rem;
}
.jdp-help-steps li {
  counter-increment: jdp-step;
  display: grid;
  grid-template-columns: 1.75rem 1fr;
  gap: 0.75rem;
  color: var(--sgn-ink);
  font-size: 0.9375rem;
  line-height: 1.6;
}
.jdp-help-steps li::before {
  content: counter(jdp-step);
  display: inline-grid;
  place-items: center;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 999px;
  background: var(--sgn-cta);
  color: #ffffff;
  font-size: 0.8125rem;
  font-weight: 500;
}
.jdp-help-tips {
  margin: 0;
  padding-left: 1.1rem;
  display: grid;
  gap: 0.4rem;
  color: var(--sgn-muted);
  font-size: 0.875rem;
  line-height: 1.6;
}
.jdp-help-tips li::marker { color: var(--sgn-logo-cyan); }
.jdp-help-card .sgn-note { text-align: center; }
