/* ═══════════════════════════════════════════════════════════════
   experience.css
   FouLab Product Experience Layer styles.
   Covers: onboarding, notification prefs, watchlist, timeline
   phases, confidence chips, brand micro-refinements.
═══════════════════════════════════════════════════════════════ */

/* ══════════════════════════════════════════════════════════════
   ONBOARDING OVERLAY
══════════════════════════════════════════════════════════════ */
.onboarding-overlay {
  position: fixed;
  inset: 0;
  background: var(--bg-primary);
  z-index: 9000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  opacity: 0;
  transition: opacity 0.38s ease;
  pointer-events: none;
}

.onboarding-overlay.ob-visible {
  opacity: 1;
  pointer-events: auto;
}

.onboarding-overlay.ob-exit {
  opacity: 0;
  pointer-events: none;
}

.onboarding-skip {
  position: absolute;
  top: 20px;
  right: 20px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px 4px;
  font-family: var(--font);
  transition: color 0.18s ease;
  letter-spacing: 0.02em;
}
.onboarding-skip:hover { color: var(--text-secondary); }

.onboarding-body {
  width: 100%;
  max-width: 480px;
  padding: 0 0 48px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.onboarding-slides {
  width: 100%;
  position: relative;
  overflow: hidden;
  height: 340px;
}

.onboarding-slide {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0 36px;
  text-align: center;
  opacity: 0;
  transform: translateX(100%);
  transition: transform 0.38s cubic-bezier(0.4, 0, 0.2, 1),
              opacity   0.38s ease;
}

.onboarding-slide.ob-active {
  opacity: 1;
  transform: translateX(0);
}

.onboarding-slide.ob-exit-left {
  opacity: 0;
  transform: translateX(-50px);
}

.onboarding-slide.ob-enter-right {
  opacity: 0;
  transform: translateX(60px);
}

.onboarding-slide.ob-exit-right {
  opacity: 0;
  transform: translateX(50px);
}

.onboarding-slide.ob-enter-left {
  opacity: 0;
  transform: translateX(-60px);
}

.onboarding-icon-wrap {
  width: 80px;
  height: 80px;
  border-radius: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 28px;
  transition: background 0.4s ease;
}

.onboarding-title {
  font-size: 1.6rem;
  font-weight: 900;
  color: var(--text-primary);
  letter-spacing: -0.035em;
  line-height: 1.15;
  margin-bottom: 14px;
}

.onboarding-sub {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.65;
  max-width: 280px;
}

.onboarding-footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  padding: 0 24px;
  width: 100%;
}

.onboarding-dots {
  display: flex;
  gap: 7px;
  align-items: center;
}

.onboarding-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--border);
  transition: background 0.3s ease, transform 0.3s ease, width 0.3s ease;
  cursor: pointer;
}

.onboarding-dot.ob-dot-active {
  background: var(--text-primary);
  transform: scale(1.2);
  width: 18px;
  border-radius: 3px;
}

.onboarding-cta {
  width: 100%;
  max-width: 340px;
  height: 52px;
  background: var(--red);
  color: #fff;
  font-size: 0.9rem;
  font-weight: 700;
  border-radius: 14px;
  border: none;
  cursor: pointer;
  font-family: var(--font);
  letter-spacing: 0.01em;
  transition: background 0.18s ease, transform 0.15s ease;
}
.onboarding-cta:hover  { background: #d62f3c; }
.onboarding-cta:active { transform: scale(0.98); }

/* ══════════════════════════════════════════════════════════════
   NOTIFICATION PREFERENCES DRAWER
══════════════════════════════════════════════════════════════ */
.notif-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0);
  z-index: 800;
  pointer-events: none;
  transition: background 0.3s ease;
}

.notif-backdrop--visible {
  background: rgba(0, 0, 0, 0.65);
  pointer-events: auto;
}

.notif-drawer {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%) translateY(100%);
  width: 100%;
  max-width: 480px;
  background: var(--bg-card);
  border-radius: 18px 18px 0 0;
  border-top: 1px solid var(--border);
  z-index: 801;
  transition: transform 0.38s cubic-bezier(0.32, 0.72, 0, 1);
  max-height: 85vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.notif-drawer--open {
  transform: translateX(-50%) translateY(0);
}

