/* ============================================================
   Page-specific styles — consolidated from per-route CSS files
   ============================================================ */

/* --- availability-enhanced.css --- */
/* Enhanced styles for availability planner and form */

.availability-card {
    background-color: var(--bs-body-bg);
    border: 1px solid var(--bs-border-color);
    border-radius: 0.5rem;
}

.time-slot-bar {
    background: #1D2332;
    border-radius: 0.75rem;
    padding: 12px;
    margin-bottom: 1rem;
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: block;
}

.progress {
    background-color: #ffffff; /* White background for better visibility */
    height: 4px; /* Keep slim progress bar */
    border-radius: 2px;
    overflow: hidden;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.7);
    border: 1px solid #000;
    margin-bottom: 8px;
}

.progress-bar {
    background-color: #496E78; /* Teal progress bar */
    background-image: none;
    box-shadow: 0 0 8px rgba(26, 89, 40, 0.7);
}

.availability-details {
    font-size: 0.8rem;
    color: var(--bs-secondary-color);
}

.player-list {
    font-size: 0.75rem;
    margin-top: 0.5rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
}

/* Remove individual player badge styling to allow player-badges-fix.css to control the appearance */
/* This ensures consistency across the application */

/* Position response buttons on the right side */
.response-buttons {
    display: flex;
    justify-content: flex-end;
    margin-top: 0.75rem;
    gap: 0.5rem;
}

.response-buttons .btn {
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    border-width: 2px;
    transition: all 0.2s ease;
    box-shadow: none;
}

.response-buttons .btn.active {
    border-width: 2px;
    font-weight: 600;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.9);
}

/* Button colors - matching our badge colors */
.btn-outline-success {
    color: #496E78;
    border-color: #496E78;
    background-color: transparent;
}

.btn-outline-success:hover {
    color: #496E78;
    border-color: #496E78;
    background-color: transparent;
    font-weight: 600;
}

.btn-outline-success.active {
    background-color: #496E78; /* Teal - match badge */
    border-color: #496E78;
    color: white;
}

.btn-outline-danger {
    color: #8B0000;
    border-color: #8B0000;
    background-color: transparent;
}

.btn-outline-danger:hover {
    color: #6B0000;
    border-color: #6B0000;
    background-color: transparent;
    font-weight: 600;
}

.btn-outline-danger.active {
    background-color: #8B0000; /* Dark red - match badge */
    border-color: #8B0000;
    color: white;
}

.btn-outline-warning {
    color: #fd7e14;
    border-color: #fd7e14;
    background-color: transparent;
}

.btn-outline-warning:hover {
    color: #fd7e14;
    border-color: #fd7e14;
    background-color: transparent;
    font-weight: 600;
}

.btn-outline-warning.active {
    background-color: #fd7e14; /* Orange - match badge */
    border-color: #fd7e14;
    color: white;
}

.date-header {
    font-weight: 600;
    margin-bottom: 0.75rem;
    border-bottom: 1px solid var(--bs-border-color);
    padding-bottom: 0.5rem;
}

.date-section {
    margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--bs-border-color);
    padding-bottom: 1rem;
}

/* First submitter form styles */
#selected-slots-count {
    font-size: 0.8rem;
    padding: 4px 12px;
    border-radius: 20px;
    display: inline-block;
    background-color: #555;
    color: white;
    font-weight: 600;
    position: sticky;
    top: 10px;
    z-index: 1000;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    letter-spacing: 0.5px;
}

.date-counter-badge {
    font-size: 0.7rem;
    padding: 2px 8px;
    border-radius: 12px;
    display: inline-block;
    background-color: #555;
    color: white;
    font-weight: 600;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
    letter-spacing: 0.5px;
}

.date-counter-badge.complete {
    background-color: #496E78;
}

.date-counter-badge.incomplete {
    background-color: #8B0000;
}

/* Position the counter on top when scrolling */
.sticky-count-container {
    position: sticky;
    top: 0;
    z-index: 1000;
    background-color: #212529;
    padding: 10px 0;
    border-bottom: 1px solid #444;
    margin-top: 10px;
}

#selected-slots-count.text-success {
    color: white;
    background-color: #496E78;
}

#selected-slots-count.text-danger {
    color: white;
    background-color: #8B0000;
}

/* Matching dates popup styling */
.matching-dates-container {
    background-color: #496E78; /* Teal background - match badge */
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 20px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.3);
    border: 1px solid #496E78;
    animation: fadeIn 0.5s ease-in-out;
    background-image: linear-gradient(to bottom right, #496E78, #496E78);
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.matching-dates-title {
    font-weight: bold;
    color: white;
    margin-bottom: 10px;
    font-size: 1.1rem;
    text-shadow: 0 1px 2px rgba(0,0,0,0.8);
}

.matching-date-item {
    background-color: rgba(255,255,255,0.1);
    border-radius: 4px;
    padding: 8px 12px;
    margin-bottom: 6px;
    color: white;
    font-weight: 500;
}

/* Button styling consistency */
.btn-primary, .btn-dark {
    font-weight: 500;
    padding: 0.5rem 1rem;
    transition: all 0.2s ease;
}

.dark-theme .planner-button {
    background-color: #0d6efd;
    border-color: #0a58ca;
    color: white;
    font-weight: 500;
}

/* Fix disabled button color for propose button */
button:disabled,
.btn:disabled {
    background-color: #2a2a2a;
    border-color: #333;
    color: #666;
    opacity: 0.8;
}

.form-check-input:checked {
    background-color: #0d6efd;
    border-color: #0d6efd;
}

.date-card {
    background: #111827;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 0.5rem;
    padding: 1rem;
    margin-bottom: 1rem;
}

.time-slots {
    margin-top: 0.5rem;
}

.remove-date {
    transition: all 0.2s ease;
}

.remove-date:hover {
    background-color: #dc3545;
    color: white;
}

#generateDates {
    height: 38px;
}

/* Remove badge styling so player-badges-fix.css takes precedence */

/* Pill-shaped tab button style - matches Matches/Leaderboard/Overview tabs */
/* White on translucent white -- written for a dark background, which is
   what this theme used to have. On the light theme it left "add a week"
   almost invisible. Uses the theme tokens now, so it follows light and
   dark automatically. */
.btn-pill-tab {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 1.25rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--ios-tint, #007AFF);
    background: var(--ios-tint-soft, rgba(0, 122, 255, 0.10));
    border: 1px solid var(--ios-tint, #007AFF);
    border-radius: 50px;
    text-decoration: none;
    transition: all 0.2s ease;
    cursor: pointer;
}

.btn-pill-tab:hover {
    background: var(--ios-tint, #007AFF);
    color: #fff;
    text-decoration: none;
}

.btn-pill-tab:active {
    transform: scale(0.98);
}

.btn-pill-tab i,
.btn-pill-tab svg {
    flex-shrink: 0;
}

/* Pill-shaped Propose button for availability planner */
.btn.btn-primary[type="submit"],
button[type="submit"].btn-primary,
#submitBtn.btn-primary {
    border-radius: 50px;
    padding: 0.5rem 1.5rem;
}

/* --- availability-dark-theme.css --- */
/**
 * Dark minimalistic theme for the availability planner
 */

/* Prevent zooming on mobile for app-like feel */
@viewport {
  width: device-width;
  zoom: 1.0;
  user-zoom: fixed;
}

@-ms-viewport {
  width: device-width;
  user-zoom: fixed;
}

/* Meta tag added to base.html will enforce this */

/* Main availability card styling - very dark theme */
.availability-card {
  background-color: #121212;
  border: none;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35);
}

.availability-card .card-header {
  background-color: #0a0a0a;
  border-bottom: 1px solid #1a1a1a;
  color: #fff;
}

.availability-card .card-body {
  padding: 1.5rem;
  color: #e0e0e0; 
}

/* Alert styling */
.alert-info {
  background-color: #1a1a1a;
  border-color: #2a2a2a;
  color: #e0e0e0;
}

/* Date header styling */
.date-header {
  color: #ffffff;
  border-bottom: 1px solid #333;
  padding-bottom: 0.5rem;
  margin-bottom: 1rem;
  font-weight: 500;
}

/* Time slot bars - solid color */
.time-slot-bar {
  background: #1D2332;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 0.75rem;
  padding: 12px;
}

.time-slot-bar:hover {
  background: #252b3d;
}

/* Time range badges - pill-shaped */
.time-range {
  background-color: rgba(108, 117, 125, 0.15);
  color: #6c757d;
  font-size: 0.65rem;
  font-weight: 500;
  padding: 0.2rem 0.6rem;
  border-radius: 50px;
  border: 1px solid rgba(108, 117, 125, 0.2);
  display: inline-block;
  text-align: center;
}

.time-slot-bar h6 {
  color: #f0f0f0;
  font-weight: 500;
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
}

.availability-percentage {
  color: #bbb;
  font-size: 0.85rem;
  margin-bottom: 0.25rem;
}

/* Date card containers - Level 2: #111827 with subtle border */
.date-card {
  background: #111827;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 0.5rem;
  padding: 1rem;
  margin-bottom: 1rem;
}

/* Perfect match slots summary */
.perfect-slots-summary {
  background-color: #050f08;
  border-radius: 12px;
  padding: 1.2rem 1.4rem;
  margin: 1rem 0 1.8rem 0;
  color: white;
  font-size: 0.95rem;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.6);
  border: 1px solid #496E78;
  opacity: 0;
  transform: translateY(-10px);
  animation: fadeInDown 0.5s forwards;
  position: relative;
}

.perfect-slots-summary::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(10, 68, 34, 0.4) 0%, transparent 80%);
  pointer-events: none;
  border-radius: 8px;
}

.perfect-slots-summary h6 {
  font-weight: 600;
  margin-bottom: 0.8rem;
  letter-spacing: 0.5px;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.perfect-slots-summary h6 i {
  color: #2cdb5a;
  margin-right: 0.5rem;
}

.perfect-slots-summary ul {
  margin-bottom: 0;
}

.perfect-slots-summary li {
  padding: 0.25rem 0;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.1);
}

.perfect-slots-summary li:last-child {
  border-bottom: none;
}

/* No perfect slots message */
.no-perfect-slots {
  background-color: #0a0a0a;
  border-radius: 8px;
  padding: 1rem 1.2rem;
  margin: 1rem 0 1.5rem 0;
  color: #cccccc;
  font-size: 0.9rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
  border: 1px solid #333;
}

.no-perfect-slots h6 {
  font-weight: 600;
  margin-bottom: 0.8rem;
  letter-spacing: 0.5px;
}

.no-perfect-slots h6 i {
  color: #999;
  margin-right: 0.5rem;
}

/* Custom checkbox styling - make them round */
.form-check-input {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  width: 18px;
  height: 18px;
  min-width: 18px;
  min-height: 18px;
  border-radius: 50%;
  border: 2px solid #496E78;
  background-color: transparent;
  margin-top: 2px;
  cursor: pointer;
}

.form-check-input:checked {
  background-color: #496E78;
  border-color: #496E78;
}

.form-check-input:hover {
  border-color: #5a8a96;
}

.form-check-input:focus {
  border-color: #5a8a96;
  box-shadow: 0 0 0 0.2rem rgba(73, 110, 120, 0.25);
}

/* Animation for perfect slots summary */
@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Progress bar styling - super slim stroke style */
.progress {
  background-color: #111111;
  height: 4px;
  border-radius: 2px;
  overflow: hidden;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.7);
  border: 1px solid #000;
  margin-bottom: 8px;
}

