/* ── TOURNAMENT CALENDAR PAGE ── */

/* Page hero */
.page-hero {
  padding: 56px 0 48px;
  background:
    radial-gradient(circle 400px at 10% 50%, rgba(200,164,74,0.07) 0%, transparent 70%),
    radial-gradient(ellipse 60% 50% at 85% 80%, rgba(161,98,7,0.05) 0%, transparent 60%);
  border-bottom: 1px solid var(--border);
  position: relative;
}

.page-hero::before {
  content: '♣';
  position: absolute;
  right: 60px; top: -30px;
  font-size: 220px;
  line-height: 1;
  color: rgba(200,164,74,0.04);
  pointer-events: none;
  user-select: none;
  font-family: sans-serif;
}

.page-hero__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
}

.page-hero__stats {
  display: flex;
  align-items: center;
  gap: 0;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  flex-shrink: 0;
}

.page-hero__stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px 32px;
  text-align: center;
}

.page-hero__stat-num {
  font-family: 'Comfortaa', sans-serif;
  font-size: 32px;
  font-weight: 700;
  color: var(--gold);
  line-height: 1;
}

.page-hero__stat-label {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 4px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.page-hero__stat-divider {
  width: 1px;
  height: 40px;
  background: var(--border);
  flex-shrink: 0;
}

@media (max-width: 768px) {
  .page-hero__inner { flex-direction: column; align-items: flex-start; }
  .page-hero__stats { width: 100%; }
  .page-hero__stat { flex: 1; padding: 16px 12px; }
  .page-hero__stat-num { font-size: 24px; }
}

/* ── LAYOUT ── */
.trn-layout {
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: 24px 0 60px;
}

/* ── HORIZONTAL FILTERS ── */
.trn-filters-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  flex-wrap: nowrap;
  margin-bottom: 24px;
}

.trn-date-chips {
  display: flex;
  gap: 6px;
  flex: 1;
  min-width: 280px;
}

.trn-date-chip {
  padding: 10px 18px;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  border-radius: 100px;
  font-family: 'Comfortaa', sans-serif;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
}

.trn-date-chip:hover {
  background: rgba(255,255,255,0.06);
  color: var(--text);
}

.trn-date-chip.active {
  background: var(--gold-dim);
  border-color: var(--gold-border);
  color: var(--gold);
}

/* Copy filter-select styles from clubs.css */
.filter-select-wrap {
  position: relative;
  min-width: 160px;
}

.filter-select-trigger {
  width: 100%;
  padding: 10px 14px;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  border-radius: 10px;
  font-family: 'Comfortaa', sans-serif;
  font-size: 13px;
  color: var(--text);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  transition: border-color var(--transition);
}

.filter-select-trigger:hover,
.filter-select-wrap.open .filter-select-trigger {
  border-color: var(--gold-border);
}

.filter-select-trigger svg {
  flex-shrink: 0;
  transition: transform var(--transition);
  color: var(--text-muted);
}

.filter-select-wrap.open .filter-select-trigger svg {
  transform: rotate(180deg);
}

.filter-select-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  min-width: 100%;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 8px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.35);
  z-index: 100;
  display: none;
}

.filter-select-wrap.open .filter-select-dropdown {
  display: block;
}

.trn-filter-check {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  font-size: 13px;
  color: var(--text);
  cursor: pointer;
  border-radius: 6px;
  transition: background var(--transition);
}

.trn-filter-check:hover {
  background: rgba(255,255,255,0.05);
}

.trn-filter-check input[type="checkbox"] {
  width: 16px;
  height: 16px;
  cursor: pointer;
}

.trn-reset-btn {
  padding: 10px 18px;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  border-radius: 10px;
  font-family: 'Comfortaa', sans-serif;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
  margin-left: auto;
}

.trn-reset-btn:hover {
  border-color: var(--gold-border);
  color: var(--gold);
}

@media (max-width: 900px) {
  .trn-filters-bar {
    flex-direction: column;
    align-items: stretch;
  }

  .trn-date-chips {
    min-width: 0;
    flex-wrap: wrap;
  }
}

/* ── OLD SIDEBAR (removed) ── */
.trn-sidebar {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  position: sticky;
  top: 80px;
}

.trn-sidebar__block {
  padding: 18px 18px;
  border-bottom: 1px solid var(--border);
}

.trn-sidebar__block:last-of-type { border-bottom: none; }

.trn-sidebar__title {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 12px;
}

