/* Signup form layout — extends auth.css base patterns */

.signup-page {
  /* Force the grid item to fill its track so the max-width:1280px clamp
     actually kicks in. Without this, as a grid child the element shrinks
     to content width (~801px on /signup/checkout) instead of expanding
     to its 1280px cap, which starves .checkout-layout's form column and
     causes Stripe's Link row to wrap. */
  width: 100%;
  max-width: 1280px;
  margin: 30px auto;
  padding: 0 20px;
  /* layouts/auth.blade.php's <main class="main"> is a 2-col grid
     (left-panel + right-panel for the login page). Single-child signup
     pages land in column 1 only and read as left-anchored on wide
     viewports. Span all columns so the page can fill .main and the
     above margin: auto can actually center on the viewport. */
  grid-column: 1 / -1;
}

.signup-grid {
  display: grid;
  /* Right column 600px outer; with the trimmed 24px form-card padding
     this gives ~552px inner — fits 5 wallet tiles in Stripe's tabs
     layout without the "..." overflow collapse. (520px+32px padding =
     456px inner was too tight even at 4 tiles.) */
  grid-template-columns: 380px 600px;
  gap: 32px;
  align-items: start;
  justify-content: center;
}

/* ── PLAN SUMMARY (left) ── */
.signup-plan {
  background: #1a2744;
  color: #fff;
  border-radius: 10px;
  padding: 28px;
  position: sticky;
  top: 30px;
}

.plan-eyebrow {
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(255,255,255,0.55);
  margin-bottom: 8px;
}

.plan-name {
  font-size: 22px;
  font-weight: 800;
  margin-bottom: 14px;
  color: #fff;
}

.plan-price {
  margin-bottom: 14px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(255,255,255,0.12);
}

.plan-price-now {
  font-size: 30px;
  font-weight: 800;
  color: #e8732a;
}

.plan-price-detail {
  display: block;
  font-size: 13px;
  color: rgba(255,255,255,0.5);
  margin-top: 2px;
}

.plan-trial-badge {
  display: inline-block;
  background: rgba(232,115,42,0.2);
  color: #ffa566;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 4px 10px;
  border-radius: 4px;
  margin-bottom: 14px;
}

.plan-features {
  list-style: none;
  padding: 0;
  margin: 14px 0;
}

.plan-features li {
  font-size: 13.5px;
  color: rgba(255,255,255,0.75);
  padding: 5px 0 5px 22px;
  position: relative;
}

.plan-features li::before {
  content: '\2713';
  position: absolute;
  left: 0;
  top: 5px;
  color: #4ade80;
  font-weight: 700;
}

.plan-change {
  display: inline-block;
  margin-top: 10px;
  font-size: 12.5px;
  color: rgba(255,255,255,0.55);
  text-decoration: none;
}

.plan-change:hover {
  color: #fff;
  text-decoration: underline;
}

/* ── FORM CARD (right) ── */
.signup-form-card {
  background: #fff;
  border: 1px solid #e4e6ef;
  border-radius: 10px;
  /* 24px (was 32px) gives paymentElement more inner width for the
     wallet tabs without making the card feel cramped. */
  padding: 24px;
  box-shadow: 0 4px 16px rgba(26,39,68,0.05);
}

.signup-title {
  font-size: 22px;
  font-weight: 800;
  color: #1a1f2e;
  margin-bottom: 4px;
}

.signup-sub {
  font-size: 14px;
  color: #6b7299;
  margin-bottom: 22px;
}

.signup-error {
  background: #fef2f2;
  border: 1px solid #f5a7a7;
  color: #c0392b;
  padding: 11px 14px;
  border-radius: 6px;
  font-size: 13.5px;
  margin-bottom: 18px;
}

/* Field grid */
.row-2col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

@media (max-width: 640px) {
  .row-2col {
    grid-template-columns: 1fr;
  }
}

.field {
  margin-bottom: 16px;
}

.field label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #1a1f2e;
  margin-bottom: 6px;
}

.field label .opt {
  font-weight: 400;
  color: #9aa0b0;
}

.field input[type="text"],
.field input[type="email"],
.field input[type="password"] {
  width: 100%;
  padding: 11px 14px;
  font-family: inherit;
  font-size: 14.5px;
  color: #1a1f2e;
  background: #fff;
  border: 1.5px solid #d1d5e0;
  border-radius: 6px;
  transition: border-color 0.12s;
}

