/* ─────────────────────────────────────────────────────────────────────────
   Shared: Choose a plan modal (shared/signup-modal.html)

   Figma: Sign Up - Invites (TCGqndFpj9grrXmKnjNyLO)
     desktop Plan Selection 9883:10552 — tabs 9883:10560, cards 9883:10569
     mobile  Plan Selection 9551:19698 — tabs 9551:19705, cards 9551:19715

   CONTENT comes from the pricing page (same tier partial, same data, same
   links); the LOOK and SIZES come from these modal frames. So the pricing
   pill/card classes are reused, and every size that differs in the modal is
   re-declared here under `.signup-modal`. The pricing pages are unaffected.

   Units: rem only. Fluid model matches pricing.css: clamp(min, intercept +
   slope vw, max) between the 360 (mobile frame) and 1440 (desktop frame)
   anchors; slope = (v1440 − v360) / 1080 × 100vw.

   Non-token colours (flagged, no @theme token exists): #dbe3f0 panel border,
   #f1f4f9 close-button fill, rgb(10 18 32) shadow tints.
   ───────────────────────────────────────────────────────────────────────── */

/* Freeze the page behind the open modal. */
html:has(.signup-modal[open]) {
  overflow: hidden;
}

/* ── Panel ─────────────────────────────────────────────────────────────── */

