/* The parent account page. Brand tokens and the header live in styles.css. */

/* One step shows at a time. A class that sets display (like .auth-grid) must
   never undo the hidden attribute, or a finished step stays on the page. */
[hidden] { display: none !important; }

.account { max-width: 920px; padding-top: 8px; padding-bottom: 36px; }
.account h1 { font-size: clamp(32px, 5vw, 46px); }

.account-card {
  background: var(--mq-surface);
  border: var(--mq-border) solid var(--mq-ink);
  border-radius: var(--mq-radius);
  padding: 20px 18px 22px;
  margin: 0 0 18px;
}
.account-card h2 { font-size: clamp(24px, 3vw, 32px); }
.account-card h3 { margin-top: 1.1em; }
.account-card ul { padding-left: 22px; }
.account-card li { margin-bottom: 8px; }

.auth-grid { display: grid; gap: 18px; }
@media (min-width: 800px) {
  .auth-grid { grid-template-columns: 1fr 1fr; align-items: start; }
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 0 0 14px;
  font-weight: 700;
}
.field input,
.field select {
  font: inherit;
  font-weight: 400;
  color: var(--mq-ink);
  background: #fff;
  border: var(--mq-border) solid var(--mq-ink);
  border-radius: 14px;
  padding: 10px 14px;
  min-height: 48px;
  width: 100%;
}
.account select:focus-visible,
.account textarea:focus-visible {
  outline: 3px solid var(--mq-blue);
  outline-offset: 2px;
  border-radius: 4px;
}

.account button,
.account .btn { min-height: 44px; }
.account button.btn,
.account a.btn {
  width: 100%;
  text-align: center;
  cursor: pointer;
}
.account button.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

/* The Google button itself is google-button.css (a copy of the game's). Only the spacing is here. */
#google-btn { margin: 0 0 8px; }

.or {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 14px 0;
  color: var(--mq-locked-deep);
  font-size: 15px;
}
.or::before,
.or::after {
  content: '';
  flex: 1;
  height: 2px;
  background: var(--mq-locked-tint);
}

.text-btn {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin: 4px 12px 4px 0;
  padding: 8px 0;
  background: none;
  border: 0;
  color: var(--mq-blue-deep);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.row-actions { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 8px; }

.tick {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin: 0 0 12px;
  font-weight: 700;
  cursor: pointer;
}
.tick input {
  width: 22px;
  height: 22px;
  margin-top: 3px;
  flex: none;
}
.terms-tick { margin-top: 8px; }

.opt-boxes {
  margin: 16px 0 18px;
  padding: 12px 0 0;
  border-top: 3px solid var(--mq-gold);
}
.opt-heading { font-size: 20px; margin: 0 0 10px; }

.form-status { font-weight: 700; min-height: 0; margin: 0 0 8px; }
#account-error:not(:empty) { color: var(--mq-oops-deep); }
#unlock-error:not(:empty) { color: var(--mq-oops-deep); }
#game-error:not(:empty) { color: var(--mq-oops-deep); }
#account-status:not(:empty) { color: var(--mq-correct-deep); }

.hint { font-size: 15px; margin-top: 0; }
.lead-name { font-family: var(--mq-font-display); font-weight: 800; font-size: 28px; margin-bottom: 0; }
.play-link { margin-top: 8px; }

#reward-notice {
  background: var(--mq-gold-tint);
  border: var(--mq-border) solid var(--mq-ink);
  border-radius: var(--mq-radius);
  padding: 14px 16px;
  font-size: 16px;
}

@media (max-width: 480px) {
  .account-card { padding: 16px 14px 18px; }
  .account button.btn, .account a.btn { font-size: 17px; }
  /* Home and Open the game share the header with the logo on a phone. */
  .site-header .container { gap: 8px; }
  .site-header img { width: 36px; height: 36px; }
  .site-header .wordmark { display: none; }
  .site-header .btn { font-size: 16px; padding: 9px 14px; }
}

/* Unlock MathQuest (brief paywall, part B): two plans side by side on a wide
   screen, stacked on a phone. Calm: no badges, no "best value", no timers. */
.plans { display: grid; gap: 14px; margin: 14px 0; }
@media (min-width: 640px) {
  .plans { grid-template-columns: 1fr 1fr; }
}
.plan {
  border: var(--mq-border) solid var(--mq-ink);
  border-radius: var(--mq-radius);
  padding: 14px 16px 16px;
  background: var(--mq-cream);
}
.plan h3 { margin: 0 0 4px; }
.plan-price {
  font-family: var(--mq-font-display);
  font-weight: 800;
  font-size: 32px;
  margin: 0 0 4px;
}
.plan-price span { font-size: 18px; font-weight: 700; }
.unlock-lead {
  font-family: var(--mq-font-display);
  font-weight: 800;
  font-size: 22px;
  margin-bottom: 6px;
}
.unlock-note {
  background: var(--mq-gold-tint);
  border: var(--mq-border) solid var(--mq-ink);
  border-radius: var(--mq-radius);
  padding: 12px 14px;
}
#unlock-signin-note { font-weight: 700; }

/* Opened from the Google Play app (play-app.js, brief website-from-play-app): no prices, no Stripe
   checkout and no Stripe portal on this visit. account.js also hides the unlock section unless the
   account is unlocked; these rules are the backstop. */
html.mq-play-app #unlock-plans,
html.mq-play-app #manage-btn,
html.mq-play-app #manage-hint,
html.mq-play-app #unlock-past-due,
html.mq-play-app #receipts-btn,
html.mq-play-app #notice-prices { display: none !important; }
