/* calendar.css — Calendar page styles */

/* Calendar-specific variables */
:root {
  --accent-local: #10b981;
  --accent-road: #f59e0b;
  --accent-flight: #0891b2;
  --accent-national: #0891b2;
  /* Mobile theme variables */
  --m-bg: #f8fafc;
  --m-surface: #ffffff;
  --m-surface-elevated: #f1f5f9;
  --m-border: #e2e8f0;
  --m-text: #1e293b;
  --m-text-secondary: #64748b;
  --m-text-muted: #94a3b8;
  --m-accent: #0891b2;
  --m-local: #10b981;
  --m-road: #f59e0b;
  --m-flight: #0891b2;
  --m-star: #f59e0b;
}

body.mobile-dark {
  --m-bg: #0f172a;
  --m-surface: #1e293b;
  --m-surface-elevated: #334155;
  --m-border: rgba(255,255,255,0.1);
  --m-text: #f1f5f9;
  --m-text-secondary: #94a3b8;
  --m-text-muted: #64748b;
}

/* Container */
.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Page Header */
.header {
  margin-bottom: 32px;
}

.header-top {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}

.header-logo-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  padding: 4px;
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.header-logo-link:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 16px rgba(15, 23, 42, 0.15);
}

.header-logo-link:focus-visible {
  outline: 2px solid #0891b2;
  outline-offset: 3px;
}

.header-logo {
  width: 34px;
  height: 34px;
  object-fit: contain;
  display: block;
}

.accent-bar {
  width: 8px;
  height: 32px;
  background: #0891b2;
  border-radius: 4px;
}

.year-badge {
  background: #0891b2;
  padding: 4px 12px;
  border-radius: 100px;
  font-size: 12px;
  font-weight: 600;
  color: white;
}

.subtitle {
  color: var(--text-secondary);
  font-size: 14px;
  margin-left: 20px;
}

.calendar-updated-badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  border: 1px solid var(--border);
  border-radius: 100px;
  background: var(--bg-secondary);
  color: var(--text-secondary);
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
}

/* Stats Row */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

.stat-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.stat-card.local { border-color: rgba(16, 185, 129, 0.3); }
.stat-card.road { border-color: rgba(245, 158, 11, 0.3); }
.stat-card.flight { border-color: rgba(8, 145, 178, 0.3); }

.stat-number {
  font-size: 20px;
  font-weight: 700;
}

.stat-card.local .stat-number { color: var(--accent-local); }
.stat-card.road .stat-number { color: var(--accent-road); }
.stat-card.flight .stat-number { color: var(--accent-flight); }

.stat-label {
  color: var(--text-secondary);
  font-size: 11px;
}

/* Filter Bar */
.filter-bar {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 20px 24px;
  margin-bottom: 24px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 14px;
}

.filter-top {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.search-container {
  position: relative;
}

.search-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  opacity: 0.4;
  pointer-events: none;
}

.search-input {
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 16px 12px 44px;
  font-size: 14px;
  color: var(--text-primary);
  width: 320px;
  outline: none;
  transition: all 0.2s;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

.search-input:focus {
  border-color: rgba(8, 145, 178, 0.5);
  box-shadow: 0 0 0 3px rgba(8, 145, 178, 0.1);
}

.search-input::placeholder {
  color: var(--text-muted);
}

.filter-chips {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

.filter-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 100px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  border: 1px solid transparent;
  user-select: none;
  background: var(--bg-tertiary);
}

.filter-chip.active {
  background: var(--bg-secondary);
  border-color: var(--border);
}

.filter-chip:not(.active) {
  opacity: 0.5;
}

.filter-chip:hover {
  opacity: 1;
}

.filter-chip.star-only {
  padding: 8px 12px;
  font-size: 16px;
  line-height: 1;
  justify-content: center;
}

.filter-chip.star-only:not(.active) {
  opacity: 0.7;
}

.chip-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.divider {
  width: 1px;
  height: 20px;
  background: var(--border);
}

/* Table Container */
.table-container {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 20px;
  overflow: hidden;
}

.table-header {
  display: grid;
  grid-template-columns: 32px 36px 132px minmax(220px, 1.35fr) 52px 56px 70px 122px minmax(145px, 1fr) 60px 56px 86px;
  column-gap: 12px;
  padding: 12px 24px;
  background: var(--bg-tertiary);
  border-bottom: 1px solid var(--border);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  position: sticky;
  top: 0;
  z-index: 10;
}

.table-header span {
  white-space: nowrap;
}

.table-header .col-age {
  text-align: center;
}

.table-header span.sortable {
  cursor: pointer;
  user-select: none;
  transition: color 0.2s;
}

.table-header span.sortable:hover {
  color: var(--text-primary);
}

.table-header span.sortable::after {
  content: ' ↕';
  font-size: 0.9em;
  opacity: 0.4;
  margin-left: 4px;
}

.table-header span.sortable[data-sort="asc"]::after {
  content: ' ↑';
  opacity: 0.9;
}

.table-header span.sortable[data-sort="desc"]::after {
  content: ' ↓';
  opacity: 0.9;
}

/* Month Groups */
.month-group {
  margin-top: 32px;
}

.month-group:first-child {
  margin-top: 0;
}

.month-separator {
  padding: 12px 24px;
  background: var(--bg-tertiary);
  font-weight: 600;
  font-size: 13px;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border);
}

