/* ===========================================================
   Refer & Earn wizard (refer.php)
   Layers on assets/css/style.css — reuses its variables,
   .btn, .form-control, .form-grid, .form-msg and .spinner.
   =========================================================== */

/* ---- Hero ---- */
.refer-hero {
  background: linear-gradient(135deg, var(--blue-900), var(--blue-700) 60%, var(--blue-600));
  color: #fff;
  padding: 5.5rem 0 3.5rem;
  text-align: center;
}
.refer-hero h1 { color: #fff; font-size: clamp(1.9rem, 4.2vw, 3rem); margin-bottom: .9rem; }
.refer-hero .lead { max-width: 640px; margin: 0 auto; opacity: .92; font-size: 1.06rem; }
.refer-hero .kicker.light {
  display: inline-block; color: var(--orange); background: rgba(255, 122, 0, .14);
  border: 1px solid rgba(255, 122, 0, .35); padding: .3rem .9rem; border-radius: 30px;
  font-size: .78rem; font-weight: 700; letter-spacing: .09em; text-transform: uppercase;
  margin-bottom: 1.1rem;
}
.refer-hero-stats {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 1rem; margin-top: 2.4rem;
}
.refer-hero-stats > div {
  background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .16);
  border-radius: var(--radius-sm); padding: 1rem 1.6rem; min-width: 170px;
}
.refer-hero-stats strong { display: block; font-size: 1.5rem; color: var(--orange); font-weight: 800; }
.refer-hero-stats span { font-size: .84rem; opacity: .85; }

/* ---- Wizard shell ---- */
.refer-wizard { background: var(--bg-soft); padding: 3.5rem 0 5rem; }
.container-narrow { max-width: 820px; }

