/* ============================================
   FOOTYFACEOFF — COMPONENT STYLES v2
   Full brand system applied
   ============================================ */

@import './tokens.css';

/* ============================================
   BOTTOM NAVIGATION BAR
   ============================================ */

.bottom-bar {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: var(--max-width);
  height: var(--bottom-bar-h);
  background: var(--color-magenta);
  display: flex;
  align-items: stretch;
  z-index: 50;
  padding-bottom: env(safe-area-inset-bottom);
  border-top: 2px solid rgba(255,0,170,0.5);
}

.bottom-bar.hidden { display: none; }

.bottom-bar__item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: var(--space-2) var(--space-1);
  cursor: pointer;
  transition: background var(--transition-fast);
  position: relative;
}

.bottom-bar__item:active { background: rgba(255,255,255,0.12); }

.bottom-bar__item.active {
  background: rgba(255,255,255,0.18);
}

.bottom-bar__item.active::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 32px;
  height: 3px;
  background: var(--color-yellow);
  border-radius: 0 0 3px 3px;
}

.bottom-bar__icon {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  line-height: 1;
}

.bottom-bar__label {
  font-family: var(--font-condensed);
  font-stretch: condensed;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: rgba(255,255,255,0.75);
}

.bottom-bar__item.active .bottom-bar__label {
  color: var(--color-yellow);
}

/* ============================================
   HAMBURGER DRAWER
   ============================================ */

.drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  z-index: 200;
  display: none;
  animation: fadeIn var(--transition-base) ease;
}

.drawer-overlay.active { display: block; }

.drawer {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: 300px;
  max-width: 85vw;
  background: rgba(0, 49, 5, 0.97);
  border-right: 2px solid var(--color-border);
  z-index: 201;
  transform: translateX(-100%);
  transition: transform var(--transition-slow) cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.drawer.open { transform: translateX(0); }

.drawer__header {
  padding: calc(var(--space-6) + env(safe-area-inset-top)) var(--space-5) var(--space-5);
  background: rgba(0, 73, 7, 0.9);
  border-bottom: 1px solid var(--color-border);
  flex-shrink: 0;
}

.drawer__logo-img {
  width: 80px;
  height: 80px;
  object-fit: contain;
  object-position: left center;
  margin-bottom: var(--space-3);
}

.drawer__user {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.drawer__avatar {
  width: 40px;
  height: 40px;
  background: var(--color-bg-input);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  border: 2px solid var(--color-border);
  flex-shrink: 0;
}

.drawer__user-name {
  font-family: var(--font-heading);
  font-size: var(--font-size-lg);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--color-white);
}

.drawer__user-meta {
  font-size: var(--font-size-xs);
  color: var(--color-text-muted);
  margin-top: 2px;
}

.drawer__body {
  flex: 1;
  overflow-y: auto;
  padding: var(--space-4) 0;
}

.drawer__section { margin-bottom: var(--space-4); }

.drawer__section-title {
  font-family: var(--font-condensed);
  font-stretch: condensed;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--color-text-dim);
  padding: var(--space-2) var(--space-5);
  margin-bottom: var(--space-1);
}

.drawer__item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-5);
  cursor: pointer;
  transition: background var(--transition-fast);
}

.drawer__item:active { background: rgba(0,146,15,0.15); }

.drawer__item-icon {
  width: 32px;
  height: 32px;
  background: rgba(0,146,15,0.15);
  border-radius: var(--radius-badge);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
  border: 1px solid var(--color-border);
}

.drawer__item-text {
  flex: 1;
  font-family: var(--font-body);
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-medium);
  color: var(--color-white);
}

.drawer__tournament-item {
  display: flex;
  flex-direction: column;
  padding: var(--space-3) var(--space-5);
  cursor: pointer;
  transition: background var(--transition-fast);
  border-left: 3px solid transparent;
}

.drawer__tournament-item.active {
  border-left-color: var(--color-yellow);
  background: rgba(234,255,0,0.06);
}

.drawer__tournament-item:active { background: rgba(0,146,15,0.15); }

.drawer__tournament-name {
  font-family: var(--font-heading);
  font-size: var(--font-size-base);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--color-white);
}

.drawer__tournament-meta {
  font-size: var(--font-size-xs);
  color: var(--color-text-muted);
  margin-top: 2px;
}