/* Table Rows */
.table-row {
  display: grid;
  grid-template-columns: 32px 36px 132px minmax(220px, 1.35fr) 52px 56px 70px 122px minmax(145px, 1fr) 60px 56px 86px;
  column-gap: 12px;
  align-items: center;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border-subtle, #f1f5f9);
  transition: all 0.15s ease;
  cursor: default;
}

.cell-format {
  font-weight: 700;
  font-size: 12px;
  color: var(--text-secondary);
  text-align: center;
}

.cell-level {
  font-weight: 700;
  font-size: 12px;
  color: var(--text-primary);
  text-align: center;
}

.cell-age {
  font-size: 12px;
  color: var(--text-secondary);
  text-align: center;
  font-weight: 600;
  font-family: monospace;
}

.table-row.even-row {
  background: var(--bg-tertiary);
}

.table-row:hover {
  background: var(--bg-tertiary);
  border-left: 3px solid #0891b2;
  margin-left: -3px;
  padding-left: 21px;
}

/* Star / Bookmark */
.cell-star {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  cursor: pointer;
  user-select: none;
  transition: transform 0.2s ease;
}

.cell-star:hover {
  transform: scale(1.2);
}

.cell-star.starred {
  color: #f59e0b;
}

.cell-star.unstarred {
  color: var(--text-muted);
  opacity: 0.4;
}

/* Table cells */
.cell-number {
  color: var(--text-muted);
  font-size: 13px;
  font-family: monospace;
  text-align: right;
  padding-right: 12px;
}

.cell-dates {
  color: var(--text-secondary);
  font-size: 13px;
  padding-right: 6px;
}

.cell-tournament {
  font-weight: 500;
  font-size: 14px;
  padding-right: 16px;
}

.cell-tournament a {
  color: var(--text-primary);
  text-decoration: none;
  border-bottom: 1px dotted var(--text-muted);
  transition: border-color 0.2s;
}

.cell-tournament a:hover {
  border-bottom-style: solid;
  border-bottom-color: #0891b2;
}

.cell-city a,
.cell-venue a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px dotted var(--text-muted);
  transition: border-color 0.2s;
}

.cell-city a:hover,
.cell-venue a:hover {
  border-bottom-style: solid;
  border-bottom-color: #0891b2;
}

.cell-divisions {
  font-size: 12px;
  color: var(--text-secondary);
  background: var(--bg-tertiary);
  padding: 4px 8px;
  border-radius: 6px;
  display: inline-block;
}

.cell-city {
  font-size: 13px;
}

.cell-venue {
  font-size: 13px;
  color: var(--text-secondary);
  padding-right: 16px;
}

.cell-draw {
  font-size: 13px;
  font-family: monospace;
}

/* Badges */
.type-badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.type-badge.national {
  background: rgba(8, 145, 178, 0.18);
  color: var(--accent-national);
}

.type-badge.sectional {
  background: var(--bg-tertiary);
  color: var(--text-muted);
}

/* Registered tournament indicator — desktop */
.table-row.registered {
  box-shadow: inset 3px 0 0 #16a34a;
}

html[data-theme="dark"] .table-row.registered {
  box-shadow: inset 3px 0 0 #22c55e;
}

.registered-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: linear-gradient(135deg, #16a34a, #22c55e);
  margin-right: 6px;
  vertical-align: middle;
  flex-shrink: 0;
  box-shadow: 0 0 0 2px rgba(22, 163, 74, 0.15);
  position: relative;
  top: -1px;
}

html[data-theme="dark"] .registered-dot {
  background: linear-gradient(135deg, #22c55e, #4ade80);
  box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.2);
}

