/* =========================================================
   ScoreB - register.html stylesheet (light theme, mobile-optimized)
   =========================================================
   Matches the light "ScoreB" mockup: soft grey page background,
   white cards with a gentle shadow, a blue gradient pill button,
   light-blue circular feature icons and neutral "Coming soon"
   pills. Colours are defined locally on .auth-page-body instead
   of the site's (dark) var(--bg)/var(--bg-elevated) tokens, since
   this screen is intentionally a lighter look than the rest of
   the app.
   ========================================================= */

html, body { height: 100%; }

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

.auth-page-body {
  --auth-bg: #eef1f5;
  --auth-card-bg: #ffffff;
  --auth-border: #e4e8ee;
  --auth-text: #16213e;
  --auth-text-dim: #6b7280;
  --auth-input-bg: #eef1f5;
  --auth-blue: #1e88e5;
  --auth-blue-light: #29b6f6;
  --auth-blue-dark: #0d5aa7;
  --auth-icon-bg: #dbeafe;
  --auth-badge-bg: #eef1f5;
  --auth-badge-text: #52606d;
  --auth-shadow: 0 10px 30px rgba(20, 40, 80, 0.08);

  position: relative;
  overflow-x: hidden;
  margin: 0;
  min-height: 100%;
  background: var(--auth-bg);
  color: var(--auth-text);
  font-family: Poppins ExtraLight;
  padding-left: env(safe-area-inset-left, 0px);
  padding-right: env(safe-area-inset-right, 0px);
}