.field input:focus {
  outline: none;
  border-color: #e8732a;
}

.field.has-error input {
  border-color: #c0392b;
}

.field-hint {
  font-size: 11.5px;
  color: #9aa0b0;
  margin-top: 4px;
}

.field-error {
  font-size: 12.5px;
  color: #c0392b;
  margin-top: 4px;
}

.password-wrap {
  position: relative;
}

.pw-toggle {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  color: #9aa0b0;
  cursor: pointer;
  padding: 4px;
}

.pw-toggle:hover {
  color: #1a1f2e;
}

.pw-generate {
  position: absolute;
  right: 38px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  color: #9aa0b0;
  cursor: pointer;
  padding: 4px;
}
.pw-generate:hover {
  color: #1a1f2e;
}
.pw-generate-status {
  position: absolute;
  right: 70px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 12px;
  color: #6b7280;
  background: #f3f4f6;
  padding: 2px 8px;
  border-radius: 4px;
  white-space: nowrap;
  opacity: 0;
  transition: opacity 0.2s ease;
  pointer-events: none;
}
.pw-generate-status.visible {
  opacity: 1;
}

/* Payment section */
.payment-section {
  margin-top: 22px;
  padding-top: 22px;
  border-top: 1px solid #e4e6ef;
}

.payment-section-label {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: #6b7299;
  margin-bottom: 14px;
}

.stripe-card-element {
  padding: 12px 14px;
  background: #fff;
  border: 1.5px solid #d1d5e0;
  border-radius: 6px;
  transition: border-color 0.12s;
}

.stripe-card-element--focus {
  border-color: #e8732a;
}

.payment-secured {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  color: #6b7299;
  margin-top: 10px;
}

/* Submit button */
.btn-submit {
  width: 100%;
  font-family: inherit;
  font-size: 15.5px;
  font-weight: 800;
  color: #fff;
  background: #e8732a;
  border: none;
  padding: 14px;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.14s, transform 0.12s;
  box-shadow: 0 4px 14px rgba(232,115,42,0.3);
  margin-top: 22px;
}

.btn-submit:hover:not(:disabled) {
  background: #c85e1f;
  transform: translateY(-1px);
}

.btn-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.signup-terms {
  font-size: 11.5px;
  color: #9aa0b0;
  text-align: center;
  margin-top: 16px;
  line-height: 1.5;
}

.signup-terms a {
  color: #6b7299;
}

.signup-have-account {
  font-size: 13.5px;
  color: #6b7299;
  text-align: center;
  margin-top: 14px;
}

.signup-have-account a {
  color: #e8732a;
  font-weight: 600;
}

/* Tier-1 payment-method tabs sit above the Stripe paymentElement (which has
   its own tier-2 tabs inside its iframe). Toggling here swaps the entire
   payment section between Stripe-ecosystem and PayPal. Visual style mirrors
   Stripe's own tab design — 1px border with a 2px blue active state. */
.payment-method-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 16px;
}
.pmt-tab {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid #e0e6ed;
  border-radius: 5px;
  background: #fff;
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  color: #4a5568;
  cursor: pointer;
  transition: border-color .15s ease, color .15s ease;
  text-align: left;
}
.pmt-tab:hover {
  border-color: #c8d2dc;
}
.pmt-tab-active {
  border-color: #4169E1;   /* Stripe-style blue active border */
  color: #4169E1;
  border-width: 2px;
  /* Compensate the +1px border so contents don't shift */
  padding: 11px 13px;
}
.pmt-tab-icon {
  flex-shrink: 0;
  color: currentColor;
}

[hidden] { display: none !important; }
.paypal-explainer {
  font-size: 13px;
  color: #6b7299;
  text-align: center;
  margin: 8px 0 14px;
  line-height: 1.5;
}

/* Phase 2 "Back to details" — matches signup-have-account token style.
   Renders as a subtle text link (not a default-styled button). */
.signup-link-back {
  background: none;
  border: none;
  padding: 8px 0;
  margin-top: 8px;
  display: block;
  width: 100%;
  text-align: center;
  font-size: 13.5px;
  color: #6b7299;
  cursor: pointer;
  text-decoration: none;
  font-family: inherit;
}
.signup-link-back:hover {
  color: #1a1a2e;
  text-decoration: underline;
}

