/* members.css — Cubs auth & profile pages */

/* ── AUTH PAGES (register / login) ─────────────────────────── */
.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-6) var(--space-5);
  position: relative;
}

.auth-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  background: var(--c-navy);
}
.auth-bg__glow {
  position: absolute;
  width: 500px; height: 500px;
  border-radius: 50%;
  filter: blur(100px);
  opacity: 0.18;
}
.auth-bg__glow--left  { background: radial-gradient(circle, var(--glow-teal), transparent);    left: -150px; top: 20%; }
.auth-bg__glow--right { background: radial-gradient(circle, var(--glow-magenta), transparent); right: -150px; bottom: 10%; }

.auth-card {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 440px;
  background: var(--c-navy-card);
  border: 1px solid var(--c-border-gold);
  border-radius: var(--r-lg);
  padding: var(--space-8) var(--space-7);
  backdrop-filter: blur(10px);
  box-shadow: 0 24px 80px rgba(0,0,0,0.5);
  animation: fadeUp 0.5s ease both;
}

.auth-card__brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: var(--space-5);
}
.auth-brand__fox  { font-size: 26px; }
.auth-brand__word {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.22em;
  color: var(--c-gold);
  text-transform: uppercase;
}

.auth-card__title {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 900;
  color: var(--c-text-100);
  text-align: center;
  margin-bottom: 8px;
}

.auth-card__sub {
  font-size: 15px;
  color: var(--c-text-55);
  text-align: center;
  margin-bottom: var(--space-6);
  line-height: 1.72;
}

.auth-errors { margin-bottom: var(--space-4); }
.auth-error {
  background: rgba(192,57,43,0.14);
  border: 1px solid rgba(192,57,43,0.3);
  color: rgba(255,150,150,0.9);
  font-size: 13px;
  padding: 10px 14px;
  border-radius: var(--r-sm);
  margin-bottom: 6px;
}

.auth-form { display: flex; flex-direction: column; gap: var(--space-4); }

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

.auth-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--c-text-55);
  letter-spacing: 0.05em;
}
.auth-label__opt { font-weight: 400; color: var(--c-text-35); }

.auth-input {
  width: 100%;
  background: var(--c-navy-card);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: var(--r-sm);
  padding: 13px 16px;
  font-family: var(--font-body);
  font-size: 15px;
  color: var(--c-text-100);
  outline: none;
  transition: border-color 0.2s, background 0.2s;
}
.auth-input::placeholder { color: var(--c-text-35); }
.auth-input:focus {
  border-color: var(--c-gold);
  background: rgba(255,255,255,0.08);
  box-shadow: 0 0 0 3px rgba(212,175,55,0.12);
}

.auth-submit {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: var(--c-gold);
  color: var(--c-midnight);
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 700;
  padding: 14px 24px;
  border-radius: var(--r-sm);
  border: none;
  cursor: pointer;
  transition: all 0.2s;
  margin-top: var(--space-2);
}
.auth-submit:hover {
  background: var(--c-gold-lt);
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(212,175,55,0.28);
}
.auth-submit__arrow { font-size: 18px; }

.auth-card__footer {
  margin-top: var(--space-5);
  text-align: center;
  font-size: 14px;
  color: var(--c-text-35);
}
.auth-link { color: var(--c-gold); font-weight: 600; transition: color 0.2s; }
.auth-link:hover { color: var(--c-gold-lt); }

.auth-card__rule {
  margin-top: var(--space-4);
  padding-top: var(--space-4);
  border-top: 1px solid var(--c-border);
  text-align: center;
  font-size: 12px;
  color: var(--c-text-35);
  font-style: italic;
  line-height: 1.6;
}

/* ── PASSWORD REVEAL TOGGLE ─────────────────────────────────── */
.auth-field--password { position: relative; }

.auth-field--password .auth-input {
  padding-right: 48px;
}

.auth-reveal {
  position: absolute;
  right: 12px;
  bottom: 13px;
  width: 24px;
  height: 24px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--c-text-35);
  transition: color 0.2s;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
.auth-reveal:hover,
.auth-reveal:focus-visible { color: var(--c-gold); outline: none; }

/* SVG eye icons inside the button */
.auth-reveal svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.auth-reveal .icon-eye-off { display: none; }
.auth-reveal.is-visible .icon-eye     { display: none; }
.auth-reveal.is-visible .icon-eye-off { display: block; }

/* ── PROFILE PAGE ───────────────────────────────────────────── */
.profile-page { padding-bottom: 80px; }