.progress-bar.bg-success {
  background-color: #496E78; /* Teal */
  background-image: linear-gradient(to right, #496E78, #3a5860);
  box-shadow: 0 0 8px rgba(73, 110, 120, 0.7);
}

.progress-bar.bg-warning {
  background-color: #D2A679; /* Perzik */
  background-image: linear-gradient(to right, #D2A679, #b8915e);
}

.progress-bar.bg-danger {
  background-color: #978CC2; /* Lila */
  background-image: linear-gradient(to right, #978CC2, #7a6fa8);
}

/* Remove player-list specific badge styling to allow the global badge styles from player-badges-fix.css to apply */
.player-list {
  display: flex;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

/* No custom styles for the badges themselves to ensure consistent styling across the app */

/* Response buttons */
.response-buttons {
  margin-top: 1rem;
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
}

.response-btn {
  border-width: 2px;
  font-weight: 500;
  padding: 0.3rem 0.8rem;
  min-width: 70px;
  transition: all 0.2s ease;
}

/* Button colors - matching our DARKER badges */
.btn-outline-success {
  color: #496E78;
  border-color: #496E78;
  border-width: 2px;
}

.btn-outline-success:hover,
.btn-outline-success.active {
  background-color: #496E78; /* Very teal - match badge */
  border-color: #496E78;
  color: white;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.9);
  font-weight: 600;
}

.btn-outline-danger {
  color: #dc3545;
  border-color: #dc3545;
  border-width: 2px;
}

.btn-outline-danger:hover,
.btn-outline-danger.active {
  background-color: #978CC2; /* Very dark red - match badge */
  border-color: #978CC2;
  color: white;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.9);
  font-weight: 600;
}

.btn-outline-warning {
  color: #fd7e14;
  border-color: #fd7e14;
  border-width: 2px;
}

.btn-outline-warning:hover,
.btn-outline-warning.active {
  background-color: #D2A679; /* Perzik */
  border-color: #D2A679;
  color: #111;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
  text-shadow: none;
  font-weight: 600;
}
/* --- availability-planner-badge-colors.css --- */
/* 
 * This CSS file ONLY changes all colors in the availability planner view
 * to use darker theme colors without affecting other pages in the app
 */

/* NAME BADGES - DARK GREEN */
.availability-card .player-available,
.availability-card .time-slot-bar .player-list .badge.player-available,
.availability-card .badge-success,
.availability-card .player-list .badge.player-available {
  background-color: #496E78; /* Teal */
  border-color: #496E78;
  color: white;
  font-weight: normal;
  text-shadow: none;
  box-shadow: none;
}

/* NAME BADGES - PERZIK */
.availability-card .player-maybe,
.availability-card .time-slot-bar .player-list .badge.player-maybe,
.availability-card .badge-warning,
.availability-card .player-list .badge.player-maybe {
  background-color: #D2A679; /* Perzik */
  border-color: #D2A679;
  color: white;
  font-weight: normal;
  text-shadow: none;
  box-shadow: none;
}

/* NAME BADGES - DARK RED */
.availability-card .player-unavailable,
.availability-card .time-slot-bar .player-list .badge.player-unavailable,
.availability-card .badge-danger,
.availability-card .player-list .badge.player-unavailable {
  background-color: #978CC2; /* Dark red */
  border-color: #978CC2;
  color: white;
  font-weight: normal;
  text-shadow: none;
  box-shadow: none;
}

/* OTHER GREEN ELEMENTS */
.availability-card .btn-success,
.availability-card .bg-success,
.availability-card .border-success,
.availability-card .alert-success,
.availability-card .progress-bar-success,
.availability-card .progress-bar,
.availability-card [class*="bg-success"],
.availability-card .badge.badge-success,
#selected-slots-count.text-success {
  background-color: #496E78; /* Teal */
  border-color: #496E78;
  color: white;
}

/* OTHER ORANGE ELEMENTS */
.availability-card .btn-warning,
.availability-card .bg-warning,
.availability-card .border-warning,
.availability-card .alert-warning,
.availability-card .progress-bar-warning,
.availability-card [class*="bg-warning"],
.availability-card .badge.badge-warning {
  background-color: #c55e02; /* Dark orange */
  border-color: #c55e02;
  color: white;
}

/* OTHER RED ELEMENTS */
.availability-card .btn-danger,
.availability-card .bg-danger,
.availability-card .border-danger,
.availability-card .alert-danger,
.availability-card .progress-bar-danger,
.availability-card [class*="bg-danger"],
.availability-card .badge.badge-danger,
#selected-slots-count.text-danger {
  background-color: #978CC2; /* Dark red */
  border-color: #978CC2;
  color: white;
}

/* Text classes need separate rules */
.availability-card .text-success,
.availability-card [class*="text-success"] {
  color: #496E78;
  background-color: transparent;
}

.availability-card .text-warning,
.availability-card [class*="text-warning"] {
  color: #c55e02;
  background-color: transparent;
}

.availability-card .text-danger,
.availability-card [class*="text-danger"] {
  color: #978CC2;
  background-color: transparent;
}

/* All buttons solid dark colors */
.availability-card .btn-outline-success,
.availability-card .btn-outline-success.active,
.availability-card .btn-outline-success:hover,
.availability-card .btn-outline-success:focus {
  color: white;
  border-color: #496E78;
  background-color: #496E78;
  font-weight: normal;
  box-shadow: none;
  text-shadow: none;
  border-width: 1px;
}

.availability-card .btn-outline-danger,
.availability-card .btn-outline-danger.active,
.availability-card .btn-outline-danger:hover,
.availability-card .btn-outline-danger:focus {
  color: white;
  border-color: #978CC2;
  background-color: #978CC2;
  font-weight: normal;
  box-shadow: none;
  text-shadow: none;
  border-width: 1px;
}

.availability-card .btn-outline-warning,
.availability-card .btn-outline-warning.active,
.availability-card .btn-outline-warning:hover,
.availability-card .btn-outline-warning:focus {
  color: white;
  border-color: #c55e02;
  background-color: #c55e02;
  font-weight: normal;
  box-shadow: none;
  text-shadow: none;
  border-width: 1px;
}

/* Playtomic button */
.availability-card .playtomic-button-container .btn-primary {
  background-color: #496E78;
  border-color: #496E78;
  color: white;
}
/* --- availability-badge-fix.css --- */
/**
 * Critical fix for availability planner buttons and badges
 * These rules use to ensure they override all other styles
 */

/* Force all buttons to be dark colors regardless of state */
/* Force MAYBE buttons to be darker orange */
.availability-card .btn-outline-warning,
.availability-card button.btn-outline-warning,
.availability-card .btn-outline-warning:hover,
.availability-card .btn-outline-warning:active,
.availability-card .btn-outline-warning:focus,
.availability-card .btn-outline-warning.active,
.availability-card .btn-outline-warning.selected,
.availability-card .btn-group .btn-outline-warning {
  background-color: #D2A679; /* Darker orange */
  border-color: #D2A679;
  color: white;
  opacity: 1;
  box-shadow: none;
  text-shadow: none;
  font-weight: normal;
}

/* Force NO buttons to be dark red */
.availability-card .btn-outline-danger,
.availability-card button.btn-outline-danger,
.availability-card .btn-outline-danger:hover,
.availability-card .btn-outline-danger:active,
.availability-card .btn-outline-danger:focus,
.availability-card .btn-outline-danger.active,
.availability-card .btn-outline-danger.selected,
.availability-card .btn-group .btn-outline-danger {
  background-color: #978CC2;
  border-color: #978CC2;
  color: white;
  opacity: 1;
  box-shadow: none;
  text-shadow: none;
  font-weight: normal;
}

/* Force YES buttons to be teal */
.availability-card .btn-outline-success,
.availability-card button.btn-outline-success,
.availability-card .btn-outline-success:hover,
.availability-card .btn-outline-success:active,
.availability-card .btn-outline-success:focus,
.availability-card .btn-outline-success.active,
.availability-card .btn-outline-success.selected,
.availability-card .btn-group .btn-outline-success {
  background-color: #496E78;
  border-color: #496E78;
  color: white;
  opacity: 1;
  box-shadow: none;
  text-shadow: none;
  font-weight: normal;
}

/* Force all player name badges to be dark colors */
/* Available/Yes badges - teal */
.availability-card .player-available,
.availability-card .player-list .badge.player-available,
.availability-card .player-list .player-available,
.availability-card .time-slot-bar .player-list .badge.player-available,
.availability-card .time-slot-bar .player-available,
.availability-card .badge-success,
.availability-card .badge.badge-success {
  background-color: #496E78;
  border-color: #496E78;
  color: white;
  font-weight: normal;
  text-shadow: none;
  box-shadow: none;
}

/* Maybe badges - darker orange to match buttons */
.availability-card .player-maybe,
.availability-card .player-list .badge.player-maybe,
.availability-card .player-list .player-maybe,
.availability-card .time-slot-bar .player-list .badge.player-maybe,
.availability-card .time-slot-bar .player-maybe,
.availability-card .badge-warning,
.availability-card .badge.badge-warning {
  background-color: #D2A679; /* Darker orange matching buttons */
  border-color: #D2A679;
  color: white;
  font-weight: normal;
  text-shadow: none;
  box-shadow: none;
}

/* Unavailable/No badges - dark red */
.availability-card .player-unavailable,
.availability-card .player-list .badge.player-unavailable,
.availability-card .player-list .player-unavailable,
.availability-card .time-slot-bar .player-list .badge.player-unavailable,
.availability-card .time-slot-bar .player-unavailable,
.availability-card .badge-danger,
.availability-card .badge.badge-danger {
  background-color: #978CC2;
  border-color: #978CC2;
  color: white;
  font-weight: normal;
  text-shadow: none;
  box-shadow: none;
}
/* --- badge-override.css --- */
/**
 * Critical override for availability planner badges and buttons
 * This CSS has extremely high specificity to ensure it overrides any other styling
 */

/* 
 * BADGE COLORS FOR PLAYER NAMES
 * Using very high specificity selectors to override Bootstrap and any other styles
 */

/* YES/AVAILABLE badges - dark green */
.availability-card .player-list .badge.player-available,
.availability-card .player-list .badge.badge-success,
.availability-card .time-slot-bar .player-list .badge.player-available,
.availability-card .badge.player-available,
.availability-card .player-available {
  background-color: #496E78;
  border-color: #496E78;
  color: #ffffff;
}

/* MAYBE badges - darker orange */
.availability-card .player-list .badge.player-maybe,
.availability-card .player-list .badge.badge-warning,
.availability-card .time-slot-bar .player-list .badge.player-maybe,
.availability-card .badge.player-maybe,
.availability-card .player-maybe {
  background-color: #D2A679;
  border-color: #D2A679;
  color: #ffffff;
}

/* NO/UNAVAILABLE badges - dark red */
.availability-card .player-list .badge.player-unavailable,
.availability-card .player-list .badge.badge-danger,
.availability-card .time-slot-bar .player-list .badge.player-unavailable,
.availability-card .badge.player-unavailable,
.availability-card .player-unavailable {
  background-color: #978CC2;
  border-color: #978CC2;
  color: #ffffff;
}

/* 
 * BUTTON COLORS WITH HIGHEST SPECIFICITY
 */

/* YES buttons - dark green */
.availability-card .btn.btn-outline-success,
.availability-card .btn.btn-outline-success.active,
.availability-card button.btn-outline-success,
.availability-card .response-buttons .btn-outline-success {
  background-color: #496E78;
  border-color: #496E78;
  color: #ffffff;
}

/* MAYBE buttons - darker orange */
.availability-card .btn.btn-outline-warning,
.availability-card .btn.btn-outline-warning.active,
.availability-card button.btn-outline-warning,
.availability-card .response-buttons .btn-outline-warning {
  background-color: #D2A679;
  border-color: #D2A679;
  color: #ffffff;
}

/* NO buttons - dark red */
.availability-card .btn.btn-outline-danger,
.availability-card .btn.btn-outline-danger.active,
.availability-card button.btn-outline-danger,
.availability-card .response-buttons .btn-outline-danger {
  background-color: #978CC2;
  border-color: #978CC2;
  color: #ffffff;
}

/* Force text color to be white for all badges and buttons */
.availability-card .badge,
.availability-card .btn-outline-success,
.availability-card .btn-outline-warning,
.availability-card .btn-outline-danger {
  color: #ffffff;
}

/* CRITICAL: Override Bootstrap bg-success badges to teal in availability planner */
.availability-card .badge.bg-success,
.availability-card .player-list .badge.bg-success,
.availability-card .time-slot-bar .badge.bg-success,
html body .availability-card .badge.bg-success,
html body .availability-card .player-list .badge.bg-success {
  background-color: #496E78;
  border-color: #496E78;
  color: #ffffff;
}

/* Global badge override for player-available class */
html body .badge.player-available,
html body span.badge.player-available,
.player-list .badge.player-available,
.time-slot-bar .badge.player-available {
  background-color: #496E78;
  border-color: #496E78;
  color: #ffffff;
}
/* --- record-score-modal.css --- */
/* Record Score Modal Styles - Dark-themed with high contrast */
/* Using higher specificity to override glassmorphism effects from new-dark.css */
.modal.score-modal .modal-content,
.score-modal.modal .modal-content {
    background-color: #030508; /* Very dark background - darker than other elements */
    background: #030508; /* Alternative property for broader support */
    color: #f3f4f6; /* Bright text for contrast */
    border: none;
    border-radius: 0.5rem;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}

.modal.score-modal .modal-header,
.modal.score-modal .modal-footer,
.score-modal.modal .modal-header,
.score-modal.modal .modal-footer {
    border: none; /* Remove divider lines */
    background-color: rgba(17, 24, 39, 0.6); /* Lighter header background to match other card headers */
    background: rgba(17, 24, 39, 0.6); /* Alternative property */
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    padding: 1rem 1.5rem;
}