/* Local page date link */
.cell-dates.has-local-page a {
  color: #047857;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.cell-dates.has-local-page a:hover,
.cell-dates.has-local-page a:focus-visible {
  text-decoration-thickness: 2px;
}

/* Proximity indicator */
.proximity-indicator {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 100px;
  font-size: 11px;
  font-weight: 600;
}

.proximity-indicator.local {
  background: rgba(16, 185, 129, 0.08);
  color: var(--accent-local);
}

.proximity-indicator.road {
  background: rgba(245, 158, 11, 0.08);
  color: var(--accent-road);
}

.proximity-indicator.flight {
  background: rgba(8, 145, 178, 0.08);
  color: var(--accent-flight);
}

/* Footer */
.footer {
  margin-top: 24px;
  font-size: 12px;
  color: var(--text-muted);
  text-align: center;
}

/* Desktop mobile-toggle link */
.desktop-mobile-toggle {
  display: none;
}

@media (max-width: 600px) {
  .desktop-mobile-toggle {
    display: inline-block;
    margin-left: 16px;
    font-size: 12px;
    color: var(--m-accent);
    cursor: pointer;
  }
}

/* === RESPONSIVE === */
@media (max-width: 1200px) {
  .table-header,
  .table-row {
    grid-template-columns: 30px 34px 120px minmax(200px, 1.35fr) 50px 52px 64px 110px minmax(140px, 1fr) 56px 52px 82px;
    column-gap: 10px;
  }
}

@media (max-width: 768px) {
  body:not(.mobile-view) .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  body:not(.mobile-view) .filter-bar {
    flex-direction: column;
    align-items: stretch;
  }

  body:not(.mobile-view) .search-input {
    width: 100%;
  }

  body:not(.mobile-view) .table-container {
    overflow-x: auto;
  }

  body:not(.mobile-view) .table-header,
  body:not(.mobile-view) .table-row {
    min-width: 1110px;
  }
}

/* === MOBILE VIEW === */
.mobile-container { display: none; }
body.mobile-view .container { display: none; }
body.mobile-view .mobile-container { display: block; }
body.mobile-view { padding: 0; background: var(--m-bg); }

.mobile-container {
  max-width: 100%;
  min-height: 100vh;
  background: var(--m-bg);
  color: var(--m-text);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  padding-bottom: 80px;
}

/* Mobile Header */
.m-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--m-surface);
  border-bottom: 1px solid var(--m-border);
  padding: 12px 16px 0;
}

.m-header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.m-header-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.m-header-logo {
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, #0891b2, #0d9488);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
}

.m-header-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--m-text);
  line-height: 1.2;
}

.m-header-subtitle {
  font-size: 11px;
  color: var(--m-text-secondary);
}

.m-header-brand .calendar-updated-badge {
  min-height: 0;
  margin-top: 4px;
  border-color: var(--m-border);
  background: var(--m-surface-elevated);
  color: var(--m-text-secondary);
  font-size: 10px;
  font-weight: 500;
  padding: 3px 7px;
}

.m-theme-toggle {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--m-surface-elevated);
  border: 1px solid var(--m-border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  cursor: pointer;
  transition: transform 0.2s;
}

.m-theme-toggle:active { transform: scale(0.95); }

/* Mobile Search */
.m-search-container {
  position: relative;
  margin-bottom: 12px;
}

.m-search-input {
  width: 100%;
  height: 40px;
  padding: 0 12px 0 40px;
  border-radius: 10px;
  border: 1px solid var(--m-border);
  background: var(--m-surface-elevated);
  font-size: 14px;
  color: var(--m-text);
  font-family: inherit;
}

.m-search-input::placeholder { color: var(--m-text-muted); }
.m-search-input:focus { outline: none; border-color: var(--m-accent); }

.m-search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--m-text-muted);
  pointer-events: none;
}

/* Mobile Stats */
.m-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 12px;
}

.m-stat-card {
  background: var(--m-surface-elevated);
  border: 1px solid var(--m-border);
  border-radius: 10px;
  padding: 8px 4px;
  text-align: center;
}

.m-stat-value {
  font-size: 18px;
  font-weight: 700;
}

.m-stat-card.local .m-stat-value { color: var(--m-local); }
.m-stat-card.road .m-stat-value { color: var(--m-road); }
.m-stat-card.flight .m-stat-value { color: var(--m-flight); }