.profile-hero {
  position: relative;
  padding: 48px 0 40px;
  overflow: hidden;
}
.profile-hero__bg {
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 60% 100% at 0% 50%, var(--glow-teal), transparent 55%),
    radial-gradient(ellipse 50% 80% at 100% 50%, var(--glow-magenta), transparent 52%),
    var(--c-navy);
}
.profile-hero__inner {
  position: relative; z-index: 1;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: var(--space-6);
}

.profile-avatar {
  width: 80px; height: 80px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(212,175,55,0.3), rgba(212,175,55,0.1));
  border: 2px solid var(--c-border-gold);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.profile-avatar__letter {
  font-family: var(--font-display);
  font-size: 36px;
  font-weight: 900;
  color: var(--c-gold);
  line-height: 1;
}

.profile-badge {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.18em;
  color: var(--c-gold);
  background: rgba(212,175,55,0.1);
  border: 1px solid var(--c-border-gold);
  display: inline-block;
  padding: 3px 12px;
  border-radius: var(--r-pill);
  margin-bottom: 8px;
}
.profile-name  { font-family: var(--font-display); font-size: 36px; font-weight: 900; color: var(--c-text-100); margin-bottom: 4px; }
.profile-since { font-size: 13px; color: var(--c-text-35); }

.my-vote-card {
  background: rgba(212,175,55,0.07);
  border: 1px solid var(--c-border-gold);
  border-radius: var(--r-md);
  padding: var(--space-4) var(--space-5);
  min-width: 200px;
  text-align: center;
}
.my-vote-card--empty { border-style: dashed; background: rgba(255,255,255,0.03); }
.my-vote-card__label { display: block; font-size: 9px; font-weight: 700; letter-spacing: 0.18em; color: var(--c-gold); text-transform: uppercase; margin-bottom: 6px; }
.my-vote-card__horse { display: block; font-family: var(--font-display); font-size: 20px; font-weight: 700; color: var(--c-text-100); margin-bottom: 2px; }
.my-vote-card__odds  { display: block; font-family: var(--font-display); font-size: 22px; font-weight: 900; color: var(--c-gold); line-height: 1; margin-bottom: 4px; }
.my-vote-card__note  { display: block; font-size: 11px; color: var(--c-text-35); margin-bottom: 10px; }
.my-vote-card__empty-text { display: block; font-size: 15px; color: var(--c-text-35); margin-bottom: 10px; }
.my-vote-card__change { font-size: 12px; color: var(--c-gold); font-weight: 600; border-bottom: 1px solid rgba(212,175,55,0.3); }

.profile-body { padding-top: var(--space-8); }

/* Vote section */
.vote-section { }
.vote-section__header { margin-bottom: var(--space-6); }
.vote-section__title  { font-family: var(--font-display); font-size: 28px; font-weight: 700; color: var(--c-gold); display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }
.vote-section__race   { font-size: 14px; color: var(--c-text-55); margin-bottom: 6px; }
.vote-section__rule   { font-size: 13px; color: var(--c-text-35); font-style: italic; }

.vote-total-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(212,175,55,0.06);
  border: 1px solid var(--c-border-gold);
  border-radius: var(--r-sm);
  padding: 12px 18px;
  margin-bottom: var(--space-6);
  font-size: 14px;
  color: var(--c-text-75);
}
.vote-total-bar strong { color: var(--c-gold); }

/* Vote grid — responsive runner cards */
.vote-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
}

.vote-card {
  background: var(--c-navy-card);
  box-shadow: var(--shadow-card);
  border: 1px solid var(--c-border);
  border-radius: var(--r-md);
  padding: var(--space-4);
  transition: all 0.2s;
  cursor: pointer;
}
.vote-card:hover { background: var(--c-navy-card); border-color: rgba(255,255,255,0.14); transform: translateY(-2px); }
.vote-card--selected {
  border-color: var(--c-gold);
  background: rgba(212,175,55,0.07);
  box-shadow: 0 0 0 1px rgba(212,175,55,0.2);
}
.vote-card--leader { border-color: rgba(45,158,107,0.5); }

.vote-card__top { display: flex; align-items: flex-start; gap: 12px; margin-bottom: var(--space-3); }

.vote-silk {
  width: 38px; height: 38px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 700; color: white;
  text-shadow: 0 1px 3px rgba(0,0,0,0.6);
  flex-shrink: 0;
}

