/* /rewards/css/signup.css, styles for _signup_partial.php (signup form + verify modal). */

/* All rewards-form styles live under .pb-rewards so they don't fight the Joomla
   template's defaults. CSS variables are declared on the wrapper, cascade inside. */
.pb-rewards {
  --bg: #fdf8f4;
  --ink: #2b1d10;
  --muted: #6b5b4a;
  --line: #e6dcce;
  --accent: #cb333b;
  --accent-ink: #ffffff;
  --error: #b3261e;
  --success: #1c6e3d;
  background: #fdf8f4;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.45;
  color: var(--ink);
}
.pb-rewards, .pb-rewards * { box-sizing: border-box; }
.pb-rewards .pb-main {
  width: 100%;
  max-width: 420px;
  margin: 0 auto;
  padding: 32px 0 48px;
}
.pb-rewards h1 {
  font-size: clamp(2.5rem, 7vw, 3.5rem);
  margin: 8px 0 12px;
  letter-spacing: -0.01em;
  line-height: 1.05;
}
/* Rewards-area headings: default sans-serif, bold, brand red. Druk Medium +
   uppercase was previously applied — dropped per design call, replaced with
   plain bold + #cb333b. The .belguri override below stays because the class
   is used independently to opt specific spans into the script face. */
.pb-rewards h1,
.pb-rewards h2,
.pb-rewards h3,
.pb-rewards h4,
.pb-rewards h5,
.pb-rewards h6 {
  font-weight: 700;
  color: #cb333b;
}
.pb-rewards h1 .belguri,
.pb-rewards h2 .belguri,
.pb-rewards h3 .belguri {
  text-transform: none;
  letter-spacing: 0;
  font-weight: normal;
}
/* Image-as-h1 logo (PaperBakes-rewards.webp). Resets the type rules inherited
   from the .pb-rewards h1 selector above, sizes the image responsively, and
   removes the baseline gap a default inline img leaves below itself. */
.pb-rewards .pb-rewards-logo {
  margin: 8px auto 16px;
  text-align: center;
  font-size: 0;
  line-height: 1;
  letter-spacing: 0;
}
.pb-rewards .pb-rewards-logo img {
  display: block;
  margin: 0 auto;
  width: clamp(144px, 36vw, 224px);
  height: auto;
  max-width: 100%;
}
.pb-rewards .lede {
  color: var(--muted);
  font-size: 0.95rem;
  margin: 0 0 24px;
}
.pb-rewards label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  margin: 16px 0 6px;
  color: var(--ink);
}
.pb-rewards .hint {
  display: block;
  font-size: 0.78rem;
  color: var(--muted);
  margin-top: 4px;
}
.pb-rewards input[type="tel"],
.pb-rewards input[type="text"],
.pb-rewards input[type="email"],
.pb-rewards input[type="date"] {
  width: 100%;
  padding: 12px 14px;
  font-size: 1rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  -webkit-appearance: none;
  appearance: none;
  font-family: inherit;
}
.pb-rewards input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(184, 116, 59, 0.15);
}
/* Phone field is a flex row: [+65 prefix] [input]. The prefix is a real flex child,
   so the input's text physically can't overlap it. Border + background move from the
   input onto the wrapper so the two read as a single field. */
.pb-rewards .phone-input {
  display: flex;
  align-items: stretch;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
}
.pb-rewards .phone-input:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(184, 116, 59, 0.15);
}
.pb-rewards .phone-prefix {
  display: flex;
  align-items: center;
  padding: 0 4px 0 14px;
  color: var(--muted);
  font-size: 1rem;
  user-select: none;
  font-variant-numeric: tabular-nums;
  flex-shrink: 0;
  white-space: nowrap;
}
/* Input inside .phone-input: strip its own border/bg so the wrapper owns the chrome.
   !important defends against SP Page Builder + Helix's form-input rules. */