.m-stat-label {
  font-size: 9px;
  color: var(--m-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

/* Mobile Month Pills */
.m-month-pills {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 12px;
  margin: 0 -16px;
  padding-left: 16px;
  padding-right: 16px;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.m-month-pills::-webkit-scrollbar { display: none; }

.m-month-pill {
  flex-shrink: 0;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
  border: 1px solid transparent;
  background: var(--m-surface-elevated);
  color: var(--m-text-secondary);
  cursor: pointer;
  transition: all 0.2s;
}

.m-month-pill.active {
  background: var(--m-accent);
  color: white;
  border-color: var(--m-accent);
}

/* Mobile Filter Bar */
.m-filter-bar {
  position: sticky;
  top: 178px;
  z-index: 90;
  background: var(--m-surface);
  border-bottom: 1px solid var(--m-border);
  padding: 10px 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.m-filter-chip {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
  background: var(--m-surface-elevated);
  color: var(--m-text-secondary);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.2s;
}

.m-filter-chip.active {
  background: rgba(245, 158, 11, 0.15);
  color: var(--m-star);
  border-color: rgba(245, 158, 11, 0.3);
}

.m-filter-chip svg { width: 14px; height: 14px; }

.m-filter-count {
  margin-left: auto;
  font-size: 12px;
  color: var(--m-text-muted);
}

/* Mobile Tournament Cards */
.m-tournament-list {
  padding: 16px;
}

.m-month-section {
  margin-bottom: 24px;
}

.m-month-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  padding-left: 4px;
}

.m-month-title {
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--m-text);
}

.m-month-count {
  font-size: 12px;
  color: var(--m-text-muted);
}

.m-tournament-card {
  background: var(--m-surface);
  border: 1px solid var(--m-border);
  border-radius: 14px;
  margin-bottom: 10px;
  overflow: hidden;
  transition: transform 0.15s;
}

.m-tournament-card:active { transform: scale(0.98); }

/* Registered tournament — mobile stripe (mirrors homepage .tournament-card::after pattern) */
.m-tournament-card.m-registered {
  position: relative;
}

.m-tournament-card.m-registered::after {
  content: '';
  position: absolute;
  top: 8px;
  left: -21px;
  width: 66px;
  height: 5px;
  background: linear-gradient(90deg, rgba(22, 163, 74, 0.82), rgba(34, 197, 94, 0.60));
  transform: rotate(-45deg);
  border-radius: 999px;
  box-shadow: 0 2px 6px rgba(22, 163, 74, 0.28);
  pointer-events: none;
  z-index: 2;
}

body.mobile-dark .m-tournament-card.m-registered::after {
  background: linear-gradient(90deg, rgba(34, 197, 94, 0.65), rgba(74, 222, 128, 0.45));
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.34);
}

.m-card-header {
  padding: 12px 12px 8px;
}

.m-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}

.m-card-title {
  flex: 1;
  min-width: 0;
}

.m-card-name {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.3;
  color: var(--m-text);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.m-card-name a {
  color: inherit;
  text-decoration: none;
}

.m-card-name a:hover,
.m-card-name a:focus-visible {
  text-decoration: underline;
  text-underline-offset: 2px;
}

.m-card-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
}

.m-type-badge {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.m-type-badge.national { color: var(--m-accent); }
.m-type-badge.sectional { color: var(--m-text-muted); }

.m-format-badge {
  font-size: 11px;
  color: var(--m-text-muted);
}

/* Local page link in card */
.m-detail-text.m-local-page-link {
  color: #047857;
  font-weight: 700;
  text-decoration: none;
}

.m-detail-text.m-local-page-link:hover,
.m-detail-text.m-local-page-link:focus-visible {
  text-decoration: underline;
  text-underline-offset: 2px;
}

.m-star-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--m-surface-elevated);
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  cursor: pointer;
  transition: all 0.2s;
  flex-shrink: 0;
  color: var(--m-text-muted);
}

.m-star-btn.starred {
  background: rgba(245, 158, 11, 0.15);
  color: var(--m-star);
}

.m-star-btn:active { transform: scale(0.9); }

/* Card Details Grid */
.m-card-details {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px 12px;
  padding: 0 12px 10px;
}

.m-detail-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.m-detail-icon {
  width: 16px;
  height: 16px;
  color: var(--m-text-muted);
  flex-shrink: 0;
}

.m-detail-text {
  font-size: 12px;
  color: var(--m-text);
}

.m-detail-link {
  text-decoration: underline;
  text-underline-offset: 2px;
}

.m-distance-badge {
  display: flex;
  align-items: center;
  gap: 4px;
}