/* Quick date buttons */
.trn-quick-dates {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.trn-date-btn {
  padding: 9px 12px;
  background: none;
  border: 1px solid transparent;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  text-align: left;
  transition: all var(--transition);
  cursor: pointer;
  font-family: 'Comfortaa', sans-serif;
}

.trn-date-btn:hover { background: rgba(255,255,255,0.05); color: var(--text); }

.trn-date-btn.active {
  background: var(--gold-dim);
  border-color: var(--gold-border);
  color: var(--gold);
}

/* Mini calendar */
.trn-mini-cal__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.trn-mini-cal__month {
  font-family: 'Comfortaa', sans-serif;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}

.trn-mini-cal__nav {
  width: 26px; height: 26px;
  display: flex; align-items: center; justify-content: center;
  background: none;
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--transition);
}

.trn-mini-cal__nav:hover { border-color: var(--gold-border); color: var(--gold); }

.trn-mini-cal__dow {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
  margin-bottom: 4px;
}

.trn-mini-cal__dow span {
  text-align: center;
  font-size: 10px;
  font-weight: 600;
  color: var(--text-dim);
  padding: 2px 0;
}

.trn-mini-cal__grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
}

.trn-cal-day {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 500;
  border-radius: 6px;
  cursor: pointer;
  color: var(--text-muted);
  transition: all var(--transition);
  position: relative;
}

.trn-cal-day:hover:not(.trn-cal-day--empty) { background: rgba(255,255,255,0.06); color: var(--text); }

.trn-cal-day--today {
  background: var(--gold-dim);
  color: var(--gold);
  font-weight: 700;
}

.trn-cal-day--active {
  background: var(--gold) !important;
  color: #0A0E14 !important;
  font-weight: 700;
}

.trn-cal-day--has-events::after {
  content: '';
  position: absolute;
  bottom: 2px;
  left: 50%; transform: translateX(-50%);
  width: 4px; height: 4px;
  background: var(--gold);
  border-radius: 50%;
}

.trn-cal-day--active::after { background: #0A0E14; }

.trn-cal-day--empty { cursor: default; }

/* Checkboxes */
.trn-check-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.trn-check-list--scroll {
  max-height: 180px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}

.trn-check {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 13px;
  color: var(--text-muted);
  cursor: pointer;
  padding: 3px 0;
  transition: color var(--transition);
}

.trn-check:hover { color: var(--text); }

.trn-check input[type="checkbox"] {
  width: 15px; height: 15px;
  accent-color: var(--gold);
  cursor: pointer;
  flex-shrink: 0;
}

/* Range */
.trn-range { display: flex; flex-direction: column; gap: 8px; }

.trn-range__input {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 4px;
  background: var(--border-strong);
  border-radius: 2px;
  outline: none;
}

.trn-range__input::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: var(--gold);
  cursor: pointer;
  box-shadow: 0 0 8px rgba(200,164,74,0.4);
}

.trn-range__labels {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-muted);
}

/* Club search */
.trn-search-input {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 12px;
  margin-bottom: 10px;
  transition: border-color var(--transition);
}

.trn-search-input:focus-within { border-color: var(--gold-border); }

.trn-search-input svg { color: var(--text-dim); flex-shrink: 0; }

.trn-search-input input {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  font-family: 'Comfortaa', sans-serif;
  font-size: 13px;
  color: var(--text);
}

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

/* Reset button */
.trn-reset-btn {
  display: block;
  width: 100%;
  padding: 11px;
  background: none;
  border: none;
  font-family: 'Comfortaa', sans-serif;
  font-size: 13px;
  color: var(--text-muted);
  cursor: pointer;
  transition: color var(--transition);
  border-top: 1px solid var(--border);
}

.trn-reset-btn:hover { color: var(--gold); }

/* ── MAIN AREA ── */
.trn-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.trn-count {
  font-size: 14px;
  color: var(--text-muted);
}

.trn-count span {
  font-weight: 700;
  color: var(--gold);
}

.trn-toolbar__right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.trn-sort {
  padding: 8px 14px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-family: 'Comfortaa', sans-serif;
  font-size: 13px;
  color: var(--text-muted);
  cursor: pointer;
  outline: none;
  transition: border-color var(--transition);
}

.trn-sort:focus { border-color: var(--gold-border); }

.trn-view-toggle {
  display: flex;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}

.trn-view-btn {
  padding: 8px 10px;
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--transition);
}

.trn-view-btn.active {
  background: var(--gold-dim);
  color: var(--gold);
}

/* ── TOURNAMENT LIST (list view) ── */
.trn-list { display: flex; flex-direction: column; gap: 0; }

/* Date group header */
.trn-group {
  margin-bottom: 8px;
}

.trn-group__header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0 8px;
  margin-bottom: 4px;
}

.trn-group__date-badge {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 48px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 6px 10px;
}