.notif-drawer-handle {
  width: 36px;
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  margin: 12px auto 0;
  flex-shrink: 0;
}

.notif-drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px 12px;
  flex-shrink: 0;
}

.notif-drawer-title {
  font-size: 0.9rem;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}

.notif-drawer-close {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  cursor: pointer;
  transition: color 0.18s ease;
}
.notif-drawer-close:hover { color: var(--text-primary); }

.notif-drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 0 20px 8px;
  overscroll-behavior: contain;
}

.notif-section-label {
  font-size: 0.6rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: 10px;
  margin-top: 4px;
}

.notif-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid var(--border-subtle);
  cursor: pointer;
  gap: 16px;
}

.notif-row:last-child { border-bottom: none; }

.notif-row-info { flex: 1; min-width: 0; }

.notif-row-title {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 2px;
}

.notif-row-sub {
  display: block;
  font-size: 0.68rem;
  color: var(--text-muted);
  line-height: 1.4;
}

.notif-row--mode .notif-row-title { color: var(--red); }

/* Toggle switch */
.notif-toggle {
  position: relative;
  width: 44px;
  height: 26px;
  flex-shrink: 0;
}

.notif-toggle input {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
}

.notif-toggle-slider {
  position: absolute;
  inset: 0;
  background: var(--bg-elevated);
  border-radius: 13px;
  border: 1px solid var(--border);
  transition: background 0.22s ease, border-color 0.22s ease;
  cursor: pointer;
}

.notif-toggle-slider::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--text-muted);
  transition: transform 0.22s cubic-bezier(0.34, 1.56, 0.64, 1),
              background 0.22s ease;
}

.notif-toggle input:checked + .notif-toggle-slider {
  background: rgba(59, 130, 246, 0.2);
  border-color: var(--blue);
}

.notif-toggle input:checked + .notif-toggle-slider::after {
  transform: translateX(18px);
  background: var(--blue);
}

.notif-toggle input:checked + .notif-toggle-slider--red {
  background: rgba(230, 57, 70, 0.15);
  border-color: var(--red);
}

.notif-toggle input:checked + .notif-toggle-slider--red::after {
  background: var(--red);
}

.notif-drawer-footer {
  padding: 14px 20px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-top: 1px solid var(--border-subtle);
  flex-shrink: 0;
}

.notif-view-all {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.18s ease;
}
.notif-view-all:hover { color: var(--text-secondary); }

.notif-save-btn {
  padding: 10px 22px;
  background: var(--red);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 700;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  font-family: var(--font);
  transition: background 0.18s ease, transform 0.12s ease;
  letter-spacing: 0.01em;
}

.notif-save-btn:hover   { background: #d62f3c; }
.notif-save-btn:active  { transform: scale(0.97); }

.notif-save-btn--done {
  background: var(--green);
}

/* ══════════════════════════════════════════════════════════════
   WATCHLIST BUTTON
══════════════════════════════════════════════════════════════ */
.watchlist-btn {
  width: 34px;
  height: 34px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  cursor: pointer;
  transition: color 0.2s ease, background 0.2s ease, border-color 0.2s ease;
  flex-shrink: 0;
}

.watchlist-btn:hover {
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.1);
}

.watchlist-btn.wl-active {
  color: var(--yellow);
  background: rgba(244, 160, 28, 0.12);
  border-color: rgba(244, 160, 28, 0.3);
}

.watchlist-btn.wl-active svg {
  fill: var(--yellow);
}

/* Pop animation when toggling */
@keyframes wl-pop {
  0%   { transform: scale(1); }
  40%  { transform: scale(1.25); }
  100% { transform: scale(1); }
}
.watchlist-btn.wl-pop {
  animation: wl-pop 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

/* Hero card watchlist row */
.hero-watchlist-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 14px 4px;
}

.hero-pinned-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.6rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--orange, #f97316);
  background: rgba(249, 115, 22, 0.1);
  border: 1px solid rgba(249, 115, 22, 0.25);
  border-radius: 10px;
  padding: 2px 8px;
}

/* Detail page watchlist — icon only, same size as base .watchlist-btn */
.detail-watchlist-btn {
  position: relative;
  width: 34px;
  height: 34px;
  padding: 0;
  gap: 0;
}