.pb-rewards .phone-input input[type="tel"] {
  border: none !important;
  background: transparent !important;
  box-shadow: none !important;
  padding: 12px 14px 12px 4px !important;
  flex: 1;
  width: auto;
  letter-spacing: 0.5px;
}
.pb-rewards .phone-input input[type="tel"]:focus {
  border: none !important;
  box-shadow: none !important;
}
.pb-rewards .consent {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 20px 0 8px;
  font-size: 0.9rem;
  color: var(--ink);
}
.pb-rewards .consent input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  flex-shrink: 0;
  accent-color: var(--accent);
}
.pb-rewards .consent label { font-weight: 400; margin: 0; }
.pb-rewards .consent a {
  color: var(--accent);
  text-decoration: underline;
}
.pb-rewards .turnstile-wrap {
  margin-top: 20px;
  min-height: 65px;
}
.pb-rewards button {
  width: 100%;
  margin-top: 20px;
  padding: 14px 16px;
  font-size: 1rem;
  font-weight: 600;
  border: none;
  border-radius: 8px;
  background: var(--accent);
  color: var(--accent-ink);
  cursor: pointer;
  transition: opacity 0.15s;
  font-family: inherit;
}
.pb-rewards button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}
.pb-rewards .alert {
  margin: 16px 0 0;
  padding: 12px 14px;
  border-radius: 8px;
  font-size: 0.9rem;
  display: none;
}
.pb-rewards .alert.error {
  background: #fdecea;
  color: var(--error);
  border: 1px solid #f4c7c3;
  display: block;
}
.pb-rewards .alert.success {
  background: #e8f5ed;
  color: var(--success);
  border: 1px solid #c1e3cf;
  display: block;
}
.pb-rewards .optional-tag {
  font-weight: 400;
  color: var(--muted);
  font-size: 0.78rem;
  margin-left: 4px;
}
.pb-rewards .req {
  color: var(--error);
  margin-left: 2px;
  font-weight: 700;
}

/* Verify-OTP modal, uses position:fixed so it covers the viewport regardless of
   where it lives in the DOM. The .pb-rewards prefix here is for CSS scoping, not
   containment. */
.pb-rewards .modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.pb-rewards .modal[hidden] { display: none; }
.pb-rewards .modal-backdrop {
  position: absolute;
  inset: 0;
  z-index: 0;
  background: rgba(43, 29, 16, 0.55);
}
.pb-rewards .modal-card {
  position: relative;
  z-index: 1;
  background: var(--bg);
  border-radius: 12px;
  padding: 28px 24px 24px;
  max-width: 380px;
  width: 100%;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
}
.pb-rewards .modal-card h2 {
  font-size: clamp(1.75rem, 5vw, 2.5rem);
  margin: 0 0 10px;
  letter-spacing: -0.01em;
  line-height: 1.1;
}
.pb-rewards .modal-card .lede { margin: 0 0 16px; }
.pb-rewards .recipient {
  background: #fbf0e2;
  border: 1px solid #ecd9bb;
  border-radius: 8px;
  padding: 10px 14px;
  margin: 0 0 16px;
  font-size: 0.9rem;
}
.pb-rewards .recipient strong { font-weight: 600; letter-spacing: 0.5px; }
.pb-rewards .code-input {
  width: 100%;
  padding: 14px 16px;
  font-size: 1.6rem;
  letter-spacing: 0.5em;
  text-align: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  font-family: inherit;
  -webkit-appearance: none;
  appearance: none;
}
.pb-rewards .code-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(184, 116, 59, 0.15);
}
.pb-rewards .resend-row {
  margin-top: 16px;
  text-align: center;
  font-size: 0.9rem;
  color: var(--muted);
}
.pb-rewards .resend-row .link-btn {
  background: none;
  color: var(--accent);
  font-weight: 600;
  padding: 4px 8px;
  width: auto;
  margin: 0;
  border: none;
  text-decoration: underline;
  cursor: pointer;
  font-size: 0.9rem;
}
.pb-rewards .resend-row .link-btn:disabled {
  color: var(--muted);
  text-decoration: none;
  cursor: not-allowed;
  opacity: 1;
}
.pb-rewards .check {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--success);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  font-weight: 700;
  margin: 8px auto 12px;
}
/* Compact variant for the login / password-reset success state. The signup
   success state keeps the full-size check (it's a bigger moment). */
.pb-rewards .check--sm {
  width: 36px;
  height: 36px;
  font-size: 1.1rem;
  margin: 4px auto 10px;
}
.pb-rewards .modal-success { text-align: center; }
/* Email-confirm reminder shown on the signup-verify success step when the
   customer opted in to marketing — drives them to click the verify-email
   link we just sent. Brand-red callout, sized up + bold to read as a clear
   action item rather than a subtle hint. */
