/**
 * Page Fixtures Premier - Roster-style layout, dark mode
 * Unations FC - Matches roster page styling
 */

/* Dark mode */
.fixtures-page {
  max-width: 900px;
  margin: 0 auto;
  padding: 2rem 1rem 3rem;
  background: #0f0f12;
  color: #e8e8ea;
}

.fixtures-page[data-bs-theme="dark"] {
  background: #0f0f12;
}

/* Reuse roster header styles */
.fixtures-page .roster-header {
  text-align: center;
  margin-bottom: 2rem;
}

.fixtures-page .roster-title {
  font-size: 1.75rem;
  font-weight: 700;
  margin: 0 0 0.25rem 0;
  color: #fff;
}

.fixtures-page .roster-subtitle {
  font-size: 1rem;
  color: #adb5bd;
  margin: 0 0 1rem 0;
}

/* Nav tabs */
.fixtures-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
  margin-bottom: 1.25rem;
}

.fixtures-nav-btn {
  padding: 0.5rem 1.25rem;
  border-radius: 999px;
  font-weight: 500;
  font-size: 0.9rem;
  text-decoration: none;
  color: #adb5bd;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: transparent;
  transition: all 0.2s ease;
}

.fixtures-nav-btn:hover {
  border-color: rgba(248, 113, 113, 0.5);
  color: #f87171;
  background: rgba(248, 113, 113, 0.08);
}

.fixtures-nav-btn--active {
  background: #f87171;
  border-color: #f87171;
  color: #fff;
}

.fixtures-nav-btn--active:hover {
  background: #fb923c;
  border-color: #fb923c;
  color: #fff;
}

/* Header row: team select + search */
.fixtures-header-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.fixtures-team-select-wrap {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.fixtures-team-select-label {
  font-size: 0.9rem;
  font-weight: 500;
  color: #adb5bd;
  margin: 0;
}

.fixtures-team-select {
  padding: 0.5rem 2rem 0.5rem 0.75rem;
  font-size: 0.95rem;
  background: #1a1a1e;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 10px;
  color: #e8e8ea;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%23adb5bd' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10l-5 5z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  padding-right: 2rem;
}

.fixtures-team-select:hover,
.fixtures-team-select:focus {
  border-color: rgba(248, 113, 113, 0.5);
  outline: none;
}

/* Search - same as roster */
.fixtures-page .roster-search-wrap {
  position: relative;
  max-width: 360px;
  flex: 1;
  min-width: 200px;
  margin: 0;
}

.fixtures-page .roster-search-icon {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: #adb5bd;
  font-size: 1.1rem;
  pointer-events: none;
}

.fixtures-page .roster-search {
  width: 100%;
  padding: 0.75rem 1rem 0.75rem 2.75rem;
  font-size: 0.95rem;
  background: #1a1a1e;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  color: #e8e8ea;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.fixtures-page .roster-search::placeholder {
  color: #6b7280;
}

.fixtures-page .roster-search:focus {
  outline: none;
  border-color: rgba(248, 113, 113, 0.5);
  box-shadow: 0 0 0 3px rgba(248, 113, 113, 0.15);
}

/* Table wrap - same as roster */
.fixtures-page .roster-table-wrap {
  background: #1a1a1e;
  border-radius: 16px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.fixtures-page .roster-table {
  width: 100%;
  border-collapse: collapse;
}

/* Override fixtures_table.css light styles - force dark header */
.fixtures-page .fixtures-table thead th,
.fixtures-page .roster-table thead th,
.fixtures-page .roster-th {
  padding: 1rem 1.25rem;
  text-align: left;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #adb5bd !important;
  background: #25252a !important;
  border-bottom: 2px solid rgba(255, 255, 255, 0.1) !important;
}

.roster-th--match {
  min-width: 280px;
}

.roster-th--date {
  min-width: 110px;
}

.roster-th--result {
  min-width: 80px;
}

.roster-th--link {
  width: 56px;
  text-align: center;
}

.fixtures-page .roster-row {
  transition: background 0.2s;
}

.fixtures-page .roster-row:hover {
  background: rgba(255, 255, 255, 0.05);
}

.fixtures-page .roster-td {
  padding: 0.9rem 1.25rem;
  font-size: 0.95rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  vertical-align: middle;
  color: #e8e8ea;
}

.fixtures-page .roster-row:last-child .roster-td {
  border-bottom: none;
}

/* Match cell with logos */
.fixtures-match-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  gap: 1rem;
  text-decoration: none;
  color: inherit;
  font-weight: 600;
}

.fixtures-match-link:hover {
  color: #f87171;
}

.fixtures-team {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
  flex: 1;
}

.fixtures-team--home {
  justify-content: flex-start;
}

.fixtures-team--away {
  justify-content: flex-end;
}

.fixtures-team-info {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  align-items: flex-start;
  min-width: 0;
}

.fixtures-team--away .fixtures-team-info {
  align-items: flex-end;
  text-align: right;
}

.fixtures-team-label {
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #6b7280;
}

.fixtures-team--home .fixtures-team-label {
  color: #4ade80;
}

.fixtures-team--away .fixtures-team-label {
  color: #94a3b8;
}

.fixtures-logo-wrap {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  overflow: hidden;
  flex-shrink: 0;
  background: #25252a;
}

.fixtures-logo {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  padding: 4px;
}

.fixtures-team-name {
  line-height: 1.3;
}

.fixtures-vs {
  font-size: 0.8rem;
  font-weight: 500;
  color: #adb5bd;
  padding: 0 1rem;
  flex-shrink: 0;
}

.fixtures-badge {
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  padding: 0.2rem 0.5rem;
  border-radius: 6px;
}

.fixtures-badge--playoffs {
  background: rgba(234, 179, 8, 0.25);
  color: #fbbf24;
}

/* Playoff games - unique look */
.fixtures-row--playoffs {
  background: linear-gradient(90deg, rgba(234, 179, 8, 0.12) 0%, transparent 100%) !important;
  border-left: 4px solid #fbbf24;
}

.fixtures-row--playoffs .roster-td {
  border-bottom-color: rgba(251, 191, 36, 0.15);
}

.fixtures-row--playoffs:hover .roster-td {
  background: linear-gradient(90deg, rgba(234, 179, 8, 0.18) 0%, rgba(255, 255, 255, 0.04) 100%) !important;
}

.fixtures-row--playoffs .fixtures-badge--playoffs {
  background: rgba(251, 191, 36, 0.35);
  color: #fcd34d;
  box-shadow: 0 0 0 1px rgba(251, 191, 36, 0.3);
}

.fixtures-badge--home {
  background: rgba(34, 197, 94, 0.2);
  color: #4ade80;
}

.roster-td--date {
  color: #adb5bd;
}

.fixtures-result {
  font-weight: 600;
}

/* Result row accents */
.fixtures-row--win .fixtures-result {
  color: #4ade80;
}

.fixtures-row--loss .fixtures-result {
  color: #f87171;
}

.fixtures-row--draw .fixtures-result {
  color: #fbbf24;
}

.fixtures-page .roster-link-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  color: #adb5bd;
  text-decoration: none;
  transition: background 0.2s, color 0.2s, transform 0.2s;
}