.wiz-steps {
  display: flex; flex-wrap: wrap; gap: .5rem; list-style: none;
  margin: 0 0 2rem; padding: 0; counter-reset: none;
}
.wiz-steps li {
  flex: 1 1 150px; display: flex; align-items: center; gap: .55rem;
  font-size: .84rem; font-weight: 600; color: var(--muted);
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: .65rem .85rem; transition: all .25s var(--ease);
}
.wiz-steps li .n {
  display: grid; place-items: center; width: 24px; height: 24px; flex: 0 0 24px;
  border-radius: 50%; background: var(--bg-soft); border: 1px solid var(--line);
  font-size: .78rem; font-weight: 700;
}
.wiz-steps li.current { color: var(--blue-700); border-color: var(--blue-500); box-shadow: var(--shadow-sm); }
.wiz-steps li.current .n { background: var(--blue-600); border-color: var(--blue-600); color: #fff; }
.wiz-steps li.done { color: var(--blue-700); border-color: #bcd6f5; }
.wiz-steps li.done .n { background: var(--orange); border-color: var(--orange); color: #fff; }
.wiz-steps li.done .n::after { content: "✓"; }
.wiz-steps li.done .n { font-size: 0; }
.wiz-steps li.done .n::after { font-size: .8rem; }

/* ---- Panels ---- */
.wiz-panel { display: none; background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow); padding: 2.2rem; }
.wiz-panel.active { display: block; animation: wizIn .35s var(--ease); }
@keyframes wizIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.wiz-panel h2 { font-size: 1.45rem; margin-bottom: .35rem; }
.wiz-sub { color: var(--muted); margin-bottom: 1.6rem; }
.wiz-foot { margin-top: 1.6rem; font-size: .9rem; color: var(--muted); text-align: center; }
.wiz-back {
  background: none; border: 0; color: var(--blue-600); font: inherit; font-size: .88rem;
  font-weight: 600; cursor: pointer; padding: 0; margin-bottom: 1rem;
}
.wiz-back:hover { color: var(--orange); }

/* ---- Step 1: intent cards ---- */
.choice-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1.1rem; }
.choice {
  text-align: left; background: #fff; border: 2px solid var(--line); border-radius: var(--radius);
  padding: 1.6rem; cursor: pointer; font: inherit; color: var(--ink);
  transition: all .25s var(--ease); display: flex; flex-direction: column; gap: .5rem;
}
.choice:hover { border-color: var(--blue-500); transform: translateY(-3px); box-shadow: var(--shadow); }
.choice-ico { font-size: 1.9rem; line-height: 1; }
.choice strong { font-size: 1.08rem; color: var(--blue-900); }
.choice span:last-child { font-size: .89rem; color: var(--muted); line-height: 1.55; }

/* ---- Step 2: referral sub-block ---- */
.sub-head {
  font-size: .78rem; text-transform: uppercase; letter-spacing: .09em;
  color: var(--blue-700); margin: .6rem 0 -.3rem;
}
.referral-only { grid-column: 1 / -1; background: var(--blue-100);
  border: 1px dashed #bcd6f5; border-radius: var(--radius-sm); padding: 1.1rem 1.2rem 1.3rem; }
.form-grid.inner { margin: 0; }
.hint { display: block; font-size: .8rem; color: var(--muted); margin-top: .35rem; }

/* ---- Step 3: account ---- */
.btn-google {
  display: flex; align-items: center; justify-content: center; gap: .65rem;
  width: 100%; background: #fff; color: #3c4043; border: 1px solid #dadce0;
  border-radius: var(--radius-sm); padding: .8rem 1rem; font-weight: 600; font-size: .95rem;
  transition: all .2s var(--ease);
}
.btn-google:hover { background: #f8f9fa; border-color: #c6cacd; box-shadow: var(--shadow-sm); color: #3c4043; }
.or-split { display: flex; align-items: center; gap: 1rem; margin: 1.4rem 0; color: var(--muted); font-size: .85rem; }
.or-split::before, .or-split::after { content: ""; flex: 1; height: 1px; background: var(--line); }

.role-pick { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: .7rem; }
.role-opt { display: block; cursor: pointer; margin: 0; }
.role-opt input { position: absolute; opacity: 0; pointer-events: none; }
.role-opt span {
  display: block; border: 2px solid var(--line); border-radius: var(--radius-sm);
  padding: .85rem 1rem; font-size: .85rem; color: var(--muted); transition: all .2s var(--ease);
}
.role-opt strong { display: block; color: var(--blue-900); font-size: .96rem; margin-bottom: .15rem; }
.role-opt input:checked + span { border-color: var(--blue-500); background: var(--blue-100); }

/* ---- Step 4: done ---- */
.wiz-done { text-align: center; padding: 1rem 0; }
.done-ico {
  width: 62px; height: 62px; margin: 0 auto 1.2rem; border-radius: 50%;
  background: var(--orange-l); color: var(--orange); display: grid; place-items: center;
  font-size: 1.9rem; font-weight: 800;
}
.wiz-done p { color: var(--muted); max-width: 520px; margin: 0 auto 1.8rem; }
.done-steps { display: grid; gap: .55rem; max-width: 430px; margin: 0 auto 2rem; text-align: left; }
.done-steps > div {
  display: flex; align-items: center; gap: .7rem; font-size: .9rem;
  background: var(--bg-soft); border: 1px solid var(--line);
  border-radius: var(--radius-sm); padding: .65rem .9rem;
}
.done-steps span {
  display: grid; place-items: center; width: 22px; height: 22px; flex: 0 0 22px;
  border-radius: 50%; background: var(--blue-600); color: #fff; font-size: .75rem; font-weight: 700;
}
.done-steps em { margin-left: auto; font-style: normal; font-size: .76rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .05em; color: #1c7d43; }
.done-steps em.pending { color: var(--orange); }
.done-steps em.waiting { color: var(--muted); }

@media (max-width: 600px) {
  .wiz-panel { padding: 1.5rem 1.2rem; }
  .wiz-steps li { flex-basis: 100%; }
  .refer-hero { padding: 4.5rem 0 3rem; }
}
