/*
 * WellRooted — member area + auth styles.
 *
 * Same design tokens as the landing page, redeclared here because the two
 * stylesheets load independently (the app page has no landing.css).
 * Everything is scoped under .wr-app / .wr-login / .wr-modal.
 */

.wr-app, .wr-login, .wr-modal {
  --wr-teal-deep:#123B3B;
  --wr-teal-mid:#1F5757;
  --wr-blue-trust:#2C6E8E;
  --wr-mint-light:#E4F1EC;
  --wr-cream:#FAFAF7;
  --wr-coral:#FF7E5F;
  --wr-coral-dark:#E85F40;
  --wr-ink:#132323;
  --wr-ink-soft:#4B615E;
  --wr-line:#CFE0DA;
  --wr-radius:18px;
  --wr-font-body:Inter, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, Poppins, sans-serif;
  --wr-font-display:var(--wr-font-body);
  --wr-maxw:1280px;
  --wr-gutter:20px;

  font-family:var(--wr-font-body);
  color: var(--wr-ink);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* This file needs its own box-sizing reset. landing.css scopes its reset to
   :where(#wr-landing), and the modal is appended to <body>, outside that
   subtree — so a full-width button inherited content-box and its 30px padding
   plus 1.5px border pushed it 63px past the panel's edge. */
.wr-app, .wr-login, .wr-modal,
.wr-app *, .wr-login *, .wr-modal * { box-sizing: border-box; }

.wr-app h1, .wr-app h2, .wr-app h3,
.wr-login h1, .wr-modal__title {
  font-family:var(--wr-font-display);
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 0;
}

.wr-eyebrow {
  display:block; font-size:13px; font-weight:600; letter-spacing:0.14em;
  text-transform:uppercase; color:var(--wr-blue-trust);
}

/* ── Buttons ──────────────────────────────────────────────────────────────── */

.wr-btn {
  display:inline-flex; align-items:center; justify-content:center; gap:8px;
  padding:15px 30px; border-radius:100px; border:1.5px solid transparent;
  font-weight:600; font-size:15.5px; line-height:1; font-family:var(--wr-font-body); cursor:pointer; text-decoration:none;
  transition:transform .2s ease, box-shadow .2s ease, background .2s ease;
}
.wr-btn--primary {
  background:var(--wr-coral); color:#fff;
  box-shadow:0 8px 24px -8px rgba(232,95,64,0.55);
}
.wr-btn--primary:hover:not(:disabled) { background:var(--wr-coral-dark); transform:translateY(-2px); }
.wr-btn--ghost {
  background:transparent; color:var(--wr-teal-deep); border-color:var(--wr-teal-deep);
}
.wr-btn--ghost:hover:not(:disabled) { background:var(--wr-teal-deep); color:#fff; }
.wr-btn:disabled { opacity:.45; cursor:not-allowed; transform:none; box-shadow:none; }

.wr-linkbtn {
  background:none; border:0; padding:0; cursor:pointer;
  font-weight:500; font-size:14px; line-height:normal; font-family:var(--wr-font-body); color:var(--wr-blue-trust); text-decoration:underline;
}
.wr-linkbtn:disabled { color:var(--wr-ink-soft); cursor:default; text-decoration:none; }

/* ── App shell ────────────────────────────────────────────────────────────── */

.wr-app { background:var(--wr-cream); min-height:100vh; }

.wr-app__bar {
  display:flex; align-items:center; justify-content:space-between;
  padding:16px var(--wr-gutter); border-bottom:1px solid var(--wr-line); background:rgba(250,250,247,.9);
  backdrop-filter:blur(10px); position:sticky; top:0; z-index:20;
}
.wr-app__logo {
  display:flex; align-items:center; gap:10px; text-decoration:none;
  font-family:var(--wr-font-display); font-size:19px; font-weight:600; color:var(--wr-teal-deep);
}
.wr-app__logo img { width:28px; height:28px; object-fit:contain; }

.wr-app__main { max-width:var(--wr-maxw); margin:0 auto; padding:40px var(--wr-gutter) 80px; }
.wr-app__greeting { font-size:32px; margin:6px 0 28px; color:var(--wr-teal-deep); }

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

.wr-card {
  background:#fff; border:1px solid var(--wr-line); border-radius:var(--wr-radius);
  padding:26px 28px;
}
.wr-card__head { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:10px; }
.wr-card__head h2 { font-size:20px; color:var(--wr-teal-deep); }
.wr-card__msg { margin:0 0 18px; color:var(--wr-ink-soft); font-size:15px; }
.wr-card__msg--warn { color:var(--wr-coral-dark); font-weight:500; }

.wr-card--session { border-left:4px solid var(--wr-coral); }

.wr-chip {
  display:inline-block; background:var(--wr-mint-light); color:var(--wr-teal-mid);
  font-size:12.5px; font-weight:600; padding:6px 14px; border-radius:100px;
}
.wr-countdown { margin:12px 0 0; font-size:13.5px; color:var(--wr-ink-soft); }

.wr-grid {
  display:grid; grid-template-columns:repeat(auto-fit, minmax(220px, 1fr));
  gap:20px; margin:24px 0 44px;
}
.wr-card--stat { display:flex; flex-direction:column; gap:6px; }
.wr-stat__label { font-size:12.5px; font-weight:600; letter-spacing:.1em; text-transform:uppercase; color:var(--wr-ink-soft); }
.wr-stat__value { font-family:var(--wr-font-display); font-size:28px; font-weight:600; color:var(--wr-teal-deep); }
.wr-stat__value--link { color:var(--wr-blue-trust); text-decoration:none; font-size:22px; }
.wr-stat__sub { font-size:13.5px; color:var(--wr-ink-soft); }

/* ── Plans ────────────────────────────────────────────────────────────────── */

.wr-plans__title { font-size:26px; color:var(--wr-teal-deep); margin-bottom:6px; }
.wr-plans__lead { color:var(--wr-ink-soft); margin:0 0 26px; }

.wr-plans__grid { display:grid; grid-template-columns:repeat(auto-fit, minmax(260px, 1fr)); gap:22px; }

.wr-plan {
  position:relative; background:#fff; border:1px solid var(--wr-line); border-radius:20px;
  padding:30px 26px; display:flex; flex-direction:column;
  transition:transform .2s ease, box-shadow .2s ease;
}
.wr-plan:hover { transform:translateY(-6px); box-shadow:0 18px 40px -22px rgba(18,59,59,.45); }
.wr-plan--featured { border-color:var(--wr-teal-deep); border-width:2px; }
.wr-plan__badge {
  position:absolute; top:-13px; left:50%; transform:translateX(-50%);
  background:var(--wr-teal-deep); color:#fff; font-size:11.5px; font-weight:600;
  letter-spacing:.06em; padding:6px 16px; border-radius:100px; white-space:nowrap;
}
.wr-plan__name { font-size:22px; color:var(--wr-teal-deep); margin-bottom:12px; }
.wr-plan__price { display:flex; align-items:baseline; gap:10px; flex-wrap:wrap; margin:0 0 18px; }
.wr-plan__price s { color:#9AAFAB; font-size:15px; }
.wr-plan__price strong { font-family:var(--wr-font-display); font-size:34px; color:var(--wr-teal-deep); }
.wr-plan__off {
  background:#FDE4E0; color:var(--wr-coral-dark); font-size:12px; font-weight:600;
  padding:4px 10px; border-radius:100px;
}
.wr-plan__features { list-style:none; margin:0 0 24px; padding:0; flex:1; }
.wr-plan__features li {
  position:relative; padding:6px 0 6px 24px; font-size:14.5px; color:var(--wr-ink-soft);
}
.wr-plan__features li::before {
  content:"✓"; position:absolute; left:0; color:var(--wr-coral); font-weight:700;
}

/* ── Meeting ──────────────────────────────────────────────────────────────── */

body.wr-in-call { overflow:hidden; }
.wr-meeting { position:fixed; inset:0; z-index:9999; background:#0D2E2E; display:flex; flex-direction:column; }
.wr-meeting__bar { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:12px 20px; }
.wr-meeting__bar .wr-btn { padding:9px 20px; font-size:14px; color:#fff; border-color:rgba(255,255,255,.5); }
.wr-meeting__bar .wr-btn:hover { background:#fff; color:var(--wr-teal-deep); }
#wr-meeting-frame { flex:1; min-height:0; }

/* ── Login / auth ─────────────────────────────────────────────────────────── */

.wr-app--auth { display:flex; flex-direction:column; align-items:center; justify-content:center; gap:20px; padding:40px 20px; }

.wr-login {
  width:100%; max-width:420px; background:#fff; border:1px solid var(--wr-line);
  border-radius:22px; padding:36px 32px; text-align:center;
}
.wr-login__logo {
  display:inline-flex; align-items:center; gap:10px; text-decoration:none; margin-bottom:22px;
  font-family:var(--wr-font-display); font-size:20px; font-weight:600; color:var(--wr-teal-deep);
}
.wr-login__title { font-size:26px; color:var(--wr-teal-deep); margin-bottom:8px; }
.wr-login__lead { color:var(--wr-ink-soft); font-size:14.5px; margin:0 0 24px; }
.wr-login__foot { margin:20px 0 0; font-size:13px; color:var(--wr-ink-soft); }
.wr-login__actions { display:flex; justify-content:center; gap:20px; margin-top:16px; }
.wr-login .wr-btn { width:100%; }
/* Two full-width CTAs stacked (e.g. the expired-membership notice) — the
   lone single-button steps above never needed vertical spacing between them. */
.wr-login__cta-group { display:flex; flex-direction:column; gap:12px; margin-top:4px; }

/* ── Renew/change-plan picker (expired-notice.php) ───────────────────────────
   A compact left-hand list to pick a plan + a right-hand detail pane, next to
   the .wr-login card rather than inside it — .wr-login's 420px max-width is
   sized for a single OTP/message card, not a two-column picker. */
.wr-renew {
  width:100%; max-width:820px; background:#fff; border:1px solid var(--wr-line);
  border-radius:var(--wr-radius); padding:30px; text-align:left;
  display:flex; gap:28px; align-items:flex-start;
}
.wr-renew__list { flex:0 0 30%; display:flex; flex-direction:column; gap:10px; }
.wr-renew__detail { flex:1; min-width:0; }
.wr-pick {
  display:block; width:100%; text-align:left; background:#fff; border:1.5px solid var(--wr-line);
  border-radius:14px; padding:14px 16px; cursor:pointer; font-family:var(--wr-font-body);
  transition:border-color .15s ease, box-shadow .15s ease;
}
.wr-pick:hover { border-color:var(--wr-teal-mid); }
.wr-pick.is-selected { border-color:var(--wr-teal-deep); border-width:2px; box-shadow:0 8px 20px -14px rgba(18,59,59,.5); }
.wr-pick__name { display:block; font-weight:600; color:var(--wr-teal-deep); font-size:15px; }
.wr-pick__price { display:block; font-size:13.5px; color:var(--wr-ink-soft); margin-top:2px; }
.wr-renew__detail .wr-btn { width:100%; margin-top:18px; }

.wr-field { display:block; text-align:left; margin-bottom:18px; }
.wr-field > span {
  display:block; font-size:13px; font-weight:600; color:var(--wr-ink-soft); margin-bottom:7px;
}
.wr-field input {
  width:100%; padding:14px 16px; border:1.5px solid var(--wr-line); border-radius:14px;
  font-weight:400; font-size:15px; line-height:normal; font-family:var(--wr-font-body); color:var(--wr-ink); background:#fff; box-sizing:border-box;
}
.wr-field input:focus { outline:none; border-color:var(--wr-blue-trust); }

.wr-phone { display:flex; align-items:stretch; gap:8px; }
.wr-phone__cc {
  display:flex; align-items:center; padding:0 14px; border:1.5px solid var(--wr-line);
  border-radius:14px; background:var(--wr-mint-light); font-size:14.5px; font-weight:600;
  color:var(--wr-teal-mid); white-space:nowrap;
}
.wr-phone input { flex:1; min-width:0; }

.otp-boxes { display:flex; gap:8px; justify-content:center; margin-bottom:16px; }
.otp-box {
  width:46px; height:54px; text-align:center; border:1.5px solid var(--wr-line);
  border-radius:14px; font-weight:600; font-size:22px; line-height:normal; font-family:var(--wr-font-body); color:var(--wr-teal-deep); background:#fff;
}
.otp-box:focus { outline:none; border-color:var(--wr-blue-trust); }

.otp-timer { font-size:13px; color:var(--wr-ink-soft); margin:0 0 12px; }
.otp-timer--red { color:var(--wr-coral-dark); font-weight:600; }

.wr-msg { font-size:13.5px; margin:0 0 14px; padding:10px 14px; border-radius:12px; text-align:left; }
.wr-msg.is-error   { background:#FDE4E0; color:#E15C4E; }
.wr-msg.is-success { background:#E4F1EC; color:#2E9E6B; }

/* ── Register modal ───────────────────────────────────────────────────────── */

.wr-modal { position:fixed; inset:0; z-index:9998; display:none; }
.wr-modal.is-open {
  /* Flex-centred rather than a top margin: the panel now varies in height
     between steps (a form is much taller than a thank-you), and a fixed 8vh
     top margin left the short steps floating high and the tall ones clipped. */
  display:flex;
  align-items:center;
  justify-content:center;
  padding:24px;
}
.wr-modal__backdrop { position:absolute; inset:0; background:rgba(18,59,59,.55); backdrop-filter:blur(3px); }
.wr-modal__panel {
  position:relative;
  width:100%; max-width:430px;
  background:#fff;
  border-radius:28px;
  padding:44px 32px 36px;
  /* Fill the viewport rather than shrink-wrapping: a consistent tall panel
     stops the modal resizing under the reader as they move between steps,
     and gives the copy room to breathe. */
  height:100%;
  max-height:calc(100vh - 48px);
  overflow-y:auto;
  display:flex;
  flex-direction:column;
  justify-content:center;
  box-shadow:0 30px 70px -30px rgba(18,59,59,.6);
}
.wr-modal__close {
  position:absolute; top:16px; right:18px; background:none; border:0; cursor:pointer;
  font-size:26px; line-height:1; color:var(--wr-ink-soft);
  width:34px; height:34px; border-radius:50%;
  display:flex; align-items:center; justify-content:center;
}
.wr-modal__close:hover { background:var(--wr-mint-light); color:var(--wr-teal-deep); }
.wr-modal__title { font-size:25px; color:var(--wr-teal-deep); margin-bottom:8px; }
.wr-modal__lead { color:var(--wr-ink-soft); font-size:14.5px; margin:0 0 24px; }
.wr-modal__hint { font-size:13px; margin:14px 0 0; opacity:.75; }
.wr-modal__error {
  background:#FDE4E0; color:#E15C4E; font-size:13.5px; padding:10px 14px;
  border-radius:12px; margin:0 0 14px;
}
/* Payment outcome. Three states share the layout; only the mark changes. */
.wr-result { text-align:center; }
.wr-result__mark {
  width:56px; height:56px; margin:0 auto 18px;
  border-radius:50%;
  display:flex; align-items:center; justify-content:center;
  font-size:30px; font-weight:700; line-height:1;
}
.wr-result--ok   .wr-result__mark { background:#E4F1EC; color:#2E9E6B; }
.wr-result--warn .wr-result__mark { background:#FFF3D6; color:#B8860B; }
.wr-result--fail .wr-result__mark { background:#FDE4E0; color:#E15C4E; }

.wr-result .wr-modal__lead { margin-bottom:18px; }
.wr-result__meta {
  text-align:left; margin:0 0 20px;
  border:1px solid var(--wr-line); border-radius:14px;
  background:var(--wr-cream); padding:6px 16px;
}
.wr-result__meta > div {
  display:flex; align-items:baseline; justify-content:space-between; gap:12px;
  padding:9px 0;
  border-bottom:1px solid var(--wr-line);
}
.wr-result__meta > div:last-child { border-bottom:0; }
.wr-result__meta dt { font-size:13px; color:var(--wr-ink-soft); margin:0; }
.wr-result__meta dd { margin:0; font-size:14px; font-weight:600; color:var(--wr-teal-deep); }
.wr-result__meta code { font-family:ui-monospace, SFMono-Regular, Menlo, monospace; font-size:12.5px; }
.wr-result__dismiss { margin-top:16px; }

/* Order summary shown behind the Razorpay sheet. */
.wr-order {
  border:1px solid var(--wr-line);
  border-radius:var(--wr-radius);
  background:var(--wr-cream);
  padding:20px 22px;
  margin:0 0 20px;
}
.wr-order__head {
  display:flex; align-items:flex-start; justify-content:space-between; gap:12px;
  margin-bottom:14px;
}
.wr-order__name { font-size:19px; font-weight:600; color:var(--wr-teal-deep); }
.wr-order__meta { font-size:13px; color:var(--wr-ink-soft); margin-top:2px; }
.wr-order__badge {
  flex:0 0 auto;
  background:var(--wr-teal-deep); color:#fff;
  font-size:11px; font-weight:700; letter-spacing:.05em;
  padding:5px 10px; border-radius:100px; white-space:nowrap;
}
.wr-order__features { list-style:none; margin:0 0 16px; padding:0; }
.wr-order__features li {
  position:relative; padding:5px 0 5px 22px;
  font-size:14px; color:var(--wr-ink-soft);
}
.wr-order__features li::before {
  content:"✓"; position:absolute; left:0; top:5px;
  color:var(--wr-coral); font-weight:700;
}
.wr-order__total {
  display:flex; align-items:baseline; justify-content:space-between; gap:12px;
  padding-top:14px; border-top:1px solid var(--wr-line);
  font-size:14px; color:var(--wr-ink-soft);
}
.wr-order__amount { font-size:24px; font-weight:600; color:var(--wr-teal-deep); }
.wr-order__amount s { font-size:15px; font-weight:400; color:#9AAFAB; margin-right:6px; }
.wr-order__save {
  margin-top:8px; text-align:right;
  font-size:12.5px; font-weight:600; color:var(--wr-coral-dark);
}

/* The summary can be long; let it scroll rather than push the panel taller
   than the sheet Razorpay slides over it. */
.wr-modal__body { overflow-y:auto; }

.wr-modal .wr-btn { width:100%; }
.wr-modal .wr-resend { display:block; margin:14px auto 0; }

/* ── Responsive ───────────────────────────────────────────────────────────── */

@media (max-width:700px) {
  /* This file declares its own tokens (see the header note), so landing.css's
     narrower mobile gutter cannot reach here — a local definition beats an
     inherited one. Repeat it against the same selector. */
  .wr-app, .wr-login, .wr-modal { --wr-gutter:16px; }

  .wr-app__main { padding:28px var(--wr-gutter) 64px; }
  .wr-app__greeting { font-size:26px; }
  .wr-modal.is-open { padding:0; }
  /* dvh, not vh: on mobile Safari and Chrome, vh counts the area behind the
     collapsing address bar, so a 100vh sheet is taller than the screen and
     the submit button sits below the fold on first paint. */
  .wr-modal__panel {
    border-radius:0;
    max-width:none;
    height:100vh; max-height:100vh;
    height:100dvh; max-height:100dvh;
    padding:52px 20px 32px;
    justify-content:flex-start;
  }
  .otp-box { width:40px; height:48px; font-size:19px; }

  .wr-renew { flex-direction:column; padding:22px; }
  .wr-renew__list { flex-direction:row; width:100%; overflow-x:auto; padding-bottom:4px; }
  .wr-pick { flex:0 0 160px; }
}

@media (prefers-reduced-motion: reduce) {
  .wr-app *, .wr-login *, .wr-modal * { transition:none !important; }
}