.hidden {
  display: none;
}

/* ── SOCIAL SIGNUP BUTTONS ── */
.social-buttons {
  display: flex;
  flex-direction: column;
  gap: 9px;
  margin-bottom: 18px;
}
.btn-social {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 11px 14px;
  border-radius: 6px;
  border: 1.5px solid #e0e6ed;
  background: #fff;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  color: #1a1f2e;
  cursor: pointer;
  text-decoration: none;
  transition: border-color .14s, box-shadow .14s, background .14s;
}
.btn-social:hover {
  border-color: #6b7299;
  text-decoration: none;
  box-shadow: 0 2px 8px rgba(26,39,68,.07);
}
.btn-social-google {
  /* white with subtle border — Google brand guideline */
}
.btn-social-facebook {
  background: #1877F2;
  color: #fff;
  border-color: #1877F2;
}
.btn-social-facebook:hover {
  background: #166fe5;
  border-color: #166fe5;
  color: #fff;
}
.btn-social-apple {
  background: #000;
  color: #fff;
  border-color: #000;
}
.btn-social-apple:hover {
  background: #1a1a1a;
  border-color: #1a1a1a;
  color: #fff;
}

.social-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 16px;
}
.social-divider::before,
.social-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: #e4e6ef;
}
.social-divider span {
  font-size: 12px;
  color: #9aa0b0;
  font-weight: 500;
  white-space: nowrap;
}