/* Soft diagonal accent stripes in the corner, like the mockup */
.auth-page-body::before {
  content: "";
  position: absolute;
  z-index: -1;
  top: 0;
  left: 0;
  width: 420px;
  height: 420px;
  background: repeating-linear-gradient(
    115deg,
    rgba(30, 136, 229, 0.14) 0px,
    rgba(30, 136, 229, 0.14) 4px,
    transparent 4px,
    transparent 34px
  );
  -webkit-mask-image: linear-gradient(160deg, #000 30%, transparent 75%);
          mask-image: linear-gradient(160deg, #000 30%, transparent 75%);
  pointer-events: none;
}

/* ---------- Top bar (same shape as style.css's header) ---------- */
.auth-topbar {
  min-height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 16px;
  padding-top: calc(10px + env(safe-area-inset-top, 0px));
  background: #ffffff;
  border-bottom: 1px solid var(--auth-border);
  position: sticky;
  top: 0;
  z-index: 20;
}

.auth-brand { flex-shrink: 0; }
.auth-brand h1 { margin: 0; font-size: clamp(20px, 5vw, 28px); letter-spacing: 0.5px; color: var(--auth-text); white-space: nowrap; }
.auth-brand h1 span { color: var(--auth-blue); }

.auth-back-link {
  color: var(--auth-text-dim);
  font-size: 14px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 6px 4px;
  margin: -6px -4px;
  transition: color 0.2s ease;
}

.auth-back-link:hover { color: var(--auth-blue); }
.auth-back-link i { font-size: 12px; }

/* ---------- Shell / layout ---------- */
.auth-shell {
  display: flex;
  justify-content: center;
  padding: 16px 14px calc(28px + env(safe-area-inset-bottom, 0px));
  position: relative;
  z-index: 1;
}

.auth-page {
  width: 100%;
  max-width: 1040px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

/* ---------- Card (same treatment as .team-header / .competition-header) ---------- */
.auth-card {
  width: 100%;
  background: var(--auth-card-bg);
  border: 1px solid var(--auth-border);
  border-radius: var(--radius, 16px);
  padding: 20px 16px;
  box-shadow: var(--auth-shadow);
}

.auth-card-head { text-align: center; margin-bottom: 20px; }

.auth-logo-badge {
  width: 48px;
  height: 48px;
  margin: 0 auto 12px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: var(--auth-blue);
  background: var(--auth-icon-bg);
}

.auth-card-title {
  margin: 0 0 6px;
  font-size: clamp(18px, 4.6vw, 22px);
  font-weight: 700;
  color: var(--auth-text);
}

.auth-card-sub {
  margin: 0;
  font-size: 13px;
  color: var(--auth-text-dim);
}

/* ---------- Error banner (same tint pattern as .injured-badge) ---------- */
.auth-error {
  background: rgba(220, 38, 38, 0.08);
  color: #dc2626;
  font-size: 12.5px;
  padding: 10px 12px;
  border-radius: var(--radius, 10px);
  margin-bottom: 16px;
}

/* ---------- Form ---------- */
.auth-form { display: flex; flex-direction: column; gap: 14px; }

.auth-field { display: flex; flex-direction: column; gap: 4px; }

.auth-field-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: var(--auth-text-dim);
}

.auth-input-wrap {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 46px;
  background: var(--auth-input-bg);
  border: 1px solid var(--auth-border);
  border-radius: var(--radius, 10px);
  padding: 0 10px 0 12px;
  transition: border-color 0.2s ease;
}

.auth-input-wrap:focus-within { border-color: var(--auth-blue); }

.auth-input-wrap i:first-child { color: var(--auth-text-dim); font-size: 14px; flex-shrink: 0; }

.auth-input-wrap input {
  flex: 1;
  width: 100%;
  min-width: 0;
  background: transparent;
  border: none;
  outline: none;
  color: var(--auth-text);
  font-family: inherit;
  /* 16px stops iOS Safari from auto-zooming the page on focus */
  font-size: 16px;
  padding: 11px 10px;
}

.auth-input-wrap input::placeholder { color: #9aa3af; }

.auth-toggle-pw {
  background: none;
  border: none;
  color: var(--auth-text-dim);
  font-size: 15px;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: color 0.2s ease;
}

.auth-toggle-pw:hover { color: var(--auth-text); }

/* ---------- Submit button (blue gradient pill, as in the mockup) ---------- */
.auth-submit-btn {
  width: 100%;
  min-height: 48px;
  background: linear-gradient(135deg, var(--auth-blue-light), var(--auth-blue-dark));
  color: #ffffff;
  border: none;
  border-radius: 20px;
  padding: 12px 0;
  font-size: 15px;
  font-weight: 600;
  font-family: inherit;
  margin-top: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 10px 20px rgba(21, 101, 192, 0.3);
  transition: filter 0.2s ease, box-shadow 0.2s ease;
  -webkit-tap-highlight-color: transparent;
}

.auth-submit-btn:hover { filter: brightness(1.05); box-shadow: 0 12px 24px rgba(21, 101, 192, 0.38); }
.auth-submit-btn:disabled { opacity: 0.7; cursor: default; }

.auth-submit-spinner { display: none; font-size: 13px; }
.auth-submit-btn.is-loading .auth-submit-label { opacity: 0.7; }
.auth-submit-btn.is-loading .auth-submit-spinner { display: inline-block; }

/* ---------- Divider / Google ---------- */
.auth-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 18px 0 14px;
  color: var(--auth-text-dim);
  font-size: 12px;
}

.auth-divider::before,
.auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--auth-border);
}

.auth-google-btn {
  width: 100%;
  min-height: 46px;
  background: #ffffff;
  border: 1px solid var(--auth-border);
  color: var(--auth-text);
  border-radius: var(--radius, 10px);
  padding: 11px 0;
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: border-color 0.2s ease;
  -webkit-tap-highlight-color: transparent;
}

.auth-google-btn:hover { border-color: var(--auth-blue); }
.auth-google-btn i { color: #ea4335; }

/* ---------- Switch link ---------- */
.auth-switch {
  text-align: center;
  font-size: 12.5px;
  color: var(--auth-text-dim);
  margin: 16px 0 0;
}

.auth-switch a { color: var(--auth-blue); font-weight: 600; }
.auth-switch a:hover { text-decoration: underline; }

/* ---------- Promo panel (same treatment as the card above) ---------- */
.auth-promo {
  background: var(--auth-card-bg);
  border: 1px solid var(--auth-border);
  border-radius: var(--radius, 16px);
  padding: 22px 16px;
  box-shadow: var(--auth-shadow);
}

.auth-promo::before {
  content: "Join ScoreB";
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--auth-text-dim);
  padding-bottom: 6px;
  margin-bottom: 14px;
  border-bottom: 2px solid var(--auth-blue);
}