/* ══════════════════════════════════════════════════════════════
   TIMELINE PHASE MARKERS
══════════════════════════════════════════════════════════════ */
.timeline-phase {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 0 6px;
}

.timeline-phase::before,
.timeline-phase::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border-subtle);
}

.timeline-phase-label {
  font-size: 0.58rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  white-space: nowrap;
  flex-shrink: 0;
}

/* "Turning Point" badge on key timeline events */
.timeline-event.turning-point .timeline-content::after {
  content: 'Turning Point';
  display: inline-block;
  font-size: 0.55rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--orange);
  background: rgba(208, 80, 32, 0.1);
  border-radius: 6px;
  padding: 1px 6px;
  margin-top: 4px;
}

.timeline-event.turning-point {
  border-left: 2px solid var(--orange);
  padding-left: 8px;
  margin-left: -10px;
}

/* Goals — green accent (positive moment) */
.timeline-event.turning-point--goal {
  border-left-color: var(--green);
}
.timeline-event.turning-point--goal .timeline-content::after {
  color: var(--green);
  background: rgba(45, 198, 83, 0.1);
}

/* Red cards — keep red (disciplinary event) */
.timeline-event.turning-point--redcard {
  border-left-color: var(--red);
}
.timeline-event.turning-point--redcard .timeline-content::after {
  color: var(--red);
  background: rgba(230, 57, 70, 0.1);
}

/* ══════════════════════════════════════════════════════════════
   CONFIDENCE CHIP
══════════════════════════════════════════════════════════════ */
.confidence-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.58rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  border-radius: 8px;
  padding: 2px 8px;
  margin-bottom: 8px;
}

.confidence-chip--low {
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
}

.confidence-chip--live {
  color: var(--green);
  background: rgba(45, 198, 83, 0.07);
  border: 1px solid rgba(45, 198, 83, 0.2);
}

/* ══════════════════════════════════════════════════════════════
   SETTINGS NAV BUTTON (navbar)
══════════════════════════════════════════════════════════════ */
.icon-btn--active {
  background: var(--bg-elevated);
  color: var(--text-primary);
  border-color: var(--border);
}

/* ══════════════════════════════════════════════════════════════
   SETTINGS PANEL ADDITIONS
══════════════════════════════════════════════════════════════ */
.settings-profile {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0 16px;
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 4px;
}

.settings-avatar {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: rgba(160,32,24,.15);
  border: 1px solid rgba(160,32,24,.3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  font-weight: 900;
  color: var(--red);
  letter-spacing: 0.04em;
  flex-shrink: 0;
}

.settings-profile-info {
  flex: 1;
  min-width: 0;
}

.settings-profile-name {
  display: block;
  font-size: 0.86rem;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}

.settings-profile-sub {
  display: block;
  font-size: 0.66rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.settings-version {
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 2px 7px;
  flex-shrink: 0;
}

/* disabled toggle state */
.notif-toggle--disabled {
  opacity: .35;
  pointer-events: none;
}

/* action rows (watchlist, tracked, etc.) */
.settings-action-row {
  cursor: default;
}

.settings-action-btn {
  padding: 5px 13px;
  font-size: 0.7rem;
  font-weight: 700;
  border-radius: 7px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  cursor: pointer;
  font-family: var(--font);
  text-decoration: none;
  white-space: nowrap;
  transition: color .18s ease, border-color .18s ease;
  flex-shrink: 0;
}
.settings-action-btn:hover {
  color: var(--text-primary);
  border-color: var(--text-muted);
}

/* reset button — ghost/destructive */
.settings-reset-btn {
  padding: 10px 16px;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: 10px;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-muted);
  cursor: pointer;
  font-family: var(--font);
  transition: color .18s ease, border-color .18s ease;
}
.settings-reset-btn:hover {
  color: var(--red);
  border-color: rgba(160,32,24,.4);
}

/* ── Display pref body classes ── */
.settings-hide-derby   .derby-badge,
.settings-hide-derby   .pulse-derby   { display: none !important; }

.settings-hide-pressure .pulse-num    { display: none !important; }

.settings-compact-cards .match-card   { padding: 0; }
.settings-compact-cards .match-body   { padding: 8px 12px; }
.settings-compact-cards .match-card-header { padding: 8px 12px 4px; }
.settings-compact-cards .match-footer { padding: 6px 12px 8px; }

/* ══════════════════════════════════════════════════════════════
   BRAND MICRO-REFINEMENTS
══════════════════════════════════════════════════════════════ */

/* Consistent section rhythm */
.section + .section { margin-top: 0; }
.section:first-child { padding-top: 16px; }

/* Hero match card — tighter, more premium */
.hero-match {
  border-radius: var(--radius-lg);
  overflow: hidden;
}

/* Intel strip — even spacing */
.intel-strip {
  padding: 0 0 4px;
}

/* Smoother card hover states */
.hero-match:hover { cursor: pointer; }

/* Bottom nav label — tighter */
.nav-label {
  font-size: 0.62rem;
  letter-spacing: 0.01em;
}

/* Section title rhythm */
.section-title {
  font-size: 0.7rem;
  letter-spacing: 0.08em;
}

/* Provider status — smaller footprint */
.provider-status {
  font-size: 0.62rem;
}

/* Prediction pill — min-height for stability */
.pred-pill {
  min-height: 62px;
}

/* Timeline event — smoother entry */
.timeline-event {
  transition: opacity 0.25s ease;
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0);   }
}