/* In-progress social signup banner shown above Phase 2 */
.social-confirm {
  background: #f4faff;
  border: 1px solid #cfe3f7;
  border-radius: 6px;
  padding: 11px 14px;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.social-confirm-row {
  display: flex;
  flex-direction: column;
  font-size: 13.5px;
}
.social-confirm-row strong {
  color: #1a1f2e;
  font-weight: 600;
}
.social-confirm-email {
  color: #6b7299;
  font-size: 12.5px;
}
.social-confirm-switch {
  font-size: 12.5px;
  color: #2c6fad;
  text-decoration: none;
  font-weight: 500;
}
.social-confirm-switch:hover {
  text-decoration: underline;
}

/* Responsive */
@media (max-width: 880px) {
  .signup-grid {
    grid-template-columns: 1fr;
  }
  .signup-plan {
    position: static;
  }
}

/* ─── Account-only signup page (solo card, no aside) ─────────────────
   After the /signup → /signup/checkout split, /signup is single-column.
   This shell sits inside .signup-page in place of the prior 2-col grid.
*/
.signup-form-card-solo {
  max-width: 480px;
  margin: 40px auto;
}
.signup-plan-note {
  font-size: 12.5px;
  color: var(--ink4, #6b7299);
  margin: 12px 0 14px;
  text-align: center;
}
.signup-plan-note strong { color: var(--ink, #1a1f2e); font-weight: 700; }

/* ─── Checkout page (post-signup) ─────────────────────────────────────
   Header + plan-tabs full-width on top; two-column body below
   (payment form left, plan summary aside right). Stacks on mobile.
*/
.checkout-header {
  max-width: 1280px;
  margin: 24px auto 16px;
  text-align: center;
  padding: 0 20px;
}
.checkout-header .signup-title { margin: 0 0 4px; }
.checkout-subtitle {
    text-align: center;
    font-size: 14.5px;
    color: #6b7299;
    margin: 6px 0 0;
    line-height: 1.45;
}

.plan-tabs-checkout {
  max-width: 920px;
  margin: 0 auto 20px;
  padding: 0 20px;
}

.checkout-layout {
  max-width: 1280px;
  margin: 0 auto 40px;
  padding: 0 20px;
  display: grid;
  /* Aside 340px (was 380px) — gives the Stripe Payment Element ~40px more
     room so the Link enrollment row's "Secure, fast checkout with Link"
     text fits on one line at desktop widths. */
  grid-template-columns: 1fr 340px;
  gap: 36px;
  align-items: start;
}
/* Defensive: ensure the Stripe mount element fills its column and isn't
   capped by any inherited inline-block / max-width rule. */
#signup-payment-element { width: 100%; }
#signup-payment-element .StripeElement { width: 100%; }
.checkout-form-card { margin: 0; }
.checkout-cta { margin-top: 12px; }
.checkout-logout-link {
  text-align: center;
  margin: 14px 0 0;
  font-size: 12.5px;
  color: var(--ink4, #6b7299);
}
.checkout-logout-link a {
  color: var(--ink4, #6b7299);
  text-decoration: underline;
  cursor: pointer;
}
.checkout-logout-link a:hover { color: #1a2744; }

.checkout-summary {
  background: #fff;
  border: 1px solid var(--border, #e4e6ef);
  border-radius: 10px;
  padding: 22px 22px 20px;
  position: sticky;
  top: 24px;
}
.checkout-summary-eyebrow {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .12em;
  color: var(--ink4, #6b7299);
  margin-bottom: 6px;
}
.checkout-summary-name {
  font-size: 20px;
  font-weight: 800;
  color: #1a2744;
  margin: 0 0 12px;
  letter-spacing: -.3px;
  line-height: 1.2;
}
.checkout-summary-price { display: flex; align-items: baseline; gap: 6px; margin-bottom: 4px; }
.checkout-summary-amount { font-size: 26px; font-weight: 800; color: #1a1f2e; letter-spacing: -.5px; }
.checkout-summary-detail { font-size: 13px; color: var(--ink4, #6b7299); }
.checkout-summary-badge {
  display: inline-block;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  background: #e8732a;
  color: #fff;
  padding: 3px 8px;
  border-radius: 3px;
  margin: 2px 0 10px;
}
.checkout-summary-features {
  list-style: none;
  padding: 0;
  margin: 14px 0 14px;
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.checkout-summary-features li {
  position: relative;
  padding-left: 20px;
  font-size: 13px;
  color: #2a2f44;
  line-height: 1.4;
}
.checkout-summary-features li::before {
  content: '✓';
  position: absolute;
  left: 0;
  top: 0;
  color: #1e8a4a;
  font-weight: 700;
}
.checkout-summary-cadence {
  font-size: 11.5px;
  color: var(--ink4, #6b7299);
  margin: 12px 0 0;
  padding-top: 12px;
  border-top: 1px solid var(--border, #e4e6ef);
  line-height: 1.4;
}

/* Compact plan switcher inside the YOUR PLAN aside block */
.checkout-plan-switcher {
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid #e4e6ef;
}
.checkout-plan-switcher-label {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #6b7299;
    text-align: center;
    margin-bottom: 8px;
}
.checkout-plan-switcher-pills {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
}
.checkout-plan-pill {
    text-align: center;
    padding: 7px 8px;
    font-size: 12px;
    font-weight: 600;
    color: #2a2f44;
    background: #fff;
    border: 1px solid #d4d8e4;
    border-radius: 6px;
    text-decoration: none;
    transition: all 0.12s;
}
.checkout-plan-pill:hover {
    border-color: #1a2744;
    color: #1a2744;
    text-decoration: none;
}
.checkout-plan-pill-active {
    background: #1a2744;
    color: #fff;
    border-color: #1a2744;
    cursor: default;
}
.checkout-plan-pill-active:hover {
    border-color: #1a2744;
    color: #fff;
}

/* When nested in .checkout-summary, testimonial blends as a section of
   the parent card rather than rendering as a card-within-card. Border-top
   separator matches the pattern used by .checkout-plan-switcher above it. */
.checkout-summary .testimonial-card {
    background: transparent;
    border: none;
    box-shadow: none;
    border-radius: 0;
    padding: 14px 0 0;
    margin-top: 14px;
    border-top: 1px solid #e4e6ef;
}

@media (max-width: 768px) {
  .checkout-layout {
    grid-template-columns: 1fr;
  }
  .checkout-summary {
    position: static;
    order: -1;  /* show plan summary above payment form on mobile */
  }
}

/* ─── Plan switcher (top of form card) ────────────────────────────────
   Each tab is an <a> — page reload required because each plan creates a
   different PaymentIntent server-side. Not a JS state change.
*/
.plan-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 0 0 22px;
}
.plan-tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 12px 8px;
  border: 1px solid #e0e6ed;
  border-radius: 8px;
  background: #fff;
  color: #4a5568;
  text-align: center;
  text-decoration: none;
  font-family: inherit;
  transition: border-color .15s, color .15s, background .15s, box-shadow .15s, transform .15s;
}
.plan-tab:hover {
  border-color: #c5cad6;
  color: #1a2744;
  text-decoration: none;
}
.plan-tab-name {
  font-size: 13.5px;
  font-weight: 700;
  line-height: 1.2;
}
.plan-tab-price {
  font-size: 12px;
  font-weight: 500;
  opacity: .75;
  line-height: 1.3;
}
.plan-tab.active {
  background: #1a2744;
  border-color: #1a2744;
  color: #fff;
  box-shadow: 0 4px 14px rgba(26, 39, 68, .22);
  transform: translateY(-1px);
}
.plan-tab.active .plan-tab-price { opacity: .85; }
.plan-tab-badge {
  display: inline-block;
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  background: #e8732a;
  color: #fff;
  padding: 2px 6px;
  border-radius: 3px;
  margin-top: 3px;
  line-height: 1.2;
}
@media (max-width: 480px) {
  .plan-tabs { grid-template-columns: 1fr; gap: 6px; }
  .plan-tab { flex-direction: row; justify-content: space-between; gap: 10px; padding: 11px 14px; }
  .plan-tab-badge { margin-top: 0; }
}

/* ─── Testimonial card (reusable partial) ─────────────────────────── */
.testimonial-card {
    background: #fff;
    border: 1px solid #e4e6ef;
    border-radius: 10px;
    padding: 16px 18px;
    box-shadow: 0 1px 3px rgba(0,0,0,.04);
}
.testimonial-stars { display: flex; gap: 2px; margin-bottom: 8px; }
.testimonial-quote {
    font-size: 13.5px;
    line-height: 1.55;
    color: #2a2f44;
    margin: 0 0 12px;
    font-style: italic;
}
.testimonial-author { display: flex; align-items: center; gap: 10px; }
.testimonial-avatar {
    width: 36px; height: 36px;
    border-radius: 50%;
    color: #fff;
    font-weight: 700;
    font-size: 13px;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
    letter-spacing: .02em;
}
.testimonial-avatar-navy   { background: #1a2744; }
.testimonial-avatar-orange { background: #e8732a; }
.testimonial-avatar-teal   { background: #0f7a60; }
.testimonial-avatar-purple { background: #7c3aed; }
.testimonial-name { font-size: 13px; font-weight: 600; color: #1a2744; }

/* ─── Signup 2-column layout (mirrors .checkout-layout, narrower) ──── */
.signup-layout {
    max-width: 1280px;
    margin: 32px auto 60px;
    padding: 0 20px;
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 36px;
    align-items: start;
}
.signup-layout .signup-form-card { margin: 0; max-width: none; }

.signup-aside {
    display: flex;
    flex-direction: column;
    gap: 14px;
    position: sticky;
    top: 24px;
}
.signup-aside-block {
    background: #fff;
    border: 1px solid #e4e6ef;
    border-radius: 10px;
    padding: 16px 18px;
}
.signup-aside-eyebrow {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .12em;
    color: #6b7299;
    margin-bottom: 8px;
}
.signup-aside-plan-name { font-size: 16px; font-weight: 700; color: #1a2744; margin-bottom: 6px; }
.signup-aside-plan-price { font-size: 24px; font-weight: 800; color: #1a1f2e; letter-spacing: -.4px; }
.signup-aside-plan-price span { font-size: 14px; font-weight: 500; color: #6b7299; margin-left: 2px; }
.signup-aside-plan-sub { font-size: 12px; color: #6b7299; margin-top: 4px; line-height: 1.45; }

.signup-aside-features { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 7px; }
.signup-aside-features li {
    position: relative;
    padding-left: 20px;
    font-size: 13px;
    color: #2a2f44;
    line-height: 1.4;
}
.signup-aside-features li::before {
    content: '✓'; position: absolute; left: 0; top: 0;
    color: #1e8a4a; font-weight: 700;
}

.signup-aside-trust {
    font-size: 11.5px;
    color: #6b7299;
    line-height: 1.6;
    padding: 0 4px;
}
.signup-aside-trust div {
    position: relative;
    padding: 2px 0 2px 18px;
}
.signup-aside-trust div::before {
    content: '✓';
    position: absolute;
    left: 0;
    top: 2px;
    color: #1e8a4a;
    font-weight: 800;
}

@media (max-width: 768px) {
    .signup-layout { grid-template-columns: 1fr; }
    .signup-aside { position: static; order: 1; }
    .signup-layout .signup-form-card { order: 0; }
}