.m-distance-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.m-distance-dot.local { background: var(--m-local); }
.m-distance-dot.road { background: var(--m-road); }
.m-distance-dot.flight { background: var(--m-flight); }

.m-distance-text { font-weight: 500; }
.m-distance-text.local { color: var(--m-local); }
.m-distance-text.road { color: var(--m-road); }
.m-distance-text.flight { color: var(--m-flight); }

/* Card Footer (Venue) */
.m-card-footer {
  padding: 8px 12px;
  background: var(--m-surface-elevated);
  border-top: 1px solid var(--m-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.m-venue-text {
  font-size: 11px;
  color: var(--m-text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-decoration: none;
}

a.m-venue-text:hover,
a.m-venue-text:focus-visible {
  text-decoration: underline;
  text-underline-offset: 2px;
}

.m-expand-btn {
  background: transparent;
  border: 1px solid var(--m-border);
  color: var(--m-accent);
  font-size: 11px;
  font-weight: 700;
  padding: 6px 10px;
  border-radius: 999px;
  cursor: pointer;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.m-expand-btn:active { transform: scale(0.98); }

.m-expand-chevron {
  display: inline-block;
  transition: transform 0.2s ease;
}

.m-tournament-card.expanded .m-expand-chevron {
  transform: rotate(180deg);
}

.m-card-extra {
  padding: 10px 12px 12px;
  border-top: 1px solid var(--m-border);
  background: var(--m-surface);
  display: none;
}

.m-tournament-card.expanded .m-card-extra { display: block; }

.m-extra-line {
  font-size: 12px;
  color: var(--m-text);
  line-height: 1.35;
  margin-top: 6px;
  word-break: break-word;
}

.m-extra-line:first-child { margin-top: 0; }

.m-extra-label {
  color: var(--m-text-muted);
  font-weight: 700;
  margin-right: 6px;
}

/* Bottom Sheet Filters */
.m-filter-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 200;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s;
}

.m-filter-overlay.open { opacity: 1; visibility: visible; }

.m-filter-sheet {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--m-surface);
  border-radius: 20px 20px 0 0;
  max-height: 75vh;
  overflow-y: auto;
  z-index: 201;
  transform: translateY(100%);
  transition: transform 0.3s ease;
}

.m-filter-overlay.open .m-filter-sheet { transform: translateY(0); }

.m-sheet-handle {
  width: 36px;
  height: 4px;
  background: var(--m-border);
  border-radius: 2px;
  margin: 12px auto;
}

.m-sheet-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px 16px;
}

.m-sheet-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--m-text);
}

.m-sheet-reset {
  font-size: 14px;
  color: var(--m-accent);
  background: none;
  border: none;
  cursor: pointer;
  font-weight: 500;
}

.m-sheet-section {
  padding: 0 20px 20px;
}

.m-sheet-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--m-text-muted);
  margin-bottom: 10px;
}

.m-sheet-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.m-sheet-option {
  padding: 8px 16px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 500;
  background: var(--m-surface-elevated);
  color: var(--m-text-secondary);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.2s;
}

.m-sheet-option.active {
  background: var(--m-accent);
  color: white;
  border-color: var(--m-accent);
}

.m-sheet-apply {
  margin: 0 20px 20px;
  padding: 14px;
  width: calc(100% - 40px);
  border-radius: 12px;
  background: linear-gradient(135deg, #0891b2, #0d9488);
  color: white;
  font-size: 15px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: transform 0.2s;
}

.m-sheet-apply:active { transform: scale(0.98); }

/* Mobile Empty State */
.m-empty-state {
  text-align: center;
  padding: 48px 24px;
}

.m-empty-icon { font-size: 48px; margin-bottom: 12px; }
.m-empty-text { color: var(--m-text-muted); font-size: 14px; }

/* Mobile Footer */
.m-footer {
  padding: 24px 16px;
  text-align: center;
  border-top: 1px solid var(--m-border);
  margin-top: 16px;
}

.m-footer-text {
  font-size: 11px;
  color: var(--m-text-muted);
  margin-bottom: 12px;
}

.m-view-toggle {
  font-size: 13px;
  color: var(--m-accent);
  background: none;
  border: none;
  cursor: pointer;
  text-decoration: underline;
}

/* Scroll to top FAB */
.m-scroll-top {
  position: fixed;
  bottom: 20px;
  right: 16px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--m-surface);
  border: 1px solid var(--m-border);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 50;
  transition: transform 0.2s;
}

.m-scroll-top:active { transform: scale(0.95); }
.m-scroll-top svg { color: var(--m-text-secondary); }