.auth-promo h2 {
  color: var(--auth-text);
  font-size: clamp(17px, 4.4vw, 19px);
  font-weight: 700;
  margin: 0 0 6px;
}

.auth-promo-sub {
  color: var(--auth-text-dim);
  font-size: 13px;
  margin: 0 0 16px;
  line-height: 1.5;
}

/* ---------- Feature rows (same card treatment as .competition-info-card / .team-info-card) ---------- */
.auth-feature {
  display: grid;
  grid-template-columns: 40px 1fr auto;
  gap: 10px 12px;
  align-items: center;
  background: var(--auth-input-bg);
  border: 1px solid var(--auth-border);
  border-radius: var(--radius, 12px);
  padding: 12px 14px;
  margin-bottom: 10px;
}

.auth-feature-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--auth-icon-bg);
  color: var(--auth-blue);
  font-size: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.auth-feature-title { font-size: 13px; font-weight: 600; color: var(--auth-text); }
.auth-feature-desc { font-size: 12px; color: var(--auth-text-dim); margin-top: 3px; line-height: 1.5; }

/* ---------- Badge (neutral pill, as in the mockup) ---------- */
.auth-feature-badge {
  background: var(--auth-badge-bg);
  border: 1px solid var(--auth-border);
  color: var(--auth-badge-text);
  font-size: 11px;
  font-weight: 700;
  padding: 5px 10px;
  border-radius: 14px;
  white-space: nowrap;
}

.auth-promo-note {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  color: var(--auth-text-dim);
  font-size: 12px;
  margin: 14px 0 0;
  line-height: 1.6;
}

.auth-promo-note i {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  margin-top: 1px;
  border-radius: 50%;
  background: var(--auth-text);
  color: #ffffff;
  font-size: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ---------- Tablet and up ---------- */
@media (min-width: 560px) {
  .auth-shell { padding: 32px 24px calc(48px + env(safe-area-inset-bottom, 0px)); }
  .auth-card { padding: 28px 30px; }
  .auth-promo { padding: 26px 26px; }
  .auth-page { gap: 20px; }
}

/* ---------- Desktop: two columns ---------- */
@media (min-width: 780px) {
  .auth-page {
    grid-template-columns: 1fr 1fr;
    align-items: start;
    gap: 24px;
  }
}

/* ---------- Phones (portrait, up to small tablets) ---------- */
@media (max-width: 480px) {
  .auth-topbar { padding-left: 14px; padding-right: 14px; }
  .auth-card, .auth-promo { border-radius: 14px; }
  .auth-card-head { margin-bottom: 16px; }
  .auth-logo-badge { width: 42px; height: 42px; font-size: 18px; margin-bottom: 10px; }
  .auth-form { gap: 12px; }
  .auth-feature { padding: 10px 12px; }

  /* Let the "Coming soon" pill drop to its own line so titles
     never get squeezed on narrow screens */
  .auth-feature {
    grid-template-columns: 34px 1fr;
    row-gap: 6px;
  }
  .auth-feature-icon { width: 34px; height: 34px; font-size: 13px; }
  .auth-feature-badge { grid-column: 2; justify-self: start; }
}

/* ---------- Small phones ---------- */
@media (max-width: 380px) {
  .auth-back-link { font-size: 0; gap: 0; padding: 10px; margin: -10px; }
  .auth-back-link i { font-size: 16px; }
  .auth-card { padding: 16px 14px; }
  .auth-promo { padding: 16px 14px; }
  .auth-page-body::before { width: 220px; height: 220px; }
}

/* ---------- Landscape phones: recover vertical space ---------- */
@media (max-height: 480px) and (orientation: landscape) {
  .auth-topbar { min-height: 44px; }
  .auth-shell { padding-top: 12px; padding-bottom: calc(16px + env(safe-area-inset-bottom, 0px)); }
  .auth-card-head { margin-bottom: 12px; }
  .auth-logo-badge { width: 36px; height: 36px; margin-bottom: 6px; }
}