/* ── Commentary Intelligence Signal (Timeline) ───────────────── */
.timeline-intelligence-signal {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 10px 0;
  padding: 10px 12px;
  background: rgba(99, 102, 241, 0.07);
  border: 1px solid rgba(99, 102, 241, 0.18);
  border-radius: 8px;
  animation: fadeInUp 0.35s ease both;
}

.tis-icon {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(99, 102, 241, 0.15);
  border-radius: 50%;
  color: #818cf8;
  margin-top: 1px;
}

.tis-body {
  flex: 1;
  min-width: 0;
}

.tis-label {
  font-size: 0.69rem;
  font-weight: 600;
  color: #818cf8;
  letter-spacing: 0.02em;
  line-height: 1.3;
}

.tis-detail {
  font-size: 0.63rem;
  color: var(--text-secondary);
  margin-top: 2px;
  line-height: 1.4;
  font-style: italic;
}

.tis-minute {
  flex-shrink: 0;
  font-size: 0.62rem;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
  padding-top: 2px;
}

/* Stat bar transitions */
.stat-bar-home,
.stat-bar-away {
  transition: width 0.6s cubic-bezier(0.34, 1.2, 0.64, 1);
}

/* Subtle card border lift on intelligence sections */
#live-predictions,
#referee-card,
#danger-zone {
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  margin-bottom: 8px;
  padding: 14px 16px;
}

/* ══════════════════════════════════════════════════════════════
   DATA QUALITY STRIP
══════════════════════════════════════════════════════════════ */
.data-quality-strip {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 16px 0;
  font-size: 0.6rem;
  color: var(--text-muted);
  font-weight: 500;
}

.data-quality-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--green);
  flex-shrink: 0;
}

.data-quality-dot--sim {
  background: var(--text-muted);
}

/* ══════════════════════════════════════════════════════════════
   SESSION RESUME BANNER
══════════════════════════════════════════════════════════════ */
.session-resume {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 11px 16px;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border-subtle);
  gap: 12px;
  animation: slideDown 0.35s cubic-bezier(0.34, 1.2, 0.64, 1) forwards;
}

@keyframes slideDown {
  from { transform: translateY(-100%); opacity: 0; }
  to   { transform: translateY(0);     opacity: 1; }
}

.session-resume-text {
  font-size: 0.74rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.session-resume-link {
  font-size: 0.74rem;
  color: var(--red);
  font-weight: 700;
  white-space: nowrap;
  flex-shrink: 0;
}

/* ══════════════════════════════════════════════════════════════
   FOLLOW TEAM CHIP
══════════════════════════════════════════════════════════════ */
.follow-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 0.72rem;
  font-weight: 600;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.18s ease;
  white-space: nowrap;
  font-family: var(--font);
}

.follow-chip:hover {
  border-color: var(--red);
  color: var(--red);
}

.follow-chip.following {
  background: rgba(230, 57, 70, 0.08);
  border-color: rgba(230, 57, 70, 0.3);
  color: var(--red);
}