.pb-rewards .verify-email-note {
  margin: 18px 0 6px;
  padding: 14px 16px;
  background: #fbe9ea;
  border: 1px solid #f0e2d7;
  border-radius: 10px;
  font-size: 1rem;
  font-weight: 600;
  color: #cb333b;
  line-height: 1.45;
  text-align: center;
}
.pb-rewards .verify-email-note[hidden] { display: none; }
/* Customer name eyebrow in the login / password-reset success state — sits
   ABOVE the "Welcome back!" heading so the name reads first. Acts like a small
   supertitle so the title still owns visual weight. */
.pb-rewards .login-success-name {
  margin: 0 0 2px;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.pb-rewards .login-success-name[hidden] { display: none; }
/* When a name is shown, pull the "Welcome back!" closer so they read as a
   two-line pair instead of two separate blocks. */
.pb-rewards .modal-success .login-success-name + h2 { margin-top: 0; }

/* Inline field-level error (e.g. "Passwords don't match" under the confirm input).
   Sits between the input and the next field, not the page-level .alert. */
.pb-rewards .field-error {
  display: block;
  color: var(--error);
  font-size: 0.82rem;
  margin-top: 6px;
}
.pb-rewards .field-error[hidden] { display: none; }

/* Modal sub-states (login → forgot-request → forgot-verify → success). One card,
   four blocks; js/index.js flips [hidden] on each. */
.pb-rewards .modal-state[hidden] { display: none; }

/* Generic link-button, text styled as a link, behaves as a button. Used inside
   the login modal ("Forgot password?", "Back to login") AND inside .resend-row.
   The .resend-row override above pins font-size; this one is the base. */
.pb-rewards .link-btn {
  background: none;
  color: var(--accent);
  font-weight: 600;
  padding: 4px 8px;
  width: auto;
  margin: 0;
  border: none;
  text-decoration: underline;
  cursor: pointer;
  font-size: 0.9rem;
}
.pb-rewards .link-btn:disabled {
  color: var(--muted);
  text-decoration: none;
  cursor: not-allowed;
  opacity: 1;
}
.pb-rewards .modal-meta-row {
  margin-top: 14px;
  text-align: center;
  font-size: 0.9rem;
}

/* Modal close-X, only used on the login modal (verify-OTP modal during signup
   stays modal-locked until verified). */
.pb-rewards .modal-close {
  position: absolute;
  top: 8px;
  right: 12px;
  width: auto;
  margin: 0;
  padding: 4px 10px;
  background: none;
  color: var(--muted);
  font-size: 1.6rem;
  line-height: 1;
  font-weight: 400;
  border: none;
  cursor: pointer;
}
.pb-rewards .modal-close:hover { color: var(--ink); }

/* Disabled "Join PaperBakes Rewards" CTA on the landing page, visually present
   but inactive until the program officially opens. The .btn-sub stacks below the
   primary label. */
.pb-rewards .btn-disabled,
.pb-rewards .btn-disabled:hover {
  background: #e6dcce;
  color: var(--muted);
  cursor: not-allowed;
  opacity: 1;
}
.pb-rewards .btn-sub {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-top: 4px;
  opacity: 0.85;
}

/* Referral-code card, shown in the verify-OTP success state (signup) and in the
   login modal's "you're back in" state. */
.pb-rewards .referral-card {
  margin: 16px auto;
  padding: 14px 18px;
  background: #fbf0e2;
  border: 1px solid #ecd9bb;
  border-radius: 10px;
  text-align: center;
  max-width: 260px;
}
.pb-rewards .referral-label {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}
.pb-rewards .referral-code {
  display: block;
  font-size: 1.8rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--ink);
  margin: 6px 0 4px;
  font-variant-numeric: tabular-nums;
}
.pb-rewards .referral-sub {
  display: block;
  font-size: 0.78rem;
  color: var(--muted);
}

/* Password input, same chrome as text/email/etc; declared explicitly because the
   list above doesn't include type="password". */
.pb-rewards input[type="password"] {
  width: 100%;
  padding: 12px 14px;
  font-size: 1rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  -webkit-appearance: none;
  appearance: none;
  font-family: inherit;
}