.score-modal .modal-header .modal-title {
    color: #ffffff;
    font-weight: 600;
    display: flex;
    align-items: center;
}

.score-modal .modal-header .modal-title i {
    color: #fd7e14; /* Orange trophy icon */
}

.score-modal .modal-body {
    padding: 1.5rem;
}

.score-section {
    padding: 1.25rem;
    background-color: #1f2937; /* Dark grey background */
    border-radius: 0.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.stats-section {
    padding: 1.25rem;
    background-color: #1f2937; /* Matches score section */
    border-radius: 0.5rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.score-grid {
    display: grid;
    gap: 0.75rem;
}

.score-row {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 0.75rem;
    align-items: center;
    border: none; /* No separators */
}

.score-row.header {
    font-weight: 500;
    color: #9fa6b2;
    padding-bottom: 0.5rem;
    border: none; /* No separators */
}

.score-cell {
    padding: 0.25rem;
}

.player-names {
    font-size: 0.85rem;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: #e5e7eb; /* Bright text */
}

.score-input, .stat-input {
    width: 100%;
    text-align: center;
    background-color: #0a0e17; /* Very dark input background */
    border: 1px solid #374151; /* Subtle border */
    color: #f3f4f6; /* Bright text */
    padding: 0.5rem;
    border-radius: 0.25rem;
    font-size: 1rem;
    transition: all 0.2s ease;
}

.score-input:focus, .stat-input:focus {
    background-color: #111827; /* Slightly lighter when focused */
    border-color: #496E78; /* Dark green highlight - consistent with theme */
    box-shadow: 0 0 0 2px rgba(26, 89, 40, 0.25);
    outline: none;
}

.player-row {
    display: grid;
    grid-template-columns: 70% 15% 15%;
    gap: 0.75rem;
    align-items: center;
    padding: 0.5rem 0;
    border: none; /* No separator */
    border-bottom: 0; /* Explicitly remove bottom border */
    margin-bottom: 0.25rem;
    opacity: 1; /* Full opacity for content */
}

.player-row.header {
    font-weight: 500;
    color: #9fa6b2;
    padding-bottom: 0.75rem;
    margin-bottom: 0.5rem;
    border: none; /* No separator in header */
    border-bottom: 0; /* Explicitly remove bottom border */
}

.player-name {
    font-size: 0.85rem;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: #e5e7eb; /* Bright text */
}

.stats-section h6 {
    color: #9fa6b2;
    font-weight: 500;
    margin-bottom: 1rem;
}

/* Styled buttons */
.score-modal .btn-primary {
    background-color: #496E78; /* Dark green primary button - consistent with theme */
    border: none;
    color: white;
    transition: color 0.2s ease;
}

.score-modal .btn-primary:hover {
    background-color: #496E78; /* Keep the same background */
    color: #ffffff; /* Brighten text slightly */
}

.score-modal .btn-secondary {
    background-color: #374151; /* Dark grey secondary button */
    border: none;
    color: #f3f4f6;
    transition: color 0.2s ease;
}

.score-modal .btn-secondary:hover {
    background-color: #374151; /* Keep the same background */
    color: #ffffff; /* Brighten text slightly */
}

/* Override for gradient buttons in score modal */
.score-modal .btn-gradient-peach,
.score-modal .btn-gradient-peach:hover,
.score-modal .btn-gradient-peach:focus,
.score-modal .btn-gradient-peach:active {
    background: linear-gradient(135deg, #D2A679 0%, #b8915e 100%);
    background-color: #D2A679;
    color: #111;
    border: 1px solid rgba(210, 166, 121, 0.7);
}

.score-modal .btn-gradient-peach:hover {
    background: linear-gradient(135deg, #e0b88d 0%, #c4a070 100%);
    background-color: #e0b88d;
    box-shadow: 0 4px 12px rgba(210, 166, 121, 0.3);
}

.score-modal .btn-gradient-teal,
.score-modal .btn-gradient-teal:hover,
.score-modal .btn-gradient-teal:focus,
.score-modal .btn-gradient-teal:active {
    background: linear-gradient(135deg, #496E78 0%, #2d4a54 100%);
    background-color: #496E78;
    color: #fff;
    border: 1px solid rgba(73, 110, 120, 0.7);
}

.score-modal .btn-gradient-teal:hover {
    background: linear-gradient(135deg, #5a8591 0%, #3d5a64 100%);
    background-color: #5a8591;
    box-shadow: 0 4px 12px rgba(73, 110, 120, 0.3);
}

/* Record Score button in match list */
.record-score-btn {
    border-color: #374151;
    color: #f3f4f6;
    transition: color 0.2s ease-in-out;
}

.record-score-btn:hover {
    color: #fd7e14; /* Orange text on hover */
    background-color: transparent; /* No background change */
}

.record-score-btn i {
    color: #fd7e14; /* Orange trophy icon */
}

/* Completely hide all borders in player stats section */
.stats-section * {
    border: none;
}

/* Mobile Optimizations */
@media (max-width: 768px) {
    .score-row {
        grid-template-columns: 2fr 0.9fr 0.9fr 0.9fr;
    }
    
    .player-row {
        grid-template-columns: 60% 20% 20%;
    }
    
    .score-input, .stat-input {
        padding: 0.4rem;
        font-size: 0.95rem;
    }
    
    .player-names, .player-name {
        font-size: 0.8rem;
    }
}

/* Prevent zooming on iOS */
input[type="number"] {
    font-size: 16px;
}

/* --- time-slot-styling.css --- */
/* Time slot label styling - Updated v6 with green badges on selection */
.time-slot-label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: 0.5rem 0;
    cursor: pointer;
}

.form-check .time-slot-label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.time-period {
    font-weight: 500;
    color: var(--bs-body-color);
}

/* Default gray styling for time badges */
.time-range {
    background-color: rgba(108, 117, 125, 0.15);
    color: #6c757d;
    font-size: 0.75rem;
    font-weight: 500;
    padding: 0.25rem 0.5rem;
    border-radius: 0.375rem;
    white-space: nowrap;
    border: 1px solid rgba(108, 117, 125, 0.2);
    min-width: 95px;
    text-align: center;
    display: inline-block;
    box-sizing: border-box;
    transition: all 0.2s ease;
}

/* Teal styling for selected time slots */
.form-check-input:checked ~ .time-slot-label .time-range,
.form-check-input:checked + .time-slot-label .time-range {
    background-color: rgba(73, 110, 120, 0.15);
    color: #496E78;
    border-color: rgba(73, 110, 120, 0.3);
}

/* Round checkboxes for availability forms */
.availability-card .form-check-input,
.availability-form .form-check-input,
.date-card .form-check-input,
.time-slots .form-check-input,
.time-slot-bar .form-check-input,
input.time-slot,
input[type="checkbox"].time-slot {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    min-width: 24px;
    min-height: 24px;
    margin-right: 0.5rem;
    border: 2px solid #496E78;
    background-color: transparent;
    cursor: pointer;
    position: relative;
    flex-shrink: 0;
}

.availability-card .form-check-input:checked,
.availability-form .form-check-input:checked,
.date-card .form-check-input:checked,
.time-slots .form-check-input:checked,
.time-slot-bar .form-check-input:checked,
input.time-slot:checked,
input[type="checkbox"].time-slot:checked {
    background-color: #496E78;
    border-color: #496E78;
    background-image: none;
}

.date-card .form-check-input:checked::after,
.time-slots .form-check-input:checked::after,
input.time-slot:checked::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 10px;
    height: 10px;
    background-color: white;
    border-radius: 50%;
}

/* Responsive styling */
@media (max-width: 768px) {
    .time-slot-label {
        padding: 0.4rem 0;
    }
    
    .time-period {
        font-size: 0.95rem;
    }
    
    .time-range {
        font-size: 0.7rem;
        padding: 0.2rem 0.4rem;
        min-width: 85px;
    }
    
    .availability-card .form-check-input,
    .availability-form .form-check-input {
        width: 16px;
        height: 16px;
    }
}

/* Time slot header styling for response view */
.time-slot-header {
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--bs-border-color-translucent);
}

.time-slot-header .time-period {
    font-weight: 600;
    color: var(--bs-body-color);
    font-size: 1rem;
}

.time-slot-header .time-range {
    background-color: rgba(108, 117, 125, 0.15);
    color: #6c757d;
    font-size: 0.75rem;
    font-weight: 500;
    padding: 0.25rem 0.5rem;
    border-radius: 0.375rem;
    white-space: nowrap;
    border: 1px solid rgba(108, 117, 125, 0.2);
    min-width: 95px;
    text-align: center;
    display: inline-block;
    box-sizing: border-box;
}

/* Dark theme compatibility */
[data-bs-theme="dark"] .time-period,
.availability-card .time-period {
    color: #f8f9fa;
}

[data-bs-theme="dark"] .time-range,
.availability-card .time-range {
    background-color: rgba(173, 181, 189, 0.2);
    color: #adb5bd;
    border-color: rgba(173, 181, 189, 0.3);
}

/* Dark theme teal for selected time slots */
[data-bs-theme="dark"] .form-check-input:checked ~ .time-slot-label .time-range,
[data-bs-theme="dark"] .form-check-input:checked + .time-slot-label .time-range {
    background-color: rgba(73, 110, 120, 0.2);
    color: #496E78;
    border-color: rgba(73, 110, 120, 0.4);
}

/* Dark theme for round checkboxes */
[data-bs-theme="dark"] .availability-card .form-check-input,
[data-bs-theme="dark"] .availability-form .form-check-input {
    background-color: #495057;
    border-color: #6c757d;
}

[data-bs-theme="dark"] .availability-card .form-check-input:checked,
[data-bs-theme="dark"] .availability-form .form-check-input:checked {
    background-color: #496E78;
    border-color: #496E78;
}
/* --- redesigned-leaderboard.css --- */
/**
 * Leaderboard Table Styling
 * Single file for ALL table variations: global, teams, individual, fullscreen.
 */

/* ── Scroll container ─────────────────────────────────────────────── */
.redesigned-leaderboard {
        overflow-x: auto;
        /* See _components.css: without an explicit hidden here, overflow-y
           computes to auto and Chrome swallows vertical swipes that belong
           to the page. Horizontal scrolling is the only axis this needs. */
        overflow-y: hidden;
        /* Stated here too, not just via .table-responsive, so a leaderboard
           that ever loses that class keeps letting up/down swipes through
           to the page. See the note in _base.css for what went wrong. */
        overscroll-behavior-x: contain;
        overscroll-behavior-y: auto;
        -webkit-overflow-scrolling: touch;
        background: var(--bs-card-bg);
        border-radius: 0.75rem;
        border: 1px solid var(--bs-card-border);
}

/* ── Table base ───────────────────────────────────────────────────── */
.redesigned-leaderboard table {
        margin: 0;
        border-collapse: separate;
        border-spacing: 0;
        white-space: nowrap;
        width: 100%;
}

/* ── All cells ────────────────────────────────────────────────────── */
.redesigned-leaderboard th,
.redesigned-leaderboard td {
        padding: 0;
        vertical-align: middle;
        border: none;
        color: var(--bs-body-color);
        white-space: nowrap;
}

/* ── Header ───────────────────────────────────────────────────────── */
.redesigned-leaderboard thead th {
        background: var(--bs-card-header, var(--bs-card-bg));
        font-weight: 600;
        position: sticky;
        top: 0;
        z-index: 10;
}

/* ── Sticky column 1 (#) ─────────────────────────────────────────── */
.redesigned-leaderboard th:first-child,
.redesigned-leaderboard td:first-child {
        position: sticky;
        left: 0;
        z-index: 20;
        background: var(--bs-card-bg);
        width: 1.75rem;
        min-width: 1.75rem;
        max-width: 1.75rem;
}

/* ── Sticky column 2 (Player / Team) ─────────────────────────────── */
.redesigned-leaderboard th:nth-child(2),
.redesigned-leaderboard td:nth-child(2) {
        position: sticky;
        left: 1.75rem;
        z-index: 19;
        background: var(--bs-card-bg);
        padding-right: 1rem;
        max-width: 40vw;
        overflow: hidden;
        text-overflow: ellipsis;
}

/* Header sticky columns: higher z-index at sticky-top + sticky-left intersection */
.redesigned-leaderboard thead th:first-child {
        z-index: 31;
}
.redesigned-leaderboard thead th:nth-child(2) {
        z-index: 30;
}

/* ── Row hover ────────────────────────────────────────────────────── */
.redesigned-leaderboard tbody tr:hover td {
        background: rgba(var(--bs-primary-rgb), 0.1);
}
/* Sticky cells need explicit bg on hover to prevent bleed-through */
.redesigned-leaderboard tbody tr:hover td:first-child,
.redesigned-leaderboard tbody tr:hover td:nth-child(2) {
        background: color-mix(in srgb, var(--bs-card-bg) 90%, var(--bs-primary));
}

/* ── Links ────────────────────────────────────────────────────────── */
.redesigned-leaderboard a {
        color: var(--bs-body-color);
        text-decoration: none;
}
.redesigned-leaderboard a:hover {
        color: var(--bs-primary);
        text-decoration: underline;
}

/* ── Responsive ───────────────────────────────────────────────────── */
@media (max-width: 768px) {
        .redesigned-leaderboard th:nth-child(2),
        .redesigned-leaderboard td:nth-child(2) {
                max-width: 55vw;
        }
}

@media (min-width: 1400px) {
        .redesigned-leaderboard th:nth-child(2),
        .redesigned-leaderboard td:nth-child(2) {
                max-width: none;
                overflow: visible;
                white-space: normal;
        }
}

/* ── Non-table utilities (preserved) ──────────────────────────────── */

/* Badge styling for substitutes */
.sub-badge {
        font-size: 0.7em;
        padding: 2px 4px;
        display: inline-block;
        margin-left: 4px;
        background-color: #d2a679;
        color: #111827;
}

/* Team link / pair styles */
.team-link.text-decoration-none.text-truncate {
        font-size: var(--bs-body-font-size);
        color: #fcfcfc80;
}

.team-link a .text-success {
        color: var(--bs-primary);
}

.team-link span {
        font-size: var(--bs-body-font-size);
        color: #fcfcfc80;
}

/* Button sizing inside tables */
.redesigned-leaderboard .btn-group {
        display: flex;
        gap: 2px;
}

.redesigned-leaderboard .btn-sm {
        padding: 2px 6px;
        font-size: 0.75rem;
        line-height: 1.2;
        height: auto;
}

/* ── Scroll hint overlay ──────────────────────────────────────────── */
.redesigned-leaderboard__overlay {
        position: absolute;
        top: 0;
        right: 0;
        bottom: 0;
        width: 50px;
        pointer-events: none;
        z-index: 20;
        background: linear-gradient(to right, transparent, rgba(26, 32, 44, 0.92));
        transition: opacity 0.3s ease;
}

.redesigned-leaderboard__overlay.scrolled-right {
        opacity: 0;
        visibility: hidden;
}

.redesigned-leaderboard:not(.leaderboard-has-overflow) .redesigned-leaderboard__overlay {
        display: none;
}

.redesigned-leaderboard__overlay .leaderboard-scroll-hint {
        position: absolute;
        right: 8px;
        top: 50%;
        transform: translateY(-50%);
        z-index: 21;
        font-size: 0.9rem;
        font-weight: 600;
        color: #d2a679;
        pointer-events: none;
        transition: opacity 0.3s ease;
        display: flex;
        align-items: center;
        text-shadow: 0 0 10px rgba(0, 0, 0, 0.7);
}

.leaderboard-scroll-hint.hidden {
        opacity: 0;
}

.team-pair span {
        color: #fcfcfc80;
}

.teams-leaderboard table tbody tr.team-row td:nth-child(n + 3),
.teams-leaderboard table tbody tr.team-row td {
        height: 24px;
}

.teams-leaderboard table tbody tr.team-row td {
        padding: 2px 0;
}

/* --- competition-overview.css --- */
/* Competition Overview - Clean & Minimalistic Design */

.competition-overview-card {
    background: rgba(17, 24, 39, 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 0.75rem;
    padding: 0;
    margin-bottom: 1rem;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}

.card-header-clean {
    padding: 1rem 1.5rem 0.75rem;
    border-bottom: none;
    background: transparent;
    border-radius: 0.75rem 0.75rem 0 0;
    text-align: center;
    display: flex;
    justify-content: center;
    align-items: center;
}

.card-header-clean h5,
.card-header-clean h6 {
    color: var(--bs-body-color);
    font-weight: 600;
    font-size: 1rem;
}

/* Overview Stats Grid - Using same style as Rules buttons */
.overview-stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
    padding: 1.5rem;
}

.overview-stats-grid.desktop-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.overview-stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 0.75rem;
    background: rgba(17, 24, 39, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 0.75rem;
    min-height: 65px;
    transition: background-color 0.2s ease;
}

.overview-stat-item:hover {
    background: var(--bs-tertiary-bg);
}

.stat-number {
    font-family: 'Inter', sans-serif;
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--bs-body-color);
    line-height: 1.2;
    margin-bottom: 0.25rem;
}

.stat-label {
    font-size: 0.65rem;
    color: var(--bs-secondary-color);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.progress-item .stat-number.progress-text {
    color: #496E78;
}

/* Leaders List */
.leaders-list {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.leaders-list.desktop-leaders {
    gap: 1rem;
}

.leader-item {
    display: flex;
    align-items: center;
    padding: 1rem;
    background: rgba(17, 24, 39, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 0.5rem;
    transition: all 0.2s ease;
}

.leader-item:hover {
    background: var(--bs-tertiary-bg);
}

.leader-info {
    flex: 1;
    min-width: 0;
}

.leader-name {
    font-weight: 600;
    color: var(--bs-body-color);
    font-size: 0.95rem;
    margin-bottom: 0.25rem;
}

.leader-desc {
    font-size: 0.8rem;
    color: var(--bs-secondary-color);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.leader-value {
    font-weight: 700;
    color: var(--bs-primary);
    font-size: 1.1rem;
    margin-left: 1rem;
    flex-shrink: 0;
}

/* Rules Button Grid */
.rules-button-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
    padding: 1.5rem;
}

.rules-button-grid.desktop-rules {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    padding: 2rem;
}

.rules-button-grid.desktop-rules .rule-button {
    flex: 1 1 calc(33.333% - 1rem);
    min-width: 200px;
}

.rule-button {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    background: rgba(17, 24, 39, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 0.75rem;
    min-height: 80px;
}

.rule-button:hover {
    background: var(--bs-tertiary-bg);
}

.rule-button-active {
    background: linear-gradient(135deg, rgba(210, 166, 121, 0.2), rgba(210, 166, 121, 0.1));
    border-color: rgba(210, 166, 121, 0.5);
    box-shadow: 0 0 15px rgba(210, 166, 121, 0.2);
}

.rule-button-label {
    font-size: 0.75rem;
    color: var(--bs-secondary-color);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.5rem;
    text-align: center;
}

.rule-button-value {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--bs-body-color);
    text-align: center;
}

/* Golden Point Badge Styling - Switch Toggle Design */
.gp-badge {
    display: inline-block;
    position: relative;
    padding: 0.35rem 0.75rem;
    border-radius: 1.5rem;
    font-weight: 700;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    min-width: 75px;
    background: transparent;
    border: 2px solid;
    line-height: 1.2;
}

.gp-badge-on {
    border-color: #D2A679;
    color: #D2A679;
    box-shadow: 0 0 10px rgba(210, 166, 121, 0.3);
    padding-left: 1.625rem;
    padding-right: 0.5rem;
    text-align: right;
    min-width: 70px;
    width: 70px;
}

.gp-badge-off {
    border-color: #D2A679;
    color: #D2A679;
    box-shadow: 0 0 8px rgba(210, 166, 121, 0.3);
    padding-right: 1.625rem;
    padding-left: 0.5rem;
    text-align: left;
    min-width: 70px;
    width: 70px;
}

/* Circular indicator for ON state (left side) */
.gp-badge-on::before {
    content: '';
    position: absolute;
    left: 2px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #D2A679;
    box-shadow: 0 2px 6px rgba(210, 166, 121, 0.5);
    transition: all 0.3s ease;
}

/* Circular indicator for OFF state (right side) */
.gp-badge-off::after {
    content: '';
    position: absolute;
    right: 2px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #D2A679;
    box-shadow: 0 2px 6px rgba(210, 166, 121, 0.5);
    transition: all 0.3s ease;
}

.gp-badge-clickable {
    cursor: pointer;
}

.gp-badge-clickable:hover {
    /* No scale effect on hover */
}

.gp-badge-clickable.gp-badge-on:hover {
    box-shadow: 0 0 15px rgba(210, 166, 121, 0.5);
    border-color: #e0b88d;
    color: #e0b88d;
}

.gp-badge-clickable.gp-badge-on:hover::before {
    background: #e0b88d;
    box-shadow: 0 3px 8px rgba(210, 166, 121, 0.6);
}

.gp-badge-clickable.gp-badge-off:hover {
    box-shadow: 0 0 15px rgba(210, 166, 121, 0.5);
    border-color: #e0b88d;
    color: #e0b88d;
}

.gp-badge-clickable.gp-badge-off:hover::after {
    background: #e0b88d;
    box-shadow: 0 3px 8px rgba(210, 166, 121, 0.6);
}

.gp-badge-readonly {
    cursor: default;
    opacity: 0.85;
    padding-left: 0.75rem;
    padding-right: 0.75rem;
    text-align: center;
    min-width: 60px;
}

.gp-badge-readonly.gp-badge-on::before,
.gp-badge-readonly.gp-badge-off::after {
    display: none;
}

/* Mobile Responsive */
@media (max-width: 767.98px) {
    .overview-stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
        padding: 1rem;
    }
    
    .overview-stat-item {
        padding: 0.75rem 0.5rem;
    }
    
    .stat-number {
        font-size: 1.5rem;
    }
    
    .stat-label {
        font-size: 0.75rem;
    }
    
    .leaders-list {
        padding: 1rem;
        gap: 0.5rem;
    }
    
    .leader-item {
        padding: 0.75rem;
    }
    

    
    .leader-name {
        font-size: 0.875rem;
    }
    
    .leader-desc {
        font-size: 0.75rem;
    }
    
    .leader-value {
        font-size: 1rem;
        margin-left: 0.5rem;
    }
    
    .card-header-clean {
        padding: 1rem 1rem 0.5rem;
    }
    
    .card-header-clean h6 {
        font-size: 1rem;
    }
}

/* Dark mode enhancements */
@media (prefers-color-scheme: dark) {
    .competition-overview-card:hover {
        box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
    }
    
    .leader-badge.points-leader {
        background: linear-gradient(135deg, #d69e2e, #b7791f);
        color: white;
    }
}

/* Extra small devices */
@media (max-width: 575.98px) {
    .overview-stats-grid {
        grid-template-columns: 1fr 1fr;
        gap: 0.5rem;
        padding: 0.75rem;
    }
    
    .overview-stat-item {
        padding: 0.5rem;
    }
    
    .stat-number {
        font-size: 1.25rem;
    }
    
    .stat-label {
        font-size: 0.7rem;
    }
}
/* --- payment-font-fix.css --- */
/* Payment sections - Force Inter font and fixed sizes */

/* Force Inter font on all payment-related elements */
.competition-overview-card .text-muted,
.competition-overview-card span,
.competition-overview-card p,
.competition-overview-card h6,
.competition-overview-card .d-flex span,
.competition-overview-card .text-success,
.competition-overview-card .text-danger,
.competition-overview-card .text-warning,
.competition-overview-card .text-white,
.competition-overview-card table,
.competition-overview-card th,
.competition-overview-card td,
[style*="font-family"] {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* Force fixed small sizes for stat-labels - matching "Totaal Rondes" section */
.stat-label {
    font-size: 0.65rem;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

.stat-number {
    font-size: 0.7rem;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* Payment Summary section */
.competition-overview-card [style*="Member Pays"],
.competition-overview-card [style*="Host Pays"] {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* Waiting for Payments heading */
.competition-overview-card h6.text-white {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* All euro amounts in payment sections */
.competition-overview-card [style*="font-variant-numeric"],
.competition-overview-card [style*="tabular-nums"] {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* Participant payments table */
.competition-overview-card .table th,
.competition-overview-card .table td {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* Override any responsive breakpoints for stat-label/stat-number */
@media (max-width: 767.98px) {
    .stat-label {
        font-size: 0.65rem;
    }
    
    .stat-number {
        font-size: 0.7rem;
    }
}

@media (max-width: 575.98px) {
    .stat-label {
        font-size: 0.65rem;
    }
    
    .stat-number {
        font-size: 0.7rem;
    }
}

/* Custom.css overrides - force consistent sizing */
@media (max-width: 576px) {
    .stat-label {
        font-size: 0.65rem;
    }
    
    .stat-value,
    .stat-number {
        font-size: 0.7rem;
        font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    }
}

/* Force body font */
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* --- fullscreen-chat.css --- */
/**
 * Chat interface - WhatsApp-style fullscreen experience
 */

:root {
    /* The app is now Apple-themed (theme-apple owns the chat). These WA
       palette vars used to be a dark WhatsApp look; flipped to whites so
       any rule in this file that still uses them blends into theme-apple
       instead of showing as a black "stroke" around the chat content. */
    --wa-bg: #FFFFFF;
    --wa-header: #FFFFFF;
    --wa-sent: #E9E9EB;
    --wa-received: #E9E9EB;
    --wa-text: #000000;
    --wa-secondary: #8e8e93;
    --wa-input-bg: #FFFFFF;
}

html.chat-active-html,
html.chat-active-html body,
body.chat-active {
    background-color: var(--wa-header);
    overflow: hidden;
    position: fixed;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    margin: 0;
    padding: 0;
}

body.chat-active .navbar,
body.chat-active .navbar.fixed-top,
body.chat-active .navbar.fixed-bottom,
body.chat-active .mobile-navbar,
body.chat-active .flash-messages-container {
    display: none;
}

body.chat-active .container.mt-2.pt-2 {
    display: block;
    padding: 0;
    margin: 0;
    max-width: none;
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    position: fixed;
    top: 0;
    left: 0;
    background: var(--wa-header);
    z-index: 9999;
}

.chat-page {
    width: 100%;
    height: 100%;
}

.chat-container {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    background-color: var(--wa-bg);
}

.chat-header {
    background: var(--wa-header);
    padding: 10px 16px;
    padding-top: calc(env(safe-area-inset-top, 0px) + 10px);
    flex-shrink: 0;
    z-index: 100;
    position: relative;
}

.chat-header::before {
    content: '';
    position: absolute;
    top: calc(-1 * env(safe-area-inset-top, 0px));
    left: 0;
    right: 0;
    height: env(safe-area-inset-top, 0px);
    background: var(--wa-header);
    z-index: 101;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 10px 16px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    gap: 4px;
}

#messagesContainer {
    display: flex;
    flex-direction: column;
    gap: 4px;
    width: 100%;
    margin-top: auto;
}

.chat-input {
    background: var(--wa-header);
    padding: 8px 12px;
    padding-bottom: calc(env(safe-area-inset-bottom, 0px) + 8px);
    flex-shrink: 0;
}

.message {
    padding: 8px 12px;
    border-radius: 8px;
    max-width: 85%;
    position: relative;
    margin-bottom: 4px;
}

.message.sent {
    background: var(--wa-sent);
    align-self: flex-end;
    border-top-right-radius: 0;
    color: white;
}

.message.received {
    background: var(--wa-received);
    align-self: flex-start;
    border-top-left-radius: 0;
    color: white;
}

.message img {
    max-width: 100%;
    border-radius: 8px;
    display: block;
    margin: 4px 0;
}

.message audio {
    max-width: 100%;
    height: 36px;
    margin: 4px 0;
    filter: invert(1);
}

/* --- chat-push-animation.css --- */
/**
 * Push animation feedback for chat links
 * Provides immediate tactile feedback when clicking chat items
 */

/* Chat link hover and active states */
.chat-link-item,
.match-chat-link,
.all-chats-item,
[href*="/chat"],
.chat-item {
    transition: all 0.15s cubic-bezier(0.4, 0.0, 0.2, 1);
    transform: translateZ(0); /* Hardware acceleration */
    will-change: transform, box-shadow;
}

/* Immediate feedback on touch/click */
.chat-link-item:active,
.match-chat-link:active,
.all-chats-item:active,
[href*="/chat"]:active,
.chat-item:active {
    transform: scale(0.98) translateY(1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    background: rgba(255, 255, 255, 0.05);
}

/* Hover effect for desktop */
@media (hover: hover) {
    .chat-link-item:hover,
    .match-chat-link:hover,
    .all-chats-item:hover,
    [href*="/chat"]:hover,
    .chat-item:hover {
        transform: translateY(-1px);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
        background: rgba(255, 255, 255, 0.03);
    }
}

/* Enhanced push animation for mobile */
@media (max-width: 768px) {
    .chat-link-item:active,
    .match-chat-link:active,
    .all-chats-item:active,
    [href*="/chat"]:active,
    .chat-item:active {
        transform: scale(0.96) translateY(2px);
        box-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
        background: rgba(255, 255, 255, 0.08);
    }
    
    /* Faster animation on mobile for instant feedback */
    .chat-link-item,
    .match-chat-link,
    .all-chats-item,
    [href*="/chat"],
    .chat-item {
        transition: all 0.1s cubic-bezier(0.4, 0.0, 0.2, 1);
    }
}

/* Specific styling for all chats page */
.all-chats-container .card,
.all-chats-container .list-group-item {
    transition: all 0.15s cubic-bezier(0.4, 0.0, 0.2, 1);
    transform: translateZ(0);
}

.all-chats-container .card:active,
.all-chats-container .list-group-item:active {
    transform: scale(0.98) translateY(1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

/* Match list chat buttons */
.match-actions .btn[href*="/chat"],
.match-item .btn[href*="/chat"] {
    transition: all 0.15s cubic-bezier(0.4, 0.0, 0.2, 1);
}

.match-actions .btn[href*="/chat"]:active,
.match-item .btn[href*="/chat"]:active {
    transform: scale(0.95);
    box-shadow: 0 2px 6px rgba(var(--bs-primary-rgb), 0.4);
}

/* Ripple effect animation */
@keyframes ripple {
    0% {
        opacity: 1;
        transform: scale(0);
    }
    100% {
        opacity: 0;
        transform: scale(1);
    }
}

/* Add ripple effect to chat links */
.chat-link-item::after,
.match-chat-link::after,
.all-chats-item::after,
[href*="/chat"]::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

/* Trigger ripple on active state */
.chat-link-item:active::after,
.match-chat-link:active::after,
.all-chats-item:active::after,
[href*="/chat"]:active::after {
    width: 200px;
    height: 200px;
    margin-top: -100px;
    margin-left: -100px;
    animation: ripple 0.6s ease-out;
}

/* Ensure parent elements have relative positioning for ripple */
.chat-link-item,
.match-chat-link,
.all-chats-item,
[href*="/chat"] {
    position: relative;
    overflow: hidden;
}
/* --- matches-shared.css --- */
    /* Prevent auto-zoom on input fields in mobile devices */
    input[type="number"] {
        font-size: 16px;
        /* minimum font size to prevent zoom on iOS */
    }

    /* Clean and simple team alignment for upcoming matches */
    .teams {
        padding: 0.75rem 1rem;
    }

    .teams-container {
        display: flex;
        justify-content: center;
        align-items: center;
        gap: 2rem;
        width: 100%;
        margin: 0 auto;
        padding: 0 1rem;
    }

    .team-1,
    .team-2 {
        flex: 1;
        min-width: 0;
        display: flex;
        flex-direction: column;
    }

    .team-1 {
        align-items: flex-end;
    }

    .team-2 {
        align-items: flex-start;
    }

    .vs {
        flex: 0 0 auto;
        color: var(--bs-secondary-color);
        font-weight: 500;
        padding: 0 1rem;
        white-space: nowrap;
    }

    .team-players {
        font-size: 0.9rem;
        font-weight: 500;
        color: var(--bs-body-color);
        line-height: 1.2;
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
        width: 100%;
        min-width: 0;
        overflow: hidden;
    }

    .player-name {
        display: block;
        margin: 2px 0;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        text-align: center;
        width: 100%;
        max-width: 100%;
        min-width: 0;
    }

    /* "Only my matches" filter — hide cards I'm not playing in. Scoped per
       container so upcoming + completed can be filtered independently. */
    #upcoming-matches-container.filter-only-mine .match-card[data-has-me="0"],
    #completed-matches-container.filter-only-mine .match-card[data-has-me="0"] {
        display: none;
    }
    /* Hide round dividers when filter is on — orphan <hr>s look ugly */
    #upcoming-matches-container.filter-only-mine hr,
    #completed-matches-container.filter-only-mine hr {
        display: none;
    }

    /* Title sits centered at the top of the card-body. The filter button is
       absolute-positioned to the card-body's top-right and vertical-aligned
       with the title (no extra wrapper around them — both are direct children
       of card-body). */
    .matches-card-with-header > .card-body {
        position: relative;
    }
    .matches-card-with-header .matches-card-title {
        line-height: 34px;          /* matches filter btn height so they align */
        padding: 0 44px;            /* keep title clear of the abs-positioned button */
    }
    .matches-card-filter-btn {
        position: absolute;
        top: var(--bs-card-spacer-y, 1rem);
        right: var(--bs-card-spacer-x, 1rem);
    }

    /* iOS-blue circle outline by default; filled blue with white icon when active */
    body.theme-apple .matches-filter-btn,
    .matches-filter-btn {
        background: transparent;
        background-color: transparent;
        border: 1.5px solid var(--ios-tint, #007AFF);
        color: var(--ios-tint, #007AFF);
        width: 34px;
        height: 34px;
        padding: 0;
        border-radius: 50%;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        transition: background 160ms ease, color 160ms ease, transform 140ms cubic-bezier(0.22, 1, 0.36, 1);
    }
    .matches-filter-btn svg {
        width: 17px;
        height: 17px;
        stroke: var(--ios-tint, #007AFF);
        stroke-width: 2;
        fill: none;
    }
    body.theme-apple .matches-filter-btn.is-active,
    .matches-filter-btn.is-active {
        background: var(--ios-tint, #007AFF);
        background-color: var(--ios-tint, #007AFF);
        border-color: var(--ios-tint, #007AFF);
        color: #FFFFFF;
    }
    .matches-filter-btn.is-active svg {
        stroke: #FFFFFF;
        fill: rgba(255, 255, 255, 0.22);
    }
    .matches-filter-btn:active,
    .matches-filter-btn.is-active:active {
        transform: scale(0.92);
    }

    /* Match card styles */
    .match-card {
        background: var(--bs-body-bg);
        border: 1px solid var(--bs-border-color);
        border-radius: 0.5rem;
    }

    /* Court badge styles */
    .court-badge-container {
        display: flex;
        align-items: center;
        justify-content: center;
        margin: 0 0.5rem;
    }

    .court-badge {
        font-size: 0.75rem;
        font-weight: 600;
        padding: 0.25rem 0.5rem;
        border-radius: 0.375rem;
        white-space: nowrap;
        background-color: #17a2b8;
        color: #fff;
    }

    /* Ensure upcoming matches team layout stays vertical */
    .teams .team-players {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 0px;
    }

    .teams .team-players .player-name {
        display: block;
        text-align: center;
        width: 100%;
        margin: 0;
        line-height: 1.1;
    }

    .teams .team-players .second-name {
        margin-top: 4px;
        padding-top: 2px;
    }

    .teams .team-players .text-white {
        display: block;
        text-align: center;
        margin: -4px 0 2px 0;
        font-size: 0.8rem;
        line-height: 0.8;
    }

    /* One Day Tournament compact layout - Score button next to names */
    .odt-match-row {
        gap: 0.5rem;
    }

    .odt-teams-wrapper {
        min-width: 0;
    }

    .odt-teams-wrapper .teams {
        padding: 0.25rem 0;
        margin: 0;
    }

    .odt-teams-wrapper .teams-container.odt-compact {
        gap: 0.5rem;
        padding: 0;
    }

    .odt-teams-wrapper .teams-container.odt-compact .vs {
        padding: 0 4px;
        font-size: 0.7rem;
    }

    .odt-teams-wrapper .teams-container.odt-compact .team-players {
        gap: 0;
    }

    .odt-teams-wrapper .teams-container.odt-compact .player-name {
        font-size: 0.8rem;
        line-height: 1.1;
        margin: 0;
    }

    .odt-score-btn-wrapper {
        flex-shrink: 0;
    }

    .odt-score-btn-wrapper .match-actions-grid {
        margin: 0;
        padding: 0;
    }

    .odt-score-btn-wrapper .match-action-item {
        margin: 0;
    }

    /* All match action buttons - Perzik (#D2A679) */
    .match-action-item .button-match-action,
    .match-action-item a.button-match-action,
    .match-action-item button.button-match-action,
    .match-actions-grid .button-match-action,
    .match-actions .button-match-action {
        border-color: var(--ios-tint);
        color: var(--ios-tint);
    }

    .match-action-item .button-match-action:hover,
    .match-action-item a.button-match-action:hover,
    .match-action-item button.button-match-action:hover,
    .match-actions-grid .button-match-action:hover,
    .match-actions .button-match-action:hover {
        background: var(--ios-tint);
        border-color: var(--ios-tint);
        color: #111;
    }

    /* Existing match details styles */
    .match-details {
        padding: 1rem;
        background-color: var(--bs-secondary-bg);
        border-radius: 0.5rem;
    }

    .team {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 0.5rem;
    }

    .team-name {
        flex: 1;
        color: var(--bs-body-color);
        display: flex;
        align-items: center;
    }

    .winner-trophy {
        width: 18px;
        height: 18px;
        color: #D2A679;
        /* Perzik - EffePadelle brand color */
        margin-left: 0.5rem;
        filter: drop-shadow(0 0 2px rgba(210, 166, 121, 0.5));
    }

    .score-display {
        display: flex;
        align-items: center;
        gap: 1rem;
    }

    .set-score {
        min-width: 1.5rem;
        text-align: center;
        font-weight: 500;
        color: var(--bs-primary);
    }

    .set-score.text-success {
        color: #28a745;
    }

    .set-score.text-danger {
        color: #dc3545;
    }

    .match-actions {
        display: flex;
        gap: 0.5rem;
        flex-wrap: wrap;
        margin-top: 1rem;
    }

    .match-actions .btn {
        flex: 1;
        min-width: 120px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        padding: 0.375rem 0.75rem;
    }

    /* Grid layout for match action buttons */
    .match-actions-grid {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 0.5rem;
        margin-top: 1rem;
    }

    .match-actions-grid-3 {
        grid-template-columns: 1fr 1fr 1fr;
    }

    .match-actions-single {
        display: flex;
        margin-top: 1rem;
    }

    .match-actions-single .btn {
        width: 100%;
    }

    .match-actions-grid .btn {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        padding: 0.375rem 0.75rem;
        white-space: nowrap;
        min-height: 38px;
    }

    /* Fix for button alignment issues */
    .button-match-action {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        text-decoration: none;
    }

    .left-actions,
    .right-actions {
        display: flex;
        align-items: center;
        gap: 0.5rem;
    }

    .match-actions .feather-sm {
        margin-right: 0.25rem;
    }

    .venue-info {
        font-style: italic;
        font-size: 0.9rem;
        color: #9fa6b2;
    }

    .match-datetime {
        color: #9fa6b2;
        text-align: right;
        margin-right: 0;
        padding-right: 0;
    }

    .team-names {
        text-align: left;
        margin-bottom: 1rem;
        padding: 0.5rem;
        background-color: var(--bs-body-bg);
        border-radius: 0.25rem;
        border: 1px solid var(--bs-border-color);
    }

    /* Score Modal Styles */
    .score-modal .modal-content {
        background: #030508;
        /* Very dark background - darker than other elements */
    }

    .score-modal .modal-header,
    .score-modal .modal-footer {
        background: var(--bs-dark);
        /* Greyish background to match reschedule modal */
        border-color: var(--bs-border-color);
        padding: 0.75rem 1.25rem;
        /* More compact padding */
    }

    .team1-name,
    .team2-name {
        font-weight: 500;
        color: var(--bs-body-color);
    }

    /* Remove all table borders and separators */
    .score-modal .table> :not(caption)>*>* {
        border: none;
        background: transparent;
    }

    .score-modal .table {
        border: none;
        background: transparent;
    }

    .score-modal .modal-body {
        background: #030508;
        /* Very dark background - darker than other elements */
        color: var(--bs-body-color);
    }

    .score-modal .modal-header {
        background: var(--bs-dark);
        /* Greyish background to match reschedule modal */
        color: var(--bs-body-color);
        border-bottom: 1px solid var(--bs-border-color);
        padding: 0.75rem 1.25rem;
        /* More compact padding */
    }

    .score-modal .modal-footer {
        background: var(--bs-dark);
        /* Greyish background to match reschedule modal */
        border-top: 1px solid var(--bs-border-color);
        padding: 0.75rem 1.25rem;
        /* More compact padding */
    }

    /* Make sure the divider between sets is removed */
    .score-table tr td:not(:last-child),
    .score-table tr th:not(:last-child) {
        border-right: none;
    }

    .text-success {
        color: #28a745;
    }

    .text-danger {
        color: #dc3545;
    }

    .score-modal .form-label {
        color: var(--bs-body-color);
    }

    .score-modal .bg-light {
        background-color: var(--bs-secondary-bg);
    }

    .venue-item {
        padding: 5px;
    }

    .venue-name {
        font-weight: 500;
        margin-bottom: 2px;
    }

    .venue-address {
        display: block;
        font-size: 0.875rem;
    }

    /* Add badge styling */
    .chat-badge {
        position: absolute;
        top: -8px;
        right: -8px;
        min-width: 18px;
        height: 18px;
        padding: 0 5px;
        border-radius: 9px;
        background-color: var(--bs-danger);
        color: white;
        font-size: 11px;
        font-weight: bold;
        display: flex;
        align-items: center;
        justify-content: center;
        opacity: 0;
        transition: opacity 0.3s ease;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
        border: 1px solid rgba(220, 53, 69, 0.7);
    }

    .chat-badge.show {
        opacity: 1;
    }

    /* Button with chat icon - position relative for badges */
    .button-match-action {
        position: relative;
    }

    /* Score Modal Styles */
    .score-modal .modal-content {
        background: #030508;
        /* Very dark background - darker than other elements */
    }

    .score-modal .vs-badge {
        background: var(--bs-primary);
        color: white;
        border-radius: 20px;
        padding: 4px 12px;
        font-weight: 500;
        font-size: 0.9rem;
    }

    .score-modal .team-label {
        flex: 1;
        text-align: center;
        color: var(--bs-body-color);
    }

    /* Score Grid Styles */
    .score-grid {
        display: grid;
        gap: 1rem;
        margin-bottom: 1rem;
    }

    .score-row {
        display: grid;
        grid-template-columns: 2.5fr 0.8fr 0.8fr 0.8fr;
        gap: 0.75rem;
        align-items: center;
    }

    .score-cell input.form-control {
        padding: 0.25rem;
        text-align: center;
        min-width: 40px;
        max-width: 60px;
        width: 100%;
    }

    /* Further enhance mobile responsiveness */
    @media (max-width: 576px) {
        .score-row {
            grid-template-columns: 1.3fr 0.6fr 0.6fr 0.6fr;
            gap: 0.35rem;
        }

        .score-cell input.form-control {
            padding: 0.2rem;
            font-size: 0.8rem;
            min-width: 30px;
            max-width: 40px;
        }

        .score-cell {
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
        }

        .team1-player1,
        .team1-player2,
        .team2-player1,
        .team2-player2 {
            display: block;
            max-width: 100%;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
            font-size: 0.8rem;
        }
    }

    .score-cell.text-center {
        font-size: 0.9rem;
        font-weight: 500;
    }

    /* Mobile responsiveness improvements */
    @media (max-width: 768px) {
        .score-row {
            grid-template-columns: 1.8fr 0.7fr 0.7fr 0.7fr;
            gap: 0.5rem;
        }

        .score-cell input.form-control {
            padding: 0.25rem;
            font-size: 0.875rem;
            min-width: 35px;
            max-width: 24px;
        }

        .player-stats-section,
        .score-section {
            padding: 1rem;
        }

        .modal-body {
            padding: 1rem;
        }

        .team1-players-label,
        .team2-players-label {
            font-size: 0.85rem;
        }

        .score-cell.text-center {
            font-size: 0.8rem;
        }
    }

    .score-row.header {
        font-weight: 500;
        color: var(--bs-primary);
    }

    .score-cell {
        padding: 0.35rem 0.25rem;
    }

    .score-input {
        width: 100%;
        text-align: center;
        background-color: var(--bs-body-bg);
        border: 1px solid var(--bs-border-color);
        color: var(--bs-body-color);
    }

    /* Stats Grid Styles */
    .stats-grid {
        display: grid;
        gap: 1rem;
    }

    .player-row {
        display: grid;
        grid-template-columns: 70% 15% 15%;
        gap: 1rem;
        align-items: center;
        padding: 0.5rem;
        border-bottom: 1px solid var(--bs-border-color);
    }

    .player-row:last-child {
        border-bottom: none;
    }

    .player-name {
        font-weight: 500;
        color: var(--bs-body-color);
    }

    /* Additional mobile optimization for player stats */
    @media (max-width: 576px) {
        .player-row {
            grid-template-columns: 60% 20% 20%;
            gap: 0.5rem;
            padding: 0.3rem;
        }

        .stats-grid {
            gap: 0.5rem;
        }

        .player-row .player-name {
            font-size: 0.8rem;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
        }

        .stat-input {
            padding: 0.2rem;
            font-size: 0.8rem;
        }
    }

    .stat-input {
        width: 100%;
        text-align: center;
        background-color: var(--bs-body-bg);
        border: 1px solid var(--bs-border-color);
        color: var(--bs-body-color);
    }

    /* Expandable planner status section - minimalist style */
    .planner-expand-section {
        margin-top: -0.5rem;
        /* Move divider 10px higher */
    }

    /* Space after divider to action buttons - also moved up */
    .planner-expand-section+.match-actions-grid {
        margin-top: 0.25rem;
        /* Reduced spacing to buttons */
    }

    .planner-expand-trigger {
        display: flex;
        align-items: center;
        cursor: pointer;
        padding: 4px 0;
    }

    .planner-divider {
        flex: 1;
        height: 1px;
        background: rgba(255, 255, 255, 0.1);
    }

    .planner-expand-arrow {
        width: 24px;
        height: 24px;
        display: flex;
        align-items: center;
        justify-content: center;
        color: rgba(255, 255, 255, 0.5);
        transition: transform 0.2s ease, color 0.2s ease;
        margin-left: 8px;
    }

    .planner-expand-arrow.expanded {
        transform: rotate(180deg);
    }

    .planner-expand-trigger:hover .planner-expand-arrow {
        color: rgba(255, 255, 255, 0.8);
    }

    .planner-status-panel {
        padding: 8px 0 4px 0;
    }

    .planner-loading {
        display: flex;
        justify-content: center;
        padding: 8px 0;
    }

    .planner-content {
        background: rgba(10, 10, 10, 0.5);
        border-radius: 8px;
        padding: 12px;
    }

    /* Player list in planner summary */
    .planner-players {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
        margin-bottom: 10px;
    }

    .planner-player {
        display: flex;
        align-items: center;
        gap: 4px;
        font-size: 0.75rem;
        color: rgba(255, 255, 255, 0.7);
    }

    .planner-player .status-icon {
        width: 14px;
        height: 14px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .planner-player .status-icon.first {
        color: #5c9ce5;
    }

    .planner-player .status-icon.responded {
        color: #28a745;
    }

    .planner-player .status-icon.pending {
        color: rgba(255, 255, 255, 0.3);
    }

    /* Best slot display */
    .planner-best-slot {
        display: flex;
        align-items: center;
        gap: 8px;
        padding-top: 6px;
        padding-bottom: 2px;
    }

    .planner-best-slot.top-slot {
        border-top: 1px solid rgba(255, 255, 255, 0.1);
        padding-top: 8px;
    }

    .planner-best-slot:not(.top-slot) {
        opacity: 0.8;
    }

    .planner-slot-info {
        flex: 0 0 80px;
        min-width: 80px;
        font-size: 0.75rem;
        color: rgba(255, 255, 255, 0.7);
    }

    .planner-progress-container {
        flex: 1;
        display: flex;
        align-items: center;
        gap: 8px;
    }

    .planner-progress {
        flex: 1;
        height: 4px;
        background: rgba(255, 255, 255, 0.2);
        border-radius: 2px;
        overflow: hidden;
    }

    .planner-progress-bar {
        height: 100%;
        background: #496E78;
        border-radius: 2px;
        transition: width 0.3s ease;
    }

    .planner-percentage {
        font-size: 0.7rem;
        color: rgba(255, 255, 255, 0.6);
        min-width: 30px;
        text-align: right;
    }

    .planner-no-data {
        font-size: 0.75rem;
        color: rgba(255, 255, 255, 0.4);
        text-align: center;
        padding: 4px 0;
    }

    .planner-show-all-wrapper {
        text-align: center;
        padding: 4px 0 2px;
    }

    .planner-show-all-link {
        color: rgba(255, 255, 255, 0.4);
        font-size: 0.75rem;
        text-decoration: underline;
        cursor: pointer;
    }

    .planner-show-all-link:hover {
        color: rgba(255, 255, 255, 0.6);
    }

    .planner-all-slots {
        margin-top: 2px;
    }

/* --- invitation-styles.css --- */
/* Invitation system styles */

/* Cards for pending invitations */
.invitation-card {
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 15px;
    background-color: rgba(255, 255, 255, 0.04);
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    transition: all 0.3s ease;
    overflow: hidden;
}

.invitation-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    background-color: rgba(255, 255, 255, 0.06);
}

.invitation-card h5 {
    margin-top: 0;
    color: #fff;
}

.invitation-details {
    margin: 10px 0;
    font-size: 0.9em;
    color: rgba(255,255,255,0.6);
}

.invitation-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 10px;
}

.decline-btn {
    background-color: rgba(244, 67, 54, 0.8);
    color: white;
    border: none;
    padding: 6px 14px;
    border-radius: 20px;
    cursor: pointer;
    font-weight: 600;
}

.accept-btn {
    background-color: rgba(76, 175, 80, 0.8);
    color: white;
    border: none;
    padding: 6px 14px;
    border-radius: 20px;
    cursor: pointer;
    font-weight: 600;
}

/* Alerts for invitation actions */
.invitation-alert {
    margin-bottom: 15px;
    padding: 10px 15px;
    border-radius: 10px;
    color: white;
    font-weight: 500;
}

.invitation-alert.success {
    background-color: rgba(76, 175, 80, 0.3);
    border: 1px solid rgba(76, 175, 80, 0.5);
}

.invitation-alert.error {
    background-color: rgba(244, 67, 54, 0.3);
    border: 1px solid rgba(244, 67, 54, 0.5);
}

/* Player search results */
.player-result {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 0;
    gap: 12px;
}

.player-result:first-child {
    border-radius: 12px 12px 0 0;
}

.player-result:last-child {
    border-bottom: none;
    border-radius: 0 0 12px 12px;
}

.player-result:only-child {
    border-radius: 12px;
}

.player-name {
    font-weight: 600;
    color: #fff;
    flex: 1;
    margin-right: 12px;
}

/* THE invite button — perzik, prominent, right-aligned */
.invite-btn {
    background-color: #D2A679;
    color: #111827;
    border: none;
    padding: 8px 20px;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s ease;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    letter-spacing: 0.3px;
    box-shadow: 0 4px 10px rgba(210, 166, 121, 0.3);
    text-transform: none;
}

/* Bottom Sheet for Invite Modal — only visible when Bootstrap marks it .show */
.modal.bottom-sheet-modal:not(.show) {
    display: none;
    pointer-events: none;
    visibility: hidden;
}

.modal.bottom-sheet-modal.show {
    padding-left: 0;
    padding-right: 0;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    overflow: hidden;
    pointer-events: auto;
    visibility: visible;
}

.modal.bottom-sheet-modal .modal-dialog {
    margin: 0;
    width: 100%;
    max-width: 100%;
    transform: translateY(100%);
    transition: transform 0.3s cubic-bezier(0.25, 1, 0.5, 1);
    display: flex;
    align-items: flex-end;
}

.modal.bottom-sheet-modal.show .modal-dialog {
    transform: translateY(0);
}

.modal.bottom-sheet-modal .modal-content {
    border-radius: 24px 24px 0 0;
    border: none;
    max-height: 92vh;
    padding-bottom: env(safe-area-inset-bottom, 20px);
    background: rgba(17, 24, 39, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 -5px 25px rgba(0,0,0,0.5);
}

.bottom-sheet-header {
    padding: 8px 0 16px;
    cursor: grab;
    touch-action: none;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.bottom-sheet-handle {
    width: 40px;
    height: 5px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 10px;
    margin-bottom: 8px;
}

.bottom-sheet-body {
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 0 20px 20px;
    flex: 1;
}

/* Fix for mobile keyboard pushing sheet up too much */
@media (max-width: 768px) {
    .modal.bottom-sheet-modal .modal-dialog {
        height: auto;
        min-height: 60vh;
    }
}

.invite-btn:hover:not(:disabled) {
    background-color: #e5b68a;
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 8px 20px rgba(210, 166, 121, 0.5);
}

.invite-btn:active:not(:disabled) {
    transform: translateY(0);
}

.invite-btn:disabled {
    background-color: rgba(75, 85, 99, 0.5);
    color: rgba(156, 163, 175, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.08);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
    font-weight: 500;
    font-size: 0.82rem;
}

/* Search alert messages */
.search-alert {
    margin: 10px 0;
    padding: 10px 15px;
    border-radius: 10px;
    display: none;
}

.search-alert.success {
    background-color: rgba(76, 175, 80, 0.15);
    color: #a8e6aa;
    border: 1px solid rgba(76, 175, 80, 0.3);
}

.search-alert.error {
    background-color: rgba(244, 67, 54, 0.15);
    color: #f8a09a;
    border: 1px solid rgba(244, 67, 54, 0.3);
}

/* Loading spinner */
.loading-spinner-container {
    text-align: center;
    padding: 20px;
    color: rgba(255,255,255,0.5);
}

.loading-spinner {
    display: inline-block;
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    border-top-color: #D2A679;
    animation: spin 0.8s linear infinite;
    margin-right: 8px;
    vertical-align: middle;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* --- pull-to-refresh.css --- */
/* Native iOS-style pull-to-refresh */
#page-wrapper {
    min-height: 100vh;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

#pull-refresh-icon {
    position: fixed;
    top: 80px; /* Position below navbar (navbar is ~60px + some margin) */
    left: 50%;
    margin-left: -12px; /* Half of icon width (24px / 2) to center perfectly */
    z-index: 10000;
    opacity: 0; /* Start at 0% opacity */
    color: rgba(255, 255, 255, 0.5);
    pointer-events: none;
    transition: none; /* No transition initially - controlled by JS */
    visibility: visible; /* Always visible but controlled by opacity */
}

#pull-refresh-icon.ready {
    color: #10b981;
}

#pull-refresh-icon.refreshing svg {
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

body {
    overscroll-behavior-y: contain;
}

/* Only show on touch devices */
@media (hover: hover) and (pointer: fine) {
    #pull-refresh-icon {
        display: none;
    }
}

/* --- competition view _assets inline --- */
.invite-glow-btn {
    white-space: nowrap;
    min-width: fit-content;
    padding-left: 1rem;
    padding-right: 1rem;
}

.invite-glow-wrapper {
    display: inline-flex;
    width: auto;
}

@media (max-width: 768px) {
    .card,
    .competition-header,
    .tab-content > .card {
        margin-left: 0;
        margin-right: 0;
    }

    .payment-settings-grid,
    .overview-stats-grid {
        padding: 0.5rem;
        gap: 0.4rem;
    }

    .payment-setting-item,
    .overview-stat-item {
        padding: 0.5rem;
        min-height: auto;
    }

    .payment-setting-item .stat-label,
    .overview-stat-item .stat-label {
        font-size: 0.65rem;
        margin-bottom: 0.1rem;
        text-transform: uppercase;
        letter-spacing: 0.5px;
    }

    .payment-setting-item .stat-number,
    .overview-stat-item .stat-number {
        font-size: 0.7rem;
        font-family: 'Inter', sans-serif;
    }

    .payment-row td:nth-child(2),
    .tab-pane#payment div[style*="font-variant-numeric: tabular-nums"] {
        font-family: 'Inter', sans-serif;
    }

    .payment-setting-item .iban-number {
        font-size: 0.55rem;
        word-break: break-all;
    }
}

.payment-setting-item .stat-number,
.tab-pane#payment .overview-stat-item span[style*="font-variant-numeric: tabular-nums"],
.tab-pane#payment .payment-row td[style*="font-variant-numeric: tabular-nums"],
.tab-pane#payment div[style*="font-variant-numeric: tabular-nums"] {
    font-family: 'Inter', sans-serif;
}

/* Individual leaderboard overrides removed — all styles now in redesigned-leaderboard.css */

/* --- admin-table-scroll.css --- */
/* Admin Users Table - Horizontal Scroll for Desktop */
.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch; /* Smooth scrolling on iOS */
}

/* Ensure table maintains minimum width on desktop */
@media (min-width: 768px) {
    .table-responsive {
        display: block;
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .table-responsive .table {
        min-width: 1200px; /* Force horizontal scroll on desktop when table is too wide */
        margin-bottom: 0;
    }
}

/* Style the scrollbar for better UX */
.table-responsive::-webkit-scrollbar {
    height: 8px;
}

.table-responsive::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.table-responsive::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

.table-responsive::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Ensure sortable columns have proper spacing */
.sortable {
    white-space: nowrap;
    position: relative;
    padding-right: 20px;
}

.sort-indicator {
    margin-left: 5px;
    color: #007bff;
    font-weight: bold;
}
/* --- enhanced-animations.css --- */
/* Enhanced Animations for EffePadelle - Fluid and Responsive UI */

/* ============================================================================
   PAGE TRANSITIONS - Enhanced fluidity
   ============================================================================ */

.page-transition-container {
    position: relative;
    overflow: hidden;
    min-height: 100vh;
}

.page-content {
    will-change: transform, opacity;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

.page-content.slide-out-left {
    animation: slideOutLeft 0.3s cubic-bezier(0.4, 0.0, 0.2, 1) forwards;
}

.page-content.slide-out-right {
    animation: slideOutRight 0.3s cubic-bezier(0.4, 0.0, 0.2, 1) forwards;
}

.page-content.slide-in-left {
    animation: slideInFromLeft 0.3s cubic-bezier(0.4, 0.0, 0.2, 1) forwards;
}

.page-content.slide-in-right {
    animation: slideInFromRight 0.3s cubic-bezier(0.4, 0.0, 0.2, 1) forwards;
}

@keyframes slideOutLeft {
    0% {
        transform: translateX(0);
        opacity: 1;
    }
    100% {
        transform: translateX(-30%);
        opacity: 0;
    }
}

@keyframes slideOutRight {
    0% {
        transform: translateX(0);
        opacity: 1;
    }
    100% {
        transform: translateX(30%);
        opacity: 0;
    }
}

@keyframes slideInFromLeft {
    0% {
        transform: translateX(-30%);
        opacity: 0;
    }
    100% {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideInFromRight {
    0% {
        transform: translateX(30%);
        opacity: 0;
    }
    100% {
        transform: translateX(0);
        opacity: 1;
    }
}

/* ============================================================================
   MODAL ANIMATIONS - Smooth and fluid
   ============================================================================ */

.modal.fade .modal-dialog {
    transition: transform 0.3s cubic-bezier(0.4, 0.0, 0.2, 1), 
                opacity 0.3s cubic-bezier(0.4, 0.0, 0.2, 1);
    transform: scale(0.9) translateY(-20px);
    opacity: 0;
}

.modal.show .modal-dialog {
    transform: scale(1) translateY(0);
    opacity: 1;
}

.modal-backdrop.fade {
    transition: opacity 0.3s cubic-bezier(0.4, 0.0, 0.2, 1);
}

.modal-backdrop.show {
    opacity: 0.5;
}

.modal-fullscreen.fade .modal-dialog {
    transform: translateY(100%);
    opacity: 1;
}

.modal-fullscreen.show .modal-dialog {
    transform: translateY(0);
}

/* NO opacity or visibility overrides for modal content - let Bootstrap handle it */

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================================================
   MATCH CARD ENTRANCE ANIMATION - Fade + Rise effect for new rounds
   ============================================================================ */

@keyframes matchCardEnter {
    from {
        opacity: 0;
        transform: translateY(16px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.match-card-enter {
    animation: matchCardEnter 0.35s cubic-bezier(0.4, 0.0, 0.2, 1) forwards;
}

/* Staggered animation delays for multiple cards */
.match-card-enter:nth-child(1) { animation-delay: 0ms; }
.match-card-enter:nth-child(2) { animation-delay: 70ms; }
.match-card-enter:nth-child(3) { animation-delay: 140ms; }
.match-card-enter:nth-child(4) { animation-delay: 210ms; }
.match-card-enter:nth-child(5) { animation-delay: 280ms; }
.match-card-enter:nth-child(6) { animation-delay: 350ms; }
.match-card-enter:nth-child(7) { animation-delay: 420ms; }
.match-card-enter:nth-child(8) { animation-delay: 490ms; }

/* ============================================================================
   CARD INTERACTIONS - Smooth hover and active states
   ============================================================================ */

.card,
.match-item,
.player-card {
    transition: transform 0.3s cubic-bezier(0.4, 0.0, 0.2, 1),
                box-shadow 0.3s cubic-bezier(0.4, 0.0, 0.2, 1),
                backdrop-filter 0.3s cubic-bezier(0.4, 0.0, 0.2, 1);
    will-change: transform, box-shadow;
}

/* Regular cards - hover without scale */
.card:hover,
.match-item:hover,
.player-card:hover {
    transform: translateY(-4px);
}

.card:active {
    transform: translateY(-1px);
    transition-duration: 0.1s;
}

/* Competition cards - keep scale on hover */
.competition-card {
    transition: transform 0.3s cubic-bezier(0.4, 0.0, 0.2, 1),
                box-shadow 0.3s cubic-bezier(0.4, 0.0, 0.2, 1),
                backdrop-filter 0.3s cubic-bezier(0.4, 0.0, 0.2, 1);
    will-change: transform, box-shadow;
}

.competition-card:hover {
    transform: translateY(-4px) scale(1.01);
}

.competition-card:active {
    transform: translateY(-1px) scale(0.99);
    transition-duration: 0.1s;
}

/* Folder cards - special light grey cards - keep scale on hover */
.folder-card-inner:hover {
    transform: translateY(-4px) scale(1.01);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
}

/* ============================================================================
   BUTTON ANIMATIONS - Responsive feedback
   ============================================================================ */

.btn {
    transition: transform 0.2s cubic-bezier(0.4, 0.0, 0.2, 1),
                background-color 0.2s cubic-bezier(0.4, 0.0, 0.2, 1),
                box-shadow 0.2s cubic-bezier(0.4, 0.0, 0.2, 1);
    will-change: transform;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition-duration: 0.1s;
}

.btn-primary:hover {
    box-shadow: 0 4px 16px rgba(13, 110, 253, 0.4);
}

.btn-success:hover {
    box-shadow: 0 4px 16px rgba(25, 135, 84, 0.4);
}

.btn-danger:hover {
    box-shadow: 0 4px 16px rgba(220, 53, 69, 0.4);
}

/* Circular buttons */
.btn-circle {
    transition: transform 0.3s cubic-bezier(0.4, 0.0, 0.2, 1),
                background-color 0.3s cubic-bezier(0.4, 0.0, 0.2, 1);
}

.btn-circle:hover {
    /* No scale effect on hover */
}

.btn-circle:active {
    /* No scale effect on active */
}

/* ============================================================================
   BADGE ANIMATIONS - Subtle entrance
   ============================================================================ */

.badge {
    animation: badgePop 0.3s cubic-bezier(0.4, 0.0, 0.2, 1);
    transition: transform 0.2s cubic-bezier(0.4, 0.0, 0.2, 1);
}

.badge:hover {
    /* No scale effect on hover */
}

@keyframes badgePop {
    0% {
        transform: scale(0.8);
        opacity: 0;
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* ============================================================================
   LIST ANIMATIONS - Staggered entrance
   ============================================================================ */

.list-group-item,
.match-card,
.player-item {
    animation: slideInFade 0.4s cubic-bezier(0.4, 0.0, 0.2, 1) backwards;
}

.list-group-item:nth-child(1),
.match-card:nth-child(1),
.player-item:nth-child(1) {
    animation-delay: 0.05s;
}

.list-group-item:nth-child(2),
.match-card:nth-child(2),
.player-item:nth-child(2) {
    animation-delay: 0.1s;
}

.list-group-item:nth-child(3),
.match-card:nth-child(3),
.player-item:nth-child(3) {
    animation-delay: 0.15s;
}

.list-group-item:nth-child(4),
.match-card:nth-child(4),
.player-item:nth-child(4) {
    animation-delay: 0.2s;
}

.list-group-item:nth-child(5),
.match-card:nth-child(5),
.player-item:nth-child(5) {
    animation-delay: 0.25s;
}

.list-group-item:nth-child(n+6),
.match-card:nth-child(n+6),
.player-item:nth-child(n+6) {
    animation-delay: 0.3s;
}

@keyframes slideInFade {
    from {
        opacity: 0;
        transform: translateY(15px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================================================
   DROPDOWN ANIMATIONS - VOLLEDIG UITGESCHAKELD (gebruiker wil GEEN verspringen)
   ============================================================================ */

/* ALLE dropdown transitions en animaties uitgeschakeld - Bootstrap + custom */
.dropdown-menu {
    transition: none;
    animation: none;
}

.dropdown-item {
    transition: none;
}

/* Dropdown toggle button - GEEN animaties */
.dropdown-toggle,
.btn.dropdown-toggle,
.btn-link.dropdown-toggle {
    transition: none;
    animation: none;
}

.dropdown-toggle:hover,
.dropdown-toggle:focus,
.dropdown-toggle:active {
    transition: none;
    animation: none;
}

/* ============================================================================
   FORM INTERACTIONS - Responsive inputs
   ============================================================================ */

.form-control,
.form-select,
textarea {
    transition: border-color 0.2s cubic-bezier(0.4, 0.0, 0.2, 1),
                box-shadow 0.2s cubic-bezier(0.4, 0.0, 0.2, 1),
                transform 0.2s cubic-bezier(0.4, 0.0, 0.2, 1);
}

.form-control:focus,
.form-select:focus,
textarea:focus {
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.15);
}

/* ============================================================================
   LOADING STATES - Smooth indicators
   ============================================================================ */

.spinner-border,
.spinner-grow {
    animation: spin 0.75s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Pulse loading effect */
.loading-pulse {
    animation: pulse 1.5s cubic-bezier(0.4, 0.0, 0.2, 1) infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.7;
        transform: scale(0.98);
    }
}

/* ============================================================================
   TOAST/ALERT ANIMATIONS - Slide in from top
   ============================================================================ */

.alert {
    animation: alertSlideIn 0.4s cubic-bezier(0.4, 0.0, 0.2, 1);
}

@keyframes alertSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.alert.fade-out {
    animation: alertSlideOut 0.3s cubic-bezier(0.4, 0.0, 0.2, 1) forwards;
}

@keyframes alertSlideOut {
    from {
        opacity: 1;
        transform: translateY(0);
    }
    to {
        opacity: 0;
        transform: translateY(-20px);
    }
}

/* ============================================================================
   SCROLL ANIMATIONS - Reveal on scroll
   ============================================================================ */

.scroll-reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s cubic-bezier(0.4, 0.0, 0.2, 1),
                transform 0.6s cubic-bezier(0.4, 0.0, 0.2, 1);
}

.scroll-reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* ============================================================================
   PERFORMANCE OPTIMIZATIONS
   ============================================================================ */

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms;
        animation-iteration-count: 1;
        transition-duration: 0.01ms;
        scroll-behavior: auto;
    }
}

/* Hardware acceleration for better performance */
.card,
.btn,
.modal,
.dropdown-menu,
.page-content {
    transform: translateZ(0);
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

/* --- competition view _assets inline --- */
.invite-glow-btn {
    white-space: nowrap;
    min-width: fit-content;
    padding-left: 1rem;
    padding-right: 1rem;
}

.invite-glow-wrapper {
    display: inline-flex;
    width: auto;
}

@media (max-width: 768px) {
    .card,
    .competition-header,
    .tab-content > .card {
        margin-left: 0;
        margin-right: 0;
    }

    .payment-settings-grid,
    .overview-stats-grid {
        padding: 0.5rem;
        gap: 0.4rem;
    }

    .payment-setting-item,
    .overview-stat-item {
        padding: 0.5rem;
        min-height: auto;
    }

    .payment-setting-item .stat-label,
    .overview-stat-item .stat-label {
        font-size: 0.65rem;
        margin-bottom: 0.1rem;
        text-transform: uppercase;
        letter-spacing: 0.5px;
    }

    .payment-setting-item .stat-number,
    .overview-stat-item .stat-number {
        font-size: 0.7rem;
        font-family: 'Inter', sans-serif;
    }

    .payment-row td:nth-child(2),
    .tab-pane#payment div[style*="font-variant-numeric: tabular-nums"] {
        font-family: 'Inter', sans-serif;
    }

    .payment-setting-item .iban-number {
        font-size: 0.55rem;
        word-break: break-all;
    }
}

.payment-setting-item .stat-number,
.tab-pane#payment .overview-stat-item span[style*="font-variant-numeric: tabular-nums"],
.tab-pane#payment .payment-row td[style*="font-variant-numeric: tabular-nums"],
.tab-pane#payment div[style*="font-variant-numeric: tabular-nums"] {
    font-family: 'Inter', sans-serif;
}

/* --- competition view _assets inline --- */
.invite-glow-btn {
    white-space: nowrap;
    min-width: fit-content;
    padding-left: 1rem;
    padding-right: 1rem;
}

.invite-glow-wrapper {
    display: inline-flex;
    width: auto;
}

@media (max-width: 768px) {
    .card,
    .competition-header,
    .tab-content > .card {
        margin-left: 0;
        margin-right: 0;
    }

    .payment-settings-grid,
    .overview-stats-grid {
        padding: 0.5rem;
        gap: 0.4rem;
    }

    .payment-setting-item,
    .overview-stat-item {
        padding: 0.5rem;
        min-height: auto;
    }

    .payment-setting-item .stat-label,
    .overview-stat-item .stat-label {
        font-size: 0.65rem;
        margin-bottom: 0.1rem;
        text-transform: uppercase;
        letter-spacing: 0.5px;
    }

    .payment-setting-item .stat-number,
    .overview-stat-item .stat-number {
        font-size: 0.7rem;
        font-family: 'Inter', sans-serif;
    }

    .payment-row td:nth-child(2),
    .tab-pane#payment div[style*="font-variant-numeric: tabular-nums"] {
        font-family: 'Inter', sans-serif;
    }

    .payment-setting-item .iban-number {
        font-size: 0.55rem;
        word-break: break-all;
    }
}

.payment-setting-item .stat-number,
.tab-pane#payment .overview-stat-item span[style*="font-variant-numeric: tabular-nums"],
.tab-pane#payment .payment-row td[style*="font-variant-numeric: tabular-nums"],
.tab-pane#payment div[style*="font-variant-numeric: tabular-nums"] {
    font-family: 'Inter', sans-serif;
}

/* ============================================================
   AVAILABILITY TIME SLOTS — row alignment + no text selection.

   Bootstrap's .form-check positions its input with padding-left and a
   negative margin sized for a ~1em box. These checkboxes are forced to
   24px, and .time-slot-label carries width:100%, so the label overflowed
   the row and wrapped onto its own line — leaving the circle stranded
   above the text instead of beside it.

   A plain flex row lines them up at any size. Selection is disabled
   because tapping a slot is a toggle, not a text gesture: long-press was
   highlighting "Ochtend 07:00-12:00" instead of picking the slot.

   NOTE: direct_form.html also carries ~230 lines of slot CSS inside a
   {% block extra_css %}, but base.html defines no such block, so Jinja
   discards all of it. Style lives here, where it actually loads.
   ============================================================ */
body.theme-apple .time-slots .form-check,
body.theme-apple .date-card .form-check {
    display: flex;
    align-items: center;
    gap: 2px;
    padding-left: 0;
    -webkit-user-select: none;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

body.theme-apple .time-slots .form-check .form-check-input,
body.theme-apple .date-card .form-check .form-check-input {
    margin-top: 0;
    margin-left: 0;
    float: none;
}

body.theme-apple .time-slots .form-check .time-slot-label,
body.theme-apple .date-card .form-check .time-slot-label {
    width: auto;
    flex: 1 1 auto;
    min-width: 0;
    -webkit-user-select: none;
    user-select: none;
}

/* Selected slot: highlight the whole row, not just the label.

   The soft-blue fill was landing on .time-slot-label only, so the
   checkbox sat outside the tinted area and read as a separate grey
   block glued to the left of the pill. Move the fill to the row and
   keep the label transparent. The circle itself also still used the
   pre-redesign teal (#496E78) instead of the iOS tint. */
body.theme-apple .time-slots .form-check .time-slot-label,
body.theme-apple .date-card .form-check .time-slot-label {
    background: transparent !important;
    background-color: transparent !important;
}

body.theme-apple .time-slots .form-check,
body.theme-apple .date-card .form-check {
    padding: 8px 12px;
    border-radius: 12px;
    /* Transparent border in the resting state so selecting a slot
       doesn't shift the row by the border width. */
    border: 1.5px solid transparent;
    transition: background-color 0.15s ease, border-color 0.15s ease;
}

body.theme-apple .time-slots .form-check:has(input:checked),
body.theme-apple .date-card .form-check:has(input:checked) {
    background: var(--ios-tint-soft, rgba(0, 122, 255, 0.14)) !important;
    border-color: var(--ios-tint, #007AFF) !important;
}

body.theme-apple .time-slots .form-check-input,
body.theme-apple .date-card .form-check-input,
body.theme-apple input.time-slot {
    border-color: var(--ios-tint, #007AFF) !important;
}

body.theme-apple .time-slots .form-check-input:checked,
body.theme-apple .date-card .form-check-input:checked,
body.theme-apple input.time-slot:checked {
    background-color: var(--ios-tint, #007AFF) !important;
    border-color: var(--ios-tint, #007AFF) !important;
}