/* Mobile 9551:19698: a full-screen white sheet that scrolls inside itself. */
.signup-modal {
  box-sizing: border-box;
  width: 100%;
  max-width: none;
  height: 100dvh;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: var(--color-white, #fff);
  color: var(--color-navy-dark, #001428);
  overflow-y: auto;
  overscroll-behavior: contain;
}

/* Not in Figma — the frame shows an app page behind the panel, not a scrim.
   Navy-dark at 60% is a stand-in; confirm with design. */
.signup-modal::backdrop {
  background: color-mix(in srgb, var(--color-navy-dark, #001428) 60%, transparent);
}

/* Desktop 9883:10552: 1333 wide, radius 16, 1 border, two-layer shadow. */
@media (width >= 64rem) {
  .signup-modal {
    width: min(83.3125rem, calc(100% - 4rem)); /* 1333 */
    height: auto;
    max-height: calc(100dvh - 4rem);
    margin: auto;
    border: 0.0625rem solid #dbe3f0; /* 1 */
    border-radius: 1rem; /* 16 */
    box-shadow:
      0 0.1875rem 0.375rem 0 rgb(10 18 32 / 14%),
      0 0.1875rem 0.9375rem 0 rgb(10 18 32 / 10%); /* 0 3 6, 0 3 15 */
  }
}

/* ── Close ─────────────────────────────────────────────────────────────── */

/* Zero-height sticky bar so the close button stays put while the sheet
   scrolls. Figma: top 24 / right 31 desktop, 25 / 32 mobile. */
.signup-modal__bar {
  position: sticky;
  top: 0;
  z-index: 1;
  height: 0;
}

.signup-modal__close {
  position: absolute;
  top: 1.5rem; /* 24 */
  right: 1.9375rem; /* 31 */
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1.5rem; /* 24 */
  height: 1.5rem;
  padding: 0.25rem; /* 4 */
  border: 0;
  border-radius: 3rem;
  background: #f1f4f9;
  cursor: pointer;
}

.signup-modal__close img {
  display: block;
  width: 1rem;
  height: 1rem;
}

.signup-modal__close:focus-visible {
  outline: 0.1875rem solid var(--color-navy-dark, #001428);
  outline-offset: 0.1875rem;
}

/* ── Hero ──────────────────────────────────────────────────────────────── */

.signup-modal__hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(0.5rem, 0.04167rem + 2.037vw, 1.875rem); /* 8 -> 30 */
  padding-top: clamp(1.25rem, 0.33333rem + 4.0741vw, 4rem); /* 20 -> 64 */
  padding-bottom: clamp(1rem, -0.125rem + 5vw, 4.375rem); /* 16 -> 70 */
  padding-inline: clamp(1rem, -1.79167rem + 12.4074vw, 9.375rem); /* 16 -> 150 */
  text-align: center;
}

.signup-modal__title {
  margin: 0;
  font-family: var(--font-primary, "Inter", sans-serif);
  font-weight: 600;
  font-size: clamp(1.8125rem, 1.52083rem + 1.2963vw, 2.6875rem); /* 29 -> 43 */
  line-height: clamp(2.0625rem, 1.72917rem + 1.4815vw, 3.0625rem); /* 33 -> 49 */
  letter-spacing: -0.015em; /* -0.435 / 29 */
}

.signup-modal__intro {
  max-width: 47.375rem; /* 758 */
  margin: 0;
  font-family: var(--font-primary, "Inter", sans-serif);
  font-weight: 400;
  font-size: clamp(1rem, 0.875rem + 0.5556vw, 1.375rem); /* 16 -> 22 */
  line-height: clamp(1.5rem, 1.35417rem + 0.6481vw, 1.9375rem); /* 24 -> 31 */
}

@media (width >= 64rem) {
  .signup-modal__title {
    letter-spacing: -0.019em; /* -0.817 / 43 */
  }

  .signup-modal__intro {
    letter-spacing: -0.016em; /* -0.352 / 22 */
  }
}

/* ── Tabs ──────────────────────────────────────────────────────────────── */

/* Figma 9883:10560 / 9551:19705. Same pricing pill markup, modal styling:
   oxford (navy-dark) 1.5 outline instead of royal, rounded rect 8 -> 12
   instead of a full pill, lime fill when selected, and 236 wide on desktop.
   Size and type (16 -> 65 sides, 10 block, h 70 at lg, 12/15.6 -> 18/23) are
   already pricing's and match these frames. */
.signup-modal__nav .section-pricing-nav__list {
  gap: clamp(0.625rem, 0.5rem + 0.5556vw, 1rem); /* 10 -> 16 */
  padding-inline: 1rem; /* 16 */
}

.signup-modal__nav .section-pricing-nav__pill {
  border: 0.09375rem solid var(--color-navy-dark, #001428); /* 1.5 */
  border-radius: clamp(0.5rem, 0.41667rem + 0.3704vw, 0.75rem); /* 8 -> 12 */
  color: var(--color-navy-dark, #001428);
  cursor: pointer;
}

.signup-modal__nav .section-pricing-nav__pill[aria-selected="true"] {
  border-color: var(--color-yellow, #dbe64c);
  background: var(--color-yellow, #dbe64c);
  color: var(--color-navy-dark, #001428);
}

.signup-modal__nav .section-pricing-nav__pill:focus-visible {
  outline-color: var(--color-navy-dark, #001428);
}

.signup-modal__nav .section-pricing-nav__pill:hover:not([aria-selected="true"]) {
  background: color-mix(in srgb, var(--color-navy-dark, #001428) 6%, transparent);
}

@media (width >= 64rem) {
  .signup-modal__nav .section-pricing-nav__list {
    justify-content: center;
  }

  /* 236 in Figma; min- so a longer label grows the pill instead of clipping. */
  .signup-modal__nav .section-pricing-nav__pill {
    min-width: 14.75rem;
  }
}

/* ── Cards ─────────────────────────────────────────────────────────────── */

/* Row: pt 36 at both sizes; mobile px 16, cards stacked full width with a 24
   gap; desktop cards 396 wide, 24 gap, centred. The desktop frame has no side
   padding on the row and crops before the bottom, so the 40 desktop sides
   and 36 bottom are stand-ins (the bottom mirrors the top). */
.signup-modal__panels {
  padding-top: 2.25rem; /* 36 */
  padding-bottom: 2.25rem;
  padding-inline: clamp(1rem, 0.5rem + 2.2222vw, 2.5rem); /* 16 -> 40 */
}

.signup-modal .section-pricing-table__grid {
  gap: 1.5rem; /* 24 */
}

@media (width >= 64rem) {
  .signup-modal .section-pricing-table__grid {
    grid-template-columns: repeat(auto-fit, minmax(0, min(24.75rem, 100%))); /* 396 */
  }
}

/* main.css gives every .section-pricing-tier a scroll-linked card-reveal on a
   view() timeline. Inside the modal the dialog is the scroller, so the cards
   would open half-faded — they must be fully visible the moment it opens. */
.signup-modal .section-pricing-tier {
  gap: clamp(0.9375rem, 1.02083rem - 0.0926vw, 1rem); /* 16 -> 15 */
  padding: clamp(1.125rem, 1.08333rem + 0.1852vw, 1.25rem); /* 18 -> 20 */
  border-radius: clamp(0.75rem, 2.25rem - 1.6667vw, 1.875rem); /* 30 -> 12 */
  animation: none;
}

/* Card fills, modal only (pricing pages keep pricing.css's own).
   Mobile 9551:19716 / 9551:19792: cream (pricing's base) and a 253.67deg
   viridian->royal gradient. Desktop 9883:10570 / 9883:10596: mint #d7fbed
   (no @theme token — flagged) and the same gradient at 246.56deg. Stops are
   1.2048% / 72.261% in both frames. */
.signup-modal .section-pricing-tier--featured {
  background: linear-gradient(253.673deg, var(--color-green, #00804d) 1.2048%, #183a73 72.261%);
}

@media (width >= 64rem) {
  .signup-modal .section-pricing-tier:not(.section-pricing-tier--featured) {
    background: #d7fbed;
  }

  /* Desktop Basic name is oxford-blue #001f3e (navy), not navy-dark. */
  .signup-modal .section-pricing-tier:not(.section-pricing-tier--featured) .section-pricing-tier__name {
    color: var(--color-navy, #001f3e);
  }

  .signup-modal .section-pricing-tier--featured {
    background: linear-gradient(246.56deg, var(--color-green, #00804d) 1.2048%, #183a73 72.261%);
  }
}

.signup-modal .section-pricing-tier__name {
  font-size: clamp(1.375rem, 1.20833rem + 0.7407vw, 1.875rem); /* 22 -> 30 */
  line-height: clamp(1.7875rem, 1.59167rem + 0.8704vw, 2.375rem); /* 28.6 -> 38 */
}

.signup-modal .section-pricing-tier__panel,
.signup-modal .section-pricing-tier__features {
  padding: clamp(1.125rem, 1rem + 0.5556vw, 1.5rem); /* 18 -> 24 */
  border-radius: clamp(0.75rem, 2.25rem - 1.6667vw, 1.875rem); /* 30 -> 12 */
}

/* Mobile nests the two white panels 12 apart under a 16 card gap; desktop
   puts all three 15 apart. -4 -> 0 here lands both. */
.signup-modal .section-pricing-tier__features {
  margin-top: clamp(-0.25rem, -0.33333rem + 0.3704vw, 0rem);
  gap: clamp(0.3125rem, 0.5625rem - 0.2778vw, 0.5rem); /* 8 -> 5 */
}

.signup-modal .section-pricing-tier__amount {
  font-size: clamp(1.875rem, 1.66667rem + 0.9259vw, 2.5rem); /* 30 -> 40 */
  line-height: clamp(2.0625rem, 1.8125rem + 1.1111vw, 2.8125rem); /* 33 -> 45 */
}

.signup-modal .section-pricing-tier__period,
.signup-modal .section-pricing-tier__description {
  font-size: clamp(1.125rem, 1.04167rem + 0.3704vw, 1.375rem); /* 18 -> 22 */
  line-height: clamp(1.4375rem, 1.27083rem + 0.7407vw, 1.9375rem); /* 23 -> 31 */
}

/* Mobile: rounded-rect 8, 8/16 padding, 16/30 type (46 tall).
   Desktop: full pill 50 tall, 22/30 type. */
.signup-modal .section-pricing-tier__cta {
  height: clamp(2.875rem, 2.79167rem + 0.3704vw, 3.125rem); /* 46 -> 50 */
  border-radius: clamp(0.5rem, -0.375rem + 3.8889vw, 3.125rem); /* 8 -> 50 */
  font-size: clamp(1rem, 0.875rem + 0.5556vw, 1.375rem); /* 16 -> 22 */
  line-height: 1.875rem; /* 30 */
}

/* Mobile lists drop the 8 padding round the tick and the text; desktop keeps it. */
.signup-modal .section-pricing-tier__check,
.signup-modal .section-pricing-tier__feature-text {
  padding: clamp(0rem, -0.16667rem + 0.7407vw, 0.5rem); /* 0 -> 8 */
}

.signup-modal .section-pricing-tier__feature-text {
  font-size: clamp(1rem, 0.95833rem + 0.1852vw, 1.125rem); /* 16 -> 18 */
  line-height: 1.4375rem; /* 23 */
}