.drawer__footer {
  padding: var(--space-4) var(--space-5) calc(var(--space-4) + env(safe-area-inset-bottom));
  border-top: 1px solid var(--color-border);
  flex-shrink: 0;
}

/* ============================================
   GET STARTED SCREEN
   NOTE: .screen { display: none !important } controls visibility.
   Do NOT set display: flex here — it will override the hide rule.
   ============================================ */

.gs-inner {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: calc(48px + env(safe-area-inset-top)) 24px calc(48px + env(safe-area-inset-bottom));
  text-align: center;
  gap: 0;
}

.gs-logo {
  width: 140px;
  height: 140px;
  object-fit: contain;
  margin-bottom: 24px;
  filter: drop-shadow(0 4px 20px rgba(234,255,0,0.3));
}

.gs-title {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 400;
  text-transform: uppercase;
  color: var(--color-white);
  line-height: 1.1;
  letter-spacing: 0.02em;
  margin-bottom: 8px;
}

.gs-subtitle {
  font-family: var(--font-heading);
  font-size: 22px;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-yellow);
  margin-bottom: 16px;
}

.gs-tagline {
  font-family: var(--font-body);
  font-size: 16px;
  color: var(--color-text-muted);
  line-height: 1.6;
  max-width: 300px;
  margin-bottom: 32px;
}

.gs-actions {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 24px;
}

.gs-signin {
  font-family: var(--font-body);
  font-size: 16px;
  color: var(--color-text-muted);
}

.gs-signin a {
  color: var(--color-yellow);
  font-weight: var(--font-weight-semibold);
  text-decoration: underline;
}

/* ============================================
   AUTH SCREEN BASE
   NOTE: .screen { display: none !important } controls visibility.
   Do NOT set display: flex here — it overrides the hide rule.
   Use inner .auth-wrap to handle layout.
   ============================================ */

.auth-screen {
  /* no display property — controlled by .screen/.screen.active */
  background: transparent;
}

/* Inner wrapper — handles all layout/padding */
.auth-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: calc(72px + env(safe-area-inset-top)) 24px calc(48px + env(safe-area-inset-bottom));
  gap: 0;
  position: relative;
  width: 100%;
}

/* Back button — sticky so it stays visible while scrolling */
.auth-back {
  position: absolute;
  top: calc(20px + env(safe-area-inset-top));
  left: 20px;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,92,9,0.6);
  border-radius: var(--radius-pill);
  border: 2px solid var(--color-border);
  font-size: 18px;
  color: var(--color-white);
  cursor: pointer;
  transition: border-color var(--transition-fast);
  z-index: 5;
}

.auth-back:active { border-color: var(--color-border-active); }

/* Logo */
.auth-logo {
  width: 120px;
  height: 120px;
  object-fit: contain;
  display: block;
  margin-bottom: 24px;
  filter: drop-shadow(0 4px 16px rgba(234,255,0,0.25));
}

/* Title — Bungee 32px */
.auth-h1 {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 400;
  text-transform: uppercase;
  color: var(--color-white);
  letter-spacing: 0.02em;
  line-height: 1.1;
  margin-bottom: 8px;
  text-align: center;
}

/* Subtitle — Bangers 22px */
.auth-h2 {
  font-family: var(--font-heading);
  font-size: 22px;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-text-muted);
  margin-bottom: 24px;
  text-align: center;
}

/* Body subtitle (sentence case) */
.auth-subtitle {
  font-family: var(--font-body);
  font-size: 16px;
  color: var(--color-text-muted);
  margin-bottom: 24px;
  line-height: 1.6;
  text-align: center;
}

/* Form inside auth screen */
.auth-form-wrap {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Switch link line */
.auth-switch {
  font-family: var(--font-body);
  font-size: 16px;
  color: var(--color-text-muted);
  text-align: center;
  margin-top: 24px;
}

.auth-switch a {
  color: var(--color-yellow);
  font-weight: var(--font-weight-semibold);
  text-decoration: underline;
}

/* Forgot / small links */
.auth-link-right {
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--color-text-muted);
  text-decoration: underline;
  text-align: right;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
  width: 100%;
}

/* ---- Keep legacy header/body classes for notif-prefs and enter-pin ---- */

