:root {
  /* Theme colors will be loaded by theme-manager.js from theme.json */
  /* Legacy variables for backward compatibility */
  --club-primary: var(--theme-primary);
  --club-secondary: var(--theme-secondary);
}

/* Global font family - controlled by theme config */
body, *, h1, h2, h3, h4, h5, h6 {
  font-family: var(--theme-font-family, 'Outfit', sans-serif) !important;
  font-weight: var(--theme-font-weight, 400) !important;
}

/* Font Awesome icons override */
.fa, .fas, .far, .fal, .fab {
  font-family: "Font Awesome 6 Free", "Font Awesome 6 Pro", "Font Awesome 6 Brands" !important;
  color: var(--theme-secondary) !important;
  font-weight: 900 !important;
  padding-left: 10px !important;
  padding-right: 10px !important;
}

/* Typography classes */
.outfit-light { font-family: "Outfit", sans-serif; font-weight: 300; }
.outfit-regular { font-family: "Outfit", sans-serif; font-weight: 400; }
.outfit-medium { font-family: "Outfit", sans-serif; font-weight: 500; }
.outfit-semibold { font-family: "Outfit", sans-serif; font-weight: 600; }
.outfit-bold { font-family: "Outfit", sans-serif; font-weight: 700; }

.fredoka-light { font-family: "Fredoka", sans-serif; font-weight: 300; font-variation-settings: "wdth" 100; }
.fredoka-regular { font-family: "Fredoka", sans-serif; font-weight: 400; font-variation-settings: "wdth" 100; }
.fredoka-medium { font-family: "Fredoka", sans-serif; font-weight: 500; font-variation-settings: "wdth" 100; }
.fredoka-semibold { font-family: "Fredoka", sans-serif; font-weight: 600; font-variation-settings: "wdth" 100; }
.fredoka-bold { font-family: "Fredoka", sans-serif; font-weight: 700; font-variation-settings: "wdth" 100; }

/* Button styles using theme variables */
.btn-primary {
  background: var(--theme-primary) !important;
  border-color: var(--theme-primary) !important;
}

.btn-primary:hover {
  background: var(--theme-secondary) !important;
  border-color: var(--theme-secondary) !important;
}

.btn-secondary {
  background: var(--theme-secondary) !important;
  border-color: var(--theme-secondary) !important;
}

.btn-success {
  background: var(--theme-success) !important;
  border-color: var(--theme-success) !important;
  color: white !important;
}

.btn-success:hover {
  background: var(--theme-success) !important;
  border-color: var(--theme-success) !important;
  opacity: 0.9;
}

.btn-warning {
  background: var(--theme-warning) !important;
  border-color: var(--theme-warning) !important;
}

.btn-danger {
  background: var(--theme-error) !important;
  border-color: var(--theme-error) !important;
  color: white !important;
}

.btn-danger .fa,
.btn-danger .fas {
  color: white !important;
}

.btn-info,
.btn-view {
  background: var(--theme-info) !important;
  border-color: var(--theme-info) !important;
  color: white !important;
}

.btn-info:hover,
.btn-view:hover {
  background: var(--theme-info) !important;
  border-color: var(--theme-info) !important;
  opacity: 0.9;
}

/* Navigation styles */
.header {
  background: var(--theme-primary) !important;
  color: var(--theme-background) !important;
}

.header .container {
  padding: 10px !important;
  width: 100% !important;
  max-width: none !important;
}

.header h1, .header * {
  color: var(--theme-background) !important;
}

/* Form styles */
.form-control:focus,
input:focus,
select:focus,
textarea:focus {
  border-color: var(--theme-primary) !important;
  box-shadow: 0 0 0 2px rgba(17, 16, 55, 0.2) !important;
}

/* Card styles */
.card {
  background: var(--theme-surface) !important;
  border-color: var(--theme-accent) !important;
}

/* Login styles */
.login-page {
  background: var(--theme-primary) !important;
}

.login-box {
  background: var(--theme-surface) !important;
  border-top: 4px solid var(--theme-primary) !important;
}

.login-links a {
  color: var(--theme-secondary) !important;
}

.login-links a:hover {
  color: var(--theme-primary) !important;
}

/* Status indicators */
.status-pending { background: var(--theme-warning) !important; }
.status-completed { background: var(--theme-success) !important; }
.status-cancelled { background: var(--theme-error) !important; }
.status-active { background: var(--theme-info) !important; }

/* Calendar navigation arrows */
.btn-small.btn-secondary,
#dashPrevMonth,
#dashNextMonth,
#prevMonth,
#nextMonth,
.calendar-nav .btn {
  background: var(--theme-info) !important;
  border-color: var(--theme-info) !important;
}

/* Availability buttons */
.btn-available,
.available {
  background: var(--theme-success) !important;
  border-color: var(--theme-success) !important;
}

.btn-unavailable,
.unavailable {
  background: var(--theme-error) !important;
  border-color: var(--theme-error) !important;
  color: white !important;
}

/* Game status badges */
.status-live {
  background: #dc3545;
  color: white;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  animation: pulse 2s infinite;
}

.status-selected {
  background: #17a2b8;
  color: white;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
}

.status-cancelled {
  background: #6c757d;
  color: white;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
}

.status-pending {
  background: #fd7e14;
  color: white;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
}

.status-scheduled {
  background: #ffc107;
  color: black;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
}

/* Result indicators */
.result-win {
  background: #28a745;
  color: white;
  padding: 4px 8px;
  border-radius: 4px;
  font-weight: bold;
}

.result-loss {
  background: #dc3545;
  color: white;
  padding: 4px 8px;
  border-radius: 4px;
  font-weight: bold;
}

.result-draw {
  background: #ffc107;
  color: black;
  padding: 4px 8px;
  border-radius: 4px;
  font-weight: bold;
}

/* Action button groups */
.action-buttons {
  display: flex;
  gap: 4px;
}

/* Game table styles */
.game-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 10px;
}

.game-table thead tr {
  background: #f8f9fa;
  border-bottom: 2px solid #dee2e6;
}

.game-table th {
  padding: 12px 8px;
  text-align: left;
  font-weight: 600;
  color: #495057 !important;
}

.game-table th.center {
  text-align: center;
}

.game-table tbody tr {
  border-bottom: 1px solid #dee2e6;
}

.game-table td {
  padding: 12px 8px;
  color: #495057;
}

.game-table td.center {
  text-align: center;
}

.game-table td.bold {
  font-weight: 500;
}

.game-table td.muted {
  color: #6c757d;
}

/* Level badges */
.level-badge {
  color: white;
  padding: 2px 6px;
  border-radius: 3px;
  font-size: 11px;
  text-transform: uppercase;
}

.level-badge.national {
  background: #007bff;
}

.level-badge.county {
  background: #6c757d;
}

.level-badge.club {
  background: #6c757d;
}

/* Pagination */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 15px;
  margin-top: 20px;
  padding: 20px;
}

.pagination span {
  padding: 0 15px;
}

.pagination select {
  padding: 8px;
  border-radius: 4px;
  border: 1px solid #ced4da;
}

.pagination .total-count {
  color: #6c757d;
}