.fixtures-page .roster-link-btn:hover {
  background: rgba(248, 113, 113, 0.2);
  color: #f87171;
  transform: translateX(2px);
}

.fixtures-page .roster-empty,
.fixtures-page .roster-no-results {
  margin: 1rem 0 0;
  color: #adb5bd;
  text-align: center;
}

/* Pagination - dark mode */
.fixtures-pagination {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 1.25rem;
  padding: 1rem 0;
}

.fixtures-pagination-info {
  margin: 0;
  font-size: 0.9rem;
  color: #adb5bd;
}

.fixtures-pagination-nav {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.fixtures-pagination-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  padding: 0 0.5rem;
  background: #1a1a1e;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 10px;
  color: #e8e8ea;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}

.fixtures-pagination-btn:hover:not(:disabled) {
  background: rgba(248, 113, 113, 0.15);
  border-color: rgba(248, 113, 113, 0.4);
  color: #f87171;
}

.fixtures-pagination-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.fixtures-pagination-pages {
  display: flex;
  gap: 0.25rem;
}

.fixtures-pagination-page {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  padding: 0 0.5rem;
  background: #1a1a1e;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 10px;
  color: #e8e8ea;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}

.fixtures-pagination-page:hover {
  background: rgba(248, 113, 113, 0.15);
  border-color: rgba(248, 113, 113, 0.4);
  color: #f87171;
}

.fixtures-pagination-page.fixtures-pagination-page--active {
  background: #f87171;
  border-color: #f87171;
  color: #fff;
  cursor: default;
}

.fixtures-pagination-page.fixtures-pagination-page--active:hover {
  background: #f87171;
  border-color: #f87171;
  color: #fff;
}

.fixtures-pagination-ellipsis {
  display: inline-flex;
  align-items: center;
  padding: 0 0.5rem;
  color: #6b7280;
  font-size: 0.9rem;
}

@media (max-width: 768px) {
  .fixtures-page .roster-table-wrap {
    overflow-x: auto;
  }

  .fixtures-page .roster-table {
    min-width: 520px;
  }

  .fixtures-page .roster-th,
  .fixtures-page .roster-td {
    padding: 0.75rem 1rem;
    font-size: 0.9rem;
  }

  .fixtures-logo-wrap {
    width: 32px;
    height: 32px;
  }

  .fixtures-team-name {
    font-size: 0.9rem;
  }
}