.auth-screen__header {
  padding: calc(var(--space-5) + env(safe-area-inset-top)) var(--space-5) var(--space-4);
  display: flex;
  align-items: center;
  gap: var(--space-3);
  flex-shrink: 0;
}

.auth-screen__back {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,92,9,0.6);
  border-radius: var(--radius-pill);
  border: 2px solid var(--color-border);
  font-size: 18px;
  color: var(--color-white);
  flex-shrink: 0;
  cursor: pointer;
  transition: border-color var(--transition-fast);
}

.auth-screen__back:active { border-color: var(--color-border-active); }

.auth-screen__title {
  font-family: var(--font-display);
  font-size: 32px;
  text-transform: uppercase;
  color: var(--color-white);
  letter-spacing: 0.02em;
  line-height: 1;
}

.auth-screen__body {
  flex: 1;
  overflow-y: auto;
  padding: 0 24px 48px;
  -webkit-overflow-scrolling: touch;
}

.auth-screen__logo {
  width: 120px;
  height: 120px;
  object-fit: contain;
  display: block;
  margin: 0 auto 24px;
  filter: drop-shadow(0 4px 16px rgba(234,255,0,0.25));
}

.auth-screen__subtitle {
  font-family: var(--font-body);
  font-size: 16px;
  color: var(--color-text-muted);
  margin-bottom: 24px;
  line-height: 1.6;
  text-align: center;
}

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

.auth-form__submit { margin-top: var(--space-2); }

.auth-form__social {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  margin-top: var(--space-2);
}

.auth-form__footer {
  margin-top: var(--space-6);
  text-align: center;
  font-family: var(--font-body);
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
}

.auth-form__footer a {
  color: var(--color-yellow);
  font-weight: var(--font-weight-semibold);
  text-decoration: underline;
}

.auth-form__terms {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  margin-top: var(--space-2);
}

.auth-form__terms input[type="checkbox"] {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  accent-color: var(--color-yellow);
  margin-top: 2px;
  cursor: pointer;
  border-radius: 4px;
}

.auth-form__terms-text {
  font-family: var(--font-body);
  font-size: var(--font-size-xs);
  color: var(--color-text-muted);
  line-height: 1.6;
}

.auth-form__terms-text a {
  color: var(--color-yellow);
  text-decoration: underline;
}

/* ============================================
   NOTIFICATION PREFERENCES SCREEN
   ============================================ */

.notif-prefs__channel-select {
  display: flex;
  gap: var(--space-2);
  margin-bottom: var(--space-5);
}

.channel-pill {
  flex: 1;
  padding: var(--space-3) var(--space-2);
  background: rgba(0, 61, 6, 0.8);
  border: 2px solid var(--color-border);
  border-radius: var(--radius-card);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-1);
  cursor: pointer;
  transition: border-color var(--transition-fast), background var(--transition-fast);
}

.channel-pill.selected {
  border-color: var(--color-yellow);
  background: rgba(234,255,0,0.08);
}

.channel-pill:active { background: rgba(0,146,15,0.2); }

.channel-pill__icon {
  font-size: 22px;
  line-height: 1;
}

.channel-pill__label {
  font-family: var(--font-condensed);
  font-stretch: condensed;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-text-muted);
}

.channel-pill.selected .channel-pill__label {
  color: var(--color-yellow);
}

.notif-toggle-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.notif-toggle-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-3) var(--space-4);
  background: rgba(0, 61, 6, 0.7);
  border-radius: var(--radius-card);
  border: 1px solid var(--color-border);
}

.notif-toggle-item__left {
  flex: 1;
  margin-right: var(--space-3);
}

.notif-toggle-item__label {
  font-family: var(--font-body);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-semibold);
  color: var(--color-white);
}

.notif-toggle-item__desc {
  font-family: var(--font-body);
  font-size: var(--font-size-xs);
  color: var(--color-text-muted);
  margin-top: 3px;
  line-height: 1.4;
}

.notif-toggle-item--sms-note {
  background: rgba(255, 140, 0, 0.08);
  border: 1px solid rgba(255, 140, 0, 0.3);
  border-radius: var(--radius-card);
  padding: var(--space-3) var(--space-4);
  font-family: var(--font-body);
  font-size: var(--font-size-xs);
  color: var(--color-orange);
  line-height: 1.6;
}