.trn-group__date-badge--today {
  background: var(--gold-dim);
  border-color: var(--gold-border);
}

.trn-group__day {
  font-family: 'Comfortaa', sans-serif;
  font-size: 20px;
  font-weight: 700;
  line-height: 1;
  color: var(--gold);
}

.trn-group__month {
  font-size: 10px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.trn-group__label {
  font-family: 'Comfortaa', sans-serif;
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
}

.trn-group__label-sub {
  font-size: 12px;
  color: var(--text-muted);
  margin-left: 6px;
}

.trn-group__rows { display: flex; flex-direction: column; gap: 6px; }

/* Tournament row */
.trn-row {
  display: grid;
  grid-template-columns: 56px 1fr 110px 90px 130px 40px;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color var(--transition), transform var(--transition), box-shadow var(--transition);
  cursor: pointer;
  text-decoration: none;
  color: inherit;
}

.trn-row:hover {
  border-color: var(--gold-border);
  transform: translateX(4px);
  box-shadow: 0 2px 16px rgba(0,0,0,0.25);
}

.trn-row__time {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.trn-row__time-val {
  font-family: 'Comfortaa', sans-serif;
  font-size: 16px;
  font-weight: 700;
  color: var(--gold);
  line-height: 1;
}

.trn-row__time-label {
  font-size: 10px;
  color: var(--text-dim);
  margin-top: 3px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.trn-row__info { min-width: 0; }

.trn-row__name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 3px;
}

.trn-row__club {
  font-size: 12px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.trn-row__format { }

.trn-row__buyin {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  text-align: right;
}

.trn-row__buyin--free { color: #4CAF50; }

.trn-row__guarantee {
  font-size: 12px;
  color: var(--text-muted);
  text-align: right;
  line-height: 1.4;
}

.trn-row__guarantee strong {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}

.trn-row__arrow {
  width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,0.04);
  border-radius: 8px;
  color: var(--text-muted);
  transition: all var(--transition);
  flex-shrink: 0;
}

.trn-row:hover .trn-row__arrow { background: var(--gold-dim); color: var(--gold); }

/* ── GRID VIEW ── */
.trn-list--grid {
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 12px;
}

.trn-list--grid .trn-group {
  grid-column: 1 / -1;
}

.trn-list--grid .trn-group__rows {
  display: contents;
}

.trn-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  cursor: pointer;
  transition: border-color var(--transition), transform var(--transition), box-shadow var(--transition);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.trn-card:hover {
  border-color: var(--gold-border);
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.3), 0 0 32px rgba(200,164,74,0.1);
}

.trn-card__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.trn-card__time {
  display: flex;
  flex-direction: column;
}

.trn-card__time-val {
  font-family: 'Comfortaa', sans-serif;
  font-size: 24px;
  font-weight: 700;
  color: var(--gold);
  line-height: 1;
}

.trn-card__time-date {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}

.trn-card__format { flex-shrink: 0; }

.trn-card__name {
  font-family: 'Comfortaa', sans-serif;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.25;
}

.trn-card__club {
  font-size: 13px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 5px;
}

.trn-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  margin-top: auto;
}

.trn-card__buyin {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
}

.trn-card__buyin--free { color: #4CAF50; }

.trn-card__prize {
  font-size: 12px;
  color: var(--text-muted);
  text-align: right;
}

.trn-card__prize strong {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--gold);
}

/* Load more */
.trn-load-more {
  display: flex;
  justify-content: center;
  padding: 32px 0 48px;
}

/* Mobile filter sidebar */
.trn-sidebar--mobile-open {
  display: block !important;
}

.mobile-filter-bar { display: none; }

@media (max-width: 900px) {
  .trn-sidebar {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 300;
    overflow-y: auto;
    border-radius: 0;
    top: 64px;
  }
  .mobile-filter-bar { display: flex; }
}

/* Tournament row responsive */
@media (max-width: 700px) {
  .trn-row {
    grid-template-columns: 50px 1fr 80px 36px;
    gap: 10px;
    padding: 12px 14px;
  }
  .trn-row__format,
  .trn-row__guarantee { display: none; }
  .trn-row__buyin { text-align: left; }
}

@media (max-width: 480px) {
  .trn-row { grid-template-columns: 44px 1fr 36px; }
  .trn-row__buyin { display: none; }
}

/* Empty state */
.trn-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 64px 24px;
  text-align: center;
  color: var(--text-muted);
  gap: 12px;
}

.trn-empty svg { color: var(--text-dim); opacity: 0.5; }
.trn-empty__title { font-size: 18px; font-weight: 600; color: var(--text-muted); }
.trn-empty__sub { font-size: 14px; color: var(--text-dim); }