.vote-card__info { flex: 1; min-width: 0; }
.vote-card__name { font-size: 14px; font-weight: 600; color: var(--c-text-100); display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.vote-card__meta { font-size: 13px; color: var(--c-text-55); margin-top: 2px; }
.vote-card__connections { font-size: 13px; color: var(--c-text-55); margin-top: 3px; line-height: 1.65; }
.vote-card__odds { font-family: var(--font-display); font-size: 20px; font-weight: 700; color: var(--c-gold); flex-shrink: 0; }

/* Vote bar */
.vote-bar-wrap { margin-bottom: var(--space-3); }
.vote-bar__label { display: flex; align-items: baseline; gap: 4px; font-size: 13px; color: var(--c-text-55); margin-bottom: 5px; }
.vote-bar__count { font-weight: 700; color: var(--c-text-75); font-size: 14px; }
.vote-bar { height: 5px; background: rgba(255,255,255,0.07); border-radius: 3px; overflow: hidden; }
.vote-bar__fill {
  height: 100%;
  background: linear-gradient(90deg, var(--c-gold), var(--c-gold-lt));
  border-radius: 3px;
  transition: width 0.6s cubic-bezier(0.4,0,0.2,1);
  min-width: 0;
}
.vote-card--leader .vote-bar__fill { background: linear-gradient(90deg, var(--c-emerald-lt), #80f0a0); }

/* Vote button */
.vote-btn {
  width: 100%;
  background: var(--c-navy-card);
  border: 1px solid var(--c-border);
  color: var(--c-text-55);
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  padding: 10px 16px;
  border-radius: var(--r-sm);
  cursor: pointer;
  transition: all 0.2s;
}
.vote-btn:hover {
  background: rgba(212,175,55,0.12);
  border-color: var(--c-gold);
  color: var(--c-gold);
}
.vote-btn--selected {
  background: var(--c-gold);
  border-color: var(--c-gold);
  color: var(--c-midnight);
}
.vote-btn--loading { opacity: 0.6; pointer-events: none; }

.no-race-msg {
  text-align: center;
  padding: 80px 0;
  color: var(--c-text-35);
}
.no-race-msg h2 { font-family: var(--font-display); color: var(--c-text-75); margin-bottom: 8px; }

/* ── RESPONSIVE ────────────────────────────────────────────── */
@media (max-width: 768px) {
  .auth-card { padding: var(--space-6) var(--space-5); }
  .profile-hero__inner { grid-template-columns: auto 1fr; gap: var(--space-4); }
  .my-vote-card { display: none; } /* shown in body on mobile */
  .vote-grid { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  .profile-name { font-size: 26px; }
}

/* ── Additional auth styles ─────────────────────────────────── */

/* Inline hint/link on label row */
.auth-label__hint {
  font-weight: 400;
  color: var(--c-text-35);
  font-size: 11px;
  margin-left: 4px;
}

.auth-label__link {
  float: right;
  font-size: 12px;
  font-weight: 400;
  color: var(--c-gold);
  transition: color 0.2s;
}
.auth-label__link:hover { color: var(--c-gold-lt); }

/* Success / info block (forgot password sent state) */
.auth-success {
  text-align: center;
  padding: var(--space-4) 0 var(--space-5);
}
.auth-success__icon {
  font-size: 48px;
  margin-bottom: 16px;
}

/* ── Voting closed ───────────────────────────────────────────── */
.vote-section__rule--closed {
  color: #E05C4C;
  font-weight: 600;
  font-style: italic;
}
.vote-btn--disabled,
.vote-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  pointer-events: none;
}

/* ── Vote toast notifications ────────────────────────────── */
.vote-toast {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  opacity: 0;
  padding: 13px 24px;
  border-radius: 100px;
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  z-index: 9999;
  pointer-events: none;
  transition: opacity 0.25s, transform 0.25s;
  white-space: nowrap;
  box-shadow: 0 8px 32px rgba(0,0,0,0.4);
  max-width: 90vw;
  text-align: center;
}
.vote-toast--in {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
.vote-toast--success {
  background: #1a6b3c;
  border: 1px solid rgba(45,189,122,0.4);
}
.vote-toast--error {
  background: #7a1a1a;
  border: 1px solid rgba(192,57,43,0.5);
}

/* ── Vote button change state ───────────────────────────── */
.vote-btn--loading {
  opacity: 0.7;
  pointer-events: none;
}
.vote-btn:not([disabled]) {
  cursor: pointer;
}

/* ── GUEST PICK BANNER (register page) ──────────────────────── */
.auth-pick-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(212,175,55,0.10);
  border: 1px solid rgba(212,175,55,0.30);
  border-radius: var(--r-sm);
  padding: 12px 16px;
  margin-bottom: var(--space-5);
}
.auth-pick-banner__emoji {
  font-size: 20px;
  flex-shrink: 0;
}
.auth-pick-banner__text {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
}
.auth-pick-banner__label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--c-gold);
  text-transform: uppercase;
  margin-bottom: 2px;
}
.auth-pick-banner__horse {
  font-size: 16px;
  font-weight: 700;
  color: var(--c-text-100);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.auth-pick-banner__lock {
  font-size: 16px;
  flex-shrink: 0;
  opacity: 0.6;
}
