/* Custom styles to complement Bootstrap */

/* Team pair names always on one line */
.team-pair {
    white-space: nowrap !important;
    gap: .25rem;
}
.team-pair > a, .team-pair > span {
    display: inline !important;
}
.team-pair > a {
    max-width: 45%;
    min-width: 0;
}

/* Make team column wider in fixed partner mode - sized for team names */
.teams-leaderboard th:nth-child(2),
.teams-leaderboard td:nth-child(2) {
    min-width: 160px !important;
    width: auto !important;
    white-space: nowrap !important;
}

/* Reset scrollable part position */
.teams-leaderboard .redesigned-leaderboard {
    margin-left: 0 !important;
    padding-left: 0 !important;
}

/* Blue pair button styling */
.pair-btn-blue {
    background-color: #0d6efd !important;
    border-color: #0d6efd !important;
    color: white !important;
}

.pair-btn-blue:hover {
    background-color: #0b5ed7 !important;
    border-color: #0a58ca !important;
    color: white !important;
}

/* Shift columns right to prevent sticky column overlap */
/* Individual leaderboard (waiting to be paired with Pairing column) - shift 60px on Pairing column */
.individual-leaderboard table[data-partner-mode="fixed"] tbody td:nth-child(3),
.individual-leaderboard table[data-partner-mode="fixed"] thead th:nth-child(3) {
    padding-left: 60px !important;
}

/* Normal individual leaderboard (no Pairing column) - 15px padding-left voor statistiek kolommen */
.individual-leaderboard table:not([data-partner-mode="fixed"]) tbody td:nth-child(n+3),
.individual-leaderboard table:not([data-partner-mode="fixed"]) thead th:nth-child(n+3) {
    padding-left: 15px !important;
}

/* Teams leaderboard (paired) - shift 15px for all columns from pairing onwards */
.teams-leaderboard table tbody td:nth-child(3),
.teams-leaderboard table thead th:nth-child(3),
.teams-leaderboard table tbody td:nth-child(n+3),
.teams-leaderboard table thead th:nth-child(n+3) {
    padding-left: 15px !important;
}

/* Remove sticky column spacing gaps for ALL leaderboards in this view */
.competition-leaderboard-table th:first-child,
.competition-leaderboard-table td:first-child,
.competition-leaderboard-table th:nth-child(2),
.competition-leaderboard-table td:nth-child(2) {
    position: static !important;
    left: auto !important;
    width: auto !important;
    min-width: auto !important;
    max-width: none !important;
    z-index: auto !important;
    background-color: transparent !important;
    border-right: none !important;
    box-shadow: none !important;
}

.competition-leaderboard-table {
    border-collapse: collapse !important;
    border-spacing: 0 !important;
    min-width: auto !important;
}

/* Ensure proper spacing without gaps */
.competition-leaderboard-table th,
.competition-leaderboard-table td {
    padding: 0.5rem 0.75rem !important;
}

/* Match Teams column width to Player column */
.teams-leaderboard .competition-leaderboard-table th:nth-child(2),
.teams-leaderboard .competition-leaderboard-table td:nth-child(2) {
    width: 150px !important;
    min-width: 150px !important;
    max-width: 150px !important;
}

/* Make first column (# column) wider for 2 digits */
.competition-leaderboard-table th:first-child,
.competition-leaderboard-table td:first-child {
    width: 40px !important;
    min-width: 40px !important;
    max-width: 40px !important;
}

/* Let team-pair size naturally */
.team-pair {
    min-width: 140px !important;
    white-space: nowrap !important;
}

/* Fix link colors in team pairs */
.team-pair a.text-white {
    color: #fff !important;
}

.team-pair a.text-success {
    color: #198754 !important;
}

.team-pair a.text-white:hover {
    color: #e9ecef !important;
}

.team-pair a.text-success:hover {
    color: #157347 !important;
}

/*Navbar logo styling */
.navbar-logo {
    transition: opacity 0.3s ease;
}

.navbar-logo:hover {
    opacity: 0.8;
}

/* Chat link styling - dark orange regular font */
.chat-link {
    color: #fd7e14 !important; /* Dark orange color */
    text-decoration: underline !important;
    font-weight: normal !important;
    font-style: normal !important;
    text-shadow: none !important;
    background: none !important;
}

.chat-link:hover {
    color: #e96c0b !important; /* Slightly darker on hover */
    text-decoration: underline !important;
}
.competition-header {
    /* Removed padding and border that was creating the inner stroke effect */
}

.competition-info {
    text-align: center;
    margin-bottom: 1rem;
}

.competition-title {
    margin-bottom: 0.25rem;
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    letter-spacing: 0.5px;
}

/* Force perfect circle buttons */
.btn-circle,
.btn-icon.btn-circle {
    width: 42px !important;
    height: 42px !important;
    border-radius: 50% !important;
    padding: 0 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-width: 42px !important;
    max-width: 42px !important;
    min-height: 42px !important;
    max-height: 42px !important;
    overflow: visible !important;
    flex-shrink: 0 !important;
    flex-grow: 0 !important;
    box-sizing: border-box !important;
    aspect-ratio: 1 / 1 !important;
    line-height: 1 !important;
    vertical-align: middle !important;
    border-width: 2px !important;
    position: relative !important;
}

/* Prevent any parent flex containers from squashing the circle */
.d-flex .btn-circle,
.card-header .btn-circle,
.d-flex .btn-icon.btn-circle,
.card-header .btn-icon.btn-circle {
    flex-shrink: 0 !important;
    flex-grow: 0 !important;
    flex-basis: 42px !important;
}

.btn-circle i,
.btn-circle svg,
.btn-icon.btn-circle i,
.btn-icon.btn-circle svg {
    width: 18px !important;
    height: 18px !important;
    stroke-width: 2.5 !important;
    flex-shrink: 0 !important;
    display: block !important;
    position: relative !important;
}

/* ===== TIMER BUTTONS - DIRECT ID TARGETING WITH MAX SPECIFICITY ===== */
body #timer-toggle-main.btn.btn-outline-success.btn-circle.timer-toggle-btn,
body #timer-toggle-fullscreen.btn.btn-outline-success.btn-circle,
body #timer-toggle-tournament.btn.btn-outline-success.btn-circle.timer-toggle-btn,
body #reset-timer-main.btn.btn-outline-warning.btn-circle,
body #reset-timer-fullscreen.btn.btn-outline-warning.btn-circle,
body #reset-timer-tournament.btn.btn-outline-warning.btn-circle,
body #horn-button-main.btn.btn-outline-primary.btn-circle,
body #horn-button-fullscreen.btn.btn-outline-primary.btn-circle,
body #horn-button-tournament.btn.btn-outline-primary.btn-circle,
body #prev-round-main.btn.btn-outline-secondary.btn-circle,
body #next-round-main.btn.btn-outline-secondary.btn-circle {
    width: 48px !important;
    height: 48px !important;
    min-width: 48px !important;
    max-width: 48px !important;
    min-height: 48px !important;
    max-height: 48px !important;
    border-width: 2px !important;
    border-radius: 50% !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex-shrink: 0 !important;
    flex-grow: 0 !important;
    font-weight: 500 !important;
    background-color: transparent !important;
    box-sizing: border-box !important;
    padding: 0 !important;
    margin: 0 !important;
    line-height: 1 !important;
}

/* Timer button icons - direct targeting */
body #timer-toggle-main.btn i,
body #timer-toggle-fullscreen.btn i,
body #timer-toggle-tournament.btn i,
body #reset-timer-main.btn i,
body #reset-timer-fullscreen.btn i,
body #reset-timer-tournament.btn i,
body #horn-button-main.btn i,
body #horn-button-fullscreen.btn i,
body #horn-button-tournament.btn i,
body #prev-round-main.btn i,
body #next-round-main.btn i {
    width: 20px !important;
    height: 20px !important;
    stroke-width: 2.5 !important;
    flex-shrink: 0 !important;
    display: block !important;
    margin: 0 !important;
}

/* Play icon offset naar rechts voor betere optische centrering */
body #timer-toggle-main.btn i[data-feather="play"],
body #timer-toggle-fullscreen.btn i[data-feather="play"],
body #timer-toggle-tournament.btn i[data-feather="play"] {
    margin-left: 2px !important;
}

/* GREEN START/PAUSE BUTTONS */
body #timer-toggle-main.btn.btn-outline-success.timer-toggle-btn,
body #timer-toggle-fullscreen.btn.btn-outline-success,
body #timer-toggle-tournament.btn.btn-outline-success.timer-toggle-btn {
    border-color: #198754 !important;
    color: #198754 !important;
    border-width: 2px !important;
}

body #timer-toggle-main.btn.btn-outline-success.timer-toggle-btn:hover,
body #timer-toggle-fullscreen.btn.btn-outline-success:hover,
body #timer-toggle-tournament.btn.btn-outline-success.timer-toggle-btn:hover {
    background: #198754 !important;
    border-color: #198754 !important;
    color: white !important;
    border-width: 2px !important;
}

/* YELLOW RESET BUTTONS */
body #reset-timer-main.btn.btn-outline-warning,
body #reset-timer-fullscreen.btn.btn-outline-warning,
body #reset-timer-tournament.btn.btn-outline-warning {
    border-color: #ffc107 !important;
    color: #ffc107 !important;
    border-width: 2px !important;
}

body #reset-timer-main.btn.btn-outline-warning:hover,
body #reset-timer-fullscreen.btn.btn-outline-warning:hover,
body #reset-timer-tournament.btn.btn-outline-warning:hover {
    background: #ffc107 !important;
    border-color: #ffc107 !important;
    color: white !important;
    border-width: 2px !important;
}

/* BLUE HORN BUTTONS */
body #horn-button-main.btn.btn-outline-primary,
body #horn-button-fullscreen.btn.btn-outline-primary,
body #horn-button-tournament.btn.btn-outline-primary {
    border-color: #0d6efd !important;
    color: #0d6efd !important;
    border-width: 2px !important;
}

body #horn-button-main.btn.btn-outline-primary:hover,
body #horn-button-fullscreen.btn.btn-outline-primary:hover,
body #horn-button-tournament.btn.btn-outline-primary:hover {
    background: #0d6efd !important;
    border-color: #0d6efd !important;
    color: white !important;
    border-width: 2px !important;
}

/* Button text styling - smaller and lighter */
#timer-toggle-label,
#timer-toggle-label-tournament,
#timer-toggle-label-fullscreen,
.timer-controls .small.text-muted,
.timer-controls-fullscreen .text-white {
    font-size: 0.7rem !important;
    opacity: 0.7 !important;
    font-weight: 400 !important;
}

/* Specific styling for button labels under timer buttons */
.small.text-muted.mt-1,
.timer-button-label {
    font-size: 0.7rem !important;
    opacity: 0.6 !important; /* Lighter like Score button */
    font-weight: 400 !important;
    color: rgba(255, 255, 255, 0.6) !important; /* Lighter text */
}

/* Mobile-only larger timer display */
@media (max-width: 768px) {
    #timer-display-main,
    #timer-display {
        font-size: 3rem !important; /* Larger on mobile */
    }

    #fullscreen-timer-display {
        font-size: 6rem !important; /* Smaller on mobile to fit screen */
    }

    /* Make fullscreen timer background (radial blur) cover entire screen on mobile */
    .fullscreen-timer-bg {
        top: -100px !important;
        left: -100px !important;
        right: -100px !important;
        bottom: -100px !important;
        width: calc(100% + 200px) !important;
        height: calc(100% + 200px) !important;
        filter: blur(100px) !important;
    }
}

/* Extra specificity for availability forms to override any conflicting styles */
.availability-card .btn-icon.btn-circle,
.availability-card .btn.btn-icon.btn-circle {
    width: 42px !important;
    height: 42px !important;
    border-radius: 50% !important;
    border-width: 2px !important;
    padding: 0 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-width: 42px !important;
    max-width: 42px !important;
    min-height: 42px !important;
    max-height: 42px !important;
    flex-shrink: 0 !important;
    flex-grow: 0 !important;
    box-sizing: border-box !important;
}

/* Checkbox alignment - ensure labels align with center of checkbox */
.form-check {
    display: flex !important;
    align-items: center !important;
    margin-bottom: 0.5rem !important;
}

.form-check-input {
    margin-top: 0 !important;
    margin-right: 0.5rem !important;
    flex-shrink: 0 !important;
}

.form-check-label {
    margin-bottom: 0 !important;
    line-height: 1.2 !important;
    display: flex !important;
    align-items: center !important;
}

/* Time slot checkboxes in availability forms */
.time-slot-checkbox {
    display: flex !important;
    align-items: center !important;
    margin-bottom: 0.75rem !important;
}

.time-slot-checkbox input[type="checkbox"] {
    margin-top: 0 !important;
    margin-right: 0.5rem !important;
    flex-shrink: 0 !important;
}

.time-slot-checkbox label {
    margin-bottom: 0 !important;
    line-height: 1.2 !important;
    cursor: pointer !important;
}

/* Bootstrap form-check overrides for better alignment */
.form-check .form-check-input:not(:checked) ~ .form-check-label,
.form-check .form-check-input:checked ~ .form-check-label {
    padding-left: 0 !important;
}

/* General checkbox and label alignment throughout the app */
input[type="checkbox"] + label,
label[for*="checkbox"],
.checkbox-label {
    display: flex !important;
    align-items: center !important;
    margin-bottom: 0 !important;
    line-height: 1.2 !important;
}

/* Ensure all checkbox containers use flex alignment */
.form-check,
.checkbox-container,
.time-slot-checkbox {
    display: flex !important;
    align-items: center !important;
    gap: 0.5rem !important;
}

.left-section {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    margin-right: 1rem;
}

.left-section .btn {
    min-width: 85px;
    width: 85px;
}

.right-section {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: flex-end;
}

.right-section .btn,
.right-section form {
    margin: 0;
}

.right-section form {
    display: inline-flex;
}

.copy-icon {
    width: 14px;
    height: 14px;
}

.text-theme {
    color: var(--bs-primary) !important;
}

.bg-theme {
    background-color: var(--bs-primary) !important;
}

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

.btn-theme:hover {
    background-color: rgba(var(--bs-primary-rgb), 0.9) !important;
    border-color: rgba(var(--bs-primary-rgb), 0.9) !important;
}

/* Enhanced Statistics Table Styles */
.stats-table {
    width: 100%;
    margin-bottom: 1rem;
    color: var(--bs-body-color);
    border-collapse: separate;
    border-spacing: 0;
    border-radius: 0.5rem;
    overflow: hidden;
    background-color: var(--bs-body-bg);
}

.stats-table thead th {
    background-color: rgba(var(--bs-primary-rgb), 0.15);
    color: var(--bs-light);
    font-weight: 600;
    text-align: left;
    padding: 0.75rem;
    border: none;
    white-space: nowrap;
}

.stats-table tbody tr {
    background-color: transparent;
}

.stats-table tbody tr:hover {
    background-color: rgba(var(--bs-primary-rgb), 0.05);
}

.stats-table td {
    padding: 0.75rem;
    vertical-align: middle;
    border-top: 1px solid var(--bs-border-color);
}

.stats-table td:first-child {
    font-weight: 500;
}

.stats-table td:last-child {
    text-align: center;
    font-weight: 600;
    color: var(--bs-primary);
}

.stats-table-container {
    border-radius: 0.5rem;
    overflow: hidden;
    border: 1px solid var(--bs-border-color);
    margin-bottom: 1.5rem;
    background-color: var(--bs-body-bg);
}

/* Responsive table */
@media (max-width: 767.98px) {
    .stats-table-responsive {
        display: block;
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .stats-table-responsive .stats-table {
        width: 100%;
        margin-bottom: 0;
    }

    .stats-mobile-card {
        background-color: var(--bs-body-bg);
        border-radius: 0.5rem;
        border: 1px solid var(--bs-border-color);
        overflow: hidden;
        margin-bottom: 1.5rem;
    }

    .stats-mobile-card-header {
        background-color: rgba(var(--bs-primary-rgb), 0.15);
        color: var(--bs-light);
        padding: 0.75rem;
        font-weight: 600;
        text-align: left;
    }

    .stats-mobile-card-body {
        padding: 0.75rem;
    }

    .stats-mobile-row {
        display: flex;
        justify-content: space-between;
        align-items: center;
        gap: 15px;
        padding: 0.75rem 0;
        border-bottom: 1px solid var(--bs-border-color);
    }

    .stats-mobile-row:hover {
        background-color: rgba(var(--bs-primary-rgb), 0.05);
    }

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

    .stats-mobile-label {
        font-weight: 500;
        color: var(--bs-body-color);
        width: 60%;
    }

    .stats-mobile-value {
        font-weight: 600;
        color: var(--bs-primary);
        text-align: right;
        width: 40%;
    }

    .stats-mobile-value.positive {
        color: #28a745;
    }

    .stats-mobile-value.negative {
        color: #dc3545;
    }
}

.tournament-actions {
    display: flex;
    flex-direction: column;
    align-items: flex-end; /* Align items to the end (right) */
}

.competition-header .card-body {
    display: flex;
    flex-direction: column;
    align-items: stretch; /* Changed from flex-end to stretch */
}

/* Card and Container Styles */
.card:not(.folder-card-inner) {
    background-color: var(--bs-dark);
    border: 1px solid var(--bs-border-color);
    border-radius: 0.5rem;
    overflow: hidden; /* Fix border radius issue */
}

.card-header {
    background-color: rgba(var(--bs-primary-rgb), 0.15);
    border-bottom: 1px solid var(--bs-border-color);
    font-weight: 500;
    color: var(--bs-light);
}

.card-header .h5,
.card-header h5,
.card-header .card-title {
    font-weight: 700;
    margin-bottom: 0;
    color: var(--bs-light);
}

.card-body {
    background-color: var(--bs-dark);
}

.edit-profile-btn {
    position: absolute;
    bottom: 5px;
    right: 5px;
    padding: 3px 10px;
    font-size: 0.8rem;
    border-radius: 4px;
}

/* Tab Navigation Styles */
.nav-tabs {
    border-bottom-color: var(--bs-border-color);
}

.nav-tabs .nav-link {
    color: var(--bs-body-color);
    border-color: transparent;
    font-weight: 500;
    border-radius: 0.375rem 0.375rem 0 0;
}

.nav-tabs .nav-link:hover {
    color: var(--bs-primary);
    background-color: rgba(var(--bs-primary-rgb), 0.05);
}

.nav-tabs .nav-link.active {
    color: var(--bs-primary);
    background-color: var(--bs-dark);
    border-color: var(--bs-border-color);
    border-bottom-color: var(--bs-dark);
}

/* Table Styles */
.table {
    color: var(--bs-body-color);
    background-color: var(--bs-dark);
}

.table th,
.table td {
    border-color: var(--bs-border-color);
}

/* Matches Container Styles */
.matches-container {
    background-color: var(--bs-dark);
    border: 1px solid var(--bs-border-color);
    border-radius: 0.5rem;
    padding: 1rem;
    margin-bottom: 1rem;
    overflow: hidden; /* Fix border radius issue */
}

/* Import fonts */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@700&display=swap');

/* All Chats Page Styles */
.competition-title-link.text-white {
    color: #ffffff !important;
}

/* Score Recording Modal Styles */
.modal .table {
    margin-bottom: 0;
    color: var(--bs-body-color);
    background-color: var(--bs-dark);
    border-color: var(--bs-border-color);
}

.modal .table th {
    background-color: rgba(var(--bs-primary-rgb), 0.15);
    color: var(--bs-light);
    font-weight: 500;
    border-bottom: 2px solid var(--bs-border-color);
    padding: 0.75rem;
}

.modal .table td {
    vertical-align: middle;
    padding: 0.75rem;
    border-color: var(--bs-border-color);
}

.modal .table input.form-control {
    background-color: var(--bs-dark);
    border-color: var(--bs-border-color);
    color: var(--bs-light);
    text-align: center;
    padding: 0.375rem;
    height: 32px;
}

.modal .table input.form-control:focus {
    background-color: var(--bs-dark);
    border-color: var(--bs-primary);
    color: var(--bs-light);
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

.modal .table input.form-control::-webkit-inner-spin-button,
.modal .table input.form-control::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.modal .table input.form-control[type=number] {
    -moz-appearance: textfield;
}

/* Team name cell styling */
.modal .table .team1-name,
.modal .table .team2-name {
    font-weight: 500;
    color: var(--bs-light);
}

/* Table responsive wrapper */
.table-responsive {
    background-color: var(--bs-dark);
    border-radius: 0.375rem;
    border: 1px solid var(--bs-border-color);
}

/* Statistics table specific styles */
.modal .table#playerStatsTable th {
    font-size: 0.875rem;
}

.modal .table .player-name {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 200px;
}

/* Mobile Navigation Bar Styles */
.mobile-navbar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 80px; /* Increased height */
    padding-bottom: 15px; /* Extra padding for iPhone swipe bar */
    background-color: var(--bs-dark);
    display: flex;
    justify-content: space-around;
    align-items: center;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    border-top: 1px solid var(--bs-border-color);
}

.mobile-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--bs-secondary);
    text-decoration: none;
    padding: 8px 0;
    transition: color 0.2s;
    width: 25%;
}

.mobile-nav-item span {
    font-size: 0.7rem;
    margin-top: 4px;
}

.mobile-nav-item.active {
    color: var(--bs-primary);
}

.mobile-nav-item:hover {
    color: var(--bs-primary);
}

.mobile-nav-item svg {
    width: 20px;
    height: 20px;
    stroke-width: 2;
}

/* Add padding to body and main container to prevent content from being hidden behind the mobile navbar */
@media (max-width: 767.98px) {
    body {
        padding-bottom: 90px !important; /* Extra space so content doesn't hide behind bottom nav */
    }

    .container.mt-2.pt-2 {
        margin-bottom: 90px !important; /* Extra margin for main container */
        padding-bottom: 90px !important; /* Extra padding for main container */
    }
}

/* Competition Card Styles */
.competition-card {
    transition: transform 0.2s, box-shadow 0.2s;
    border: 1px solid var(--bs-border-color);
}

.competition-card .card-title {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.3;
    max-height: 2.6em;
}

.competition-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

/* Create Competition Card Styles */
.create-competition-card {
    transition: transform 0.2s, box-shadow 0.2s;
    border: 1px dashed var(--bs-primary);
    background-color: rgba(var(--bs-primary-rgb), 0.05);
    height: calc(100% + 10px);
}

.create-competition-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
    background-color: rgba(var(--bs-primary-rgb), 0.1);
}

.create-competition-card i,
.create-competition-card .plus-icon {
    color: var(--bs-primary) !important;
    stroke: var(--bs-primary) !important;
}

.delete-btn {
    z-index: 10;
}

/* Admin Sidebar Styling */
.sidebar {
    background-color: var(--bs-dark);
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    border-right: 1px solid var(--bs-border-color);
}

.sidebar .nav-link {
    color: var(--bs-light);
    border-radius: 5px;
    margin: 0 10px;
    padding: 10px 15px;
    transition: all 0.3s ease;
}

.sidebar .nav-link:hover {
    background-color: rgba(var(--bs-primary-rgb), 0.1);
    color: var(--bs-primary);
}

.sidebar .nav-link.active {
    background-color: rgba(var(--bs-primary-rgb), 0.15);
    color: var(--bs-primary);
    font-weight: 500;
}

@media (max-width: 767.98px) {
    .tournament-container {
        padding: 0 !important;
    }

    .tournament-info-card {
        margin-bottom: 0.5rem !important;
    }

    .leaderboard-container {
        padding: 0 !important;
        margin-bottom: 0 !important;
    }

    .leaderboard-container .card {
        border: 0 !important;
        border-radius: 0 !important;
        margin-bottom: 0 !important;
    }

    .leaderboard-container .card-body {
        padding: 0 !important;
    }

    .leaderboard-container .table {
        margin-bottom: 0 !important;
    }

    .tab-pane.fade:not(.show) {
        display: none;
    }

    .tournament-container .card-body {
        padding: 0.5rem !important;
    }

    .tournament-container .card-header {
        padding: 0.5rem !important;
    }

    .tab-content > .tab-pane {
        padding: 0 !important;
    }

    .tab-content .card {
        margin-bottom: 0.5rem !important;
    }
}

.sidebar .icon-container {
    width: 30px;
    height: 30px;
    color: var(--bs-primary);
}

.sidebar-heading {
    border-bottom: 1px solid var(--bs-border-color);
    padding-bottom: 10px;
}

/* Admin Dashboard Stats Cards */
.admin-stat-card {
    height: 100%;
    min-height: 230px; /* Set a minimum height for all cards */
    transition: all 0.3s ease;
    border: none;
}

.admin-stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.admin-stat-card .card-body {
    padding: 1.5rem;
    height: 100%;
}

.admin-stat-card .stat-icon {
    width: 70px;
    height: 70px;
    margin-bottom: 1rem;
}

.admin-stat-card .display-4 {
    font-size: 2.5rem;
    font-weight: 600;
    margin: 0.5rem 0;
}

/* Tournament button consistency */
.tournament-btn {
    min-width: 160px;  /* Increased standard width for all tournament buttons */
    width: 160px;  /* Fixed width for all tournament buttons */
    font-size: 0.875rem;
    padding: 0.375rem 0.75rem;
    display: inline-block;
    text-align: center;
    margin: 0.25rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    height: 38px;
    line-height: 24px;
    vertical-align: middle;
    box-sizing: border-box;
}

/* Circle buttons for consistent round shape */
.btn-circle {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    padding: 6px 0;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
}

.right-section {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: flex-end;
    align-items: center;
}

.right-section .btn,
.right-section form {
    margin: 0;
}

.right-section .btn {
    min-width: 85px;
    width: 85px;
}

@media (max-width: 767.98px) {
    .tournament-btn,
    .btn-toolbar form .btn,
    .btn-toolbar a.btn {
        width: 100%;
        margin-bottom: 0.5rem;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }

    .btn-toolbar {
        flex-direction: column;
        width: 100%;
    }

    .btn-toolbar form {
        width: 100%;
    }
}

/* Flash Messages */
.flash-messages-container {
    padding-top: 0.75rem;
    margin-bottom: 1rem;
    position: relative;
    z-index: 100;
}

.alert {
    padding: 0.75rem;
    border-radius: 0.375rem;
    margin-bottom: 0.75rem;
    font-weight: 500;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    border-left: 5px solid transparent;
}

.alert-success {
    background-color: rgba(40, 167, 69, 0.15);
    color: #28a745;
    border-left-color: #28a745;
}

.alert-info {
    background-color: rgba(13, 202, 240, 0.15);
    color: #0dcaf0;
    border-left-color: #0dcaf0;
}

.alert-warning {
    background-color: rgba(255, 193, 7, 0.15);
    color: #ffc107;
    border-left-color: #ffc107;
}

.alert-danger {
    background-color: transparent;
    color: #dc3545;
    border: none;
}

/* Match actions grid for even button spacing */
.match-actions-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    width: 100%;
    margin-bottom: 12px;
}

.match-actions-grid > * {
    flex: 1 1 calc(50% - 6px);
    min-width: 140px;
}

/* Three-column grid for matches that need confirmation */
.match-actions-grid-3 > * {
    flex: 1 1 calc(33.333% - 8px);
    min-width: 120px;
}

/* Button styling to ensure they never fall off */
.button-match-action {
    width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 38px; /* Ensure all buttons are the same height */
    color: var(--bs-primary);
    border-color: var(--bs-primary);
    background-color: transparent;
}

/* Ensure consistent style for both button and a tags used as buttons */
a.button-match-action {
    text-decoration: none;
    color: var(--bs-primary);
    border: 1px solid var(--bs-primary);
    border-radius: 0.25rem;
}

/* Uniform hover state for all match action buttons */
.button-match-action:hover,
.button-match-action:focus {
    color: #ffffff;
    background-color: var(--bs-primary);
    border-color: #ffffff;
}

/* Maintain green styling for Confirm Score button */
.btn-success.button-match-action {
    background-color: #1e5631;
    border-color: #1e5631;
    color: white;
}

.btn-success.button-match-action:hover,
.btn-success.button-match-action:focus {
    background-color: #184628;
    border-color: #ffffff;
    color: white;
}

/* Player statistics styling */
.player-stats-section {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 15px;
    width: 100%;
}

.player-stats-table {
    margin-bottom: 0;
}

.player-stats-table th:first-child,
.player-stats-table td:first-child,
table.player-stats-table th:first-child,
table.player-stats-table td:first-child,
.table.player-stats-table th:first-child,
.table.player-stats-table td:first-child {
    width: 70% !important;
    min-width: 150px !important;
    max-width: 70% !important;
}

.player-stats-table th:not(:first-child),
.player-stats-table td:not(:first-child),
table.player-stats-table th:not(:first-child),
table.player-stats-table td:not(:first-child),
.table.player-stats-table th:not(:first-child),
.table.player-stats-table td:not(:first-child) {
    width: 15% !important;
    min-width: 50px !important;
    max-width: 15% !important;
    text-align: center !important;
}

/* Stats grid for the modal */
.stats-grid {
    display: grid;
    grid-template-columns: 70% 15% 15% !important;
    width: 100%;
}

/* Add styling for statistic inputs in score modal */
.stat-input {
    width: 100% !important;
    min-width: 40px !important;
    text-align: center !important;
}

.player-row {
    display: contents;
}

.player-row > div {
    padding: 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.player-row.header > div {
    font-weight: 600;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.player-row > div:first-child {
    text-align: left;
    width: 70% !important;
    min-width: 150px !important;
    max-width: 70% !important;
}

.player-row > div:not(:first-child) {
    text-align: center;
    width: 15% !important;
    min-width: 50px !important;
    max-width: 15% !important;
}

.table-stats {
    margin-bottom: 0;
    background-color: rgba(33, 37, 41, 0.6);
    font-size: 0.85rem;
}

.table-stats th,
.table-stats td {
    padding: 0.4rem 0.75rem;
    text-align: center;
}

.table-stats th:first-child,
.table-stats td:first-child {
    text-align: left;
}

.table-stats thead th {
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    font-weight: 600;
}

.table-stats td {
    border-color: rgba(255, 255, 255, 0.1);
}

/* Common styles for both availability containers */
.common-availability-container, .no-match-availability-container {
    padding: 12px 16px;
    border-radius: 6px;
    margin-bottom: 12px;
    width: 100%;
    max-width: 100%;
}

/* Green styles for matching availability */
.common-availability-container {
    border-left: 4px solid #1e5631;
    background-color: rgba(42, 83, 57, 0.15);
}

/* Red styles for no matching availability */
.no-match-availability-container {
    border-left: 4px solid #8B0000;
    background-color: rgba(139, 0, 0, 0.15);
}

.no-match-message {
    color: #ffffff;
    margin-bottom: 0;
    font-size: 0.9rem;
}

.availability-header {
    font-size: 1rem;
    font-weight: 500;
    color: #ffffff;
}
.availability-icon {
    font-style: normal;
    margin-right: 8px;
}
.match-count {
    font-size: 0.85rem;
    color: #ffffff;
    background-color: rgba(42, 83, 57, 0.1);
    padding: 3px 10px;
    border-radius: 12px;
}
.time-slots-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 8px;
}
.time-slot-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 10px;
    background-color: rgba(255, 255, 255, 0.7);
    border-radius: 4px;
}
.time-slot-date {
    font-size: 0.9rem;
    font-weight: 500;
    color: #2a3f2b;
}
.time-slot-time {
    font-size: 0.85rem;
    color: #3c5a42;
    font-weight: 500;
}

/* This class is now defined above */

/* Clickable competition title link in all chats page */
.competition-title-link {
    color: inherit;
    text-decoration: none;
    position: relative;
}

.competition-title-link:hover {
    color: var(--bs-primary);
}

.competition-title-link:hover::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--bs-primary);
}

/* Hide scrollbars on mobile for native app feel */
@media (max-width: 768px) {
    body::-webkit-scrollbar,
    *::-webkit-scrollbar {
        display: none !important;
        width: 0 !important;
        height: 0 !important;
        background: transparent !important;
    }

    body,
    * {
        -ms-overflow-style: none !important;
        scrollbar-width: none !important;
    }
}

/* Mobile Optimizations for Profile Page */
@media (max-width: 767.98px) {
    .profile-image-container {
        width: 80px !important;
        height: 80px !important;
    }

    .avatar-preview {
        width: 80px !important;
        height: 80px !important;
        font-size: 30px !important;
    }

    .username-display {
        font-size: 1.5rem !important;
        margin-bottom: 0.25rem !important;
        line-height: 1.2 !important;
    }

    .full-name-display {
        font-size: 1rem !important;
        line-height: 1.2 !important;
    }

    .card-body {
        padding: 1rem !important;
    }

    .stats-card {
        padding: 0.75rem !important;
    }

    .stats-card h4 {
        font-size: 0.9rem !important;
        margin-bottom: 0.5rem !important;
    }

    .stats-card-title {
        font-weight: 600;
        margin-bottom: 10px;
    }

    .stats-card-content {
        display: flex;
        flex-direction: column;
        gap: 8px;
    }

    .stats-card-row {
        display: flex;
        justify-content: space-between;
        align-items: center;
        min-height: 32px; /* Ensures consistent height */
        width: 100%; /* Ensure the row takes full width */
    }

    .stats-card-name {
        font-size: 0.95rem;
        flex: 1;
        display: flex;
        align-items: center;
        min-height: 26px; /* Ensures consistent height */
        justify-content: flex-start; /* Align text to the left */
        text-align: left;
        padding-right: 10px; /* Add spacing between name and value */
    }

    .stats-card-value {
        font-size: 1.2rem;
        font-weight: 700;
        text-align: right;
        display: flex;
        align-items: center;
        justify-content: flex-end;
        min-height: 26px; /* Ensures consistent height */
    }

    .rating-number {
        font-size: 1.5rem !important;
    }

    .card-title {
        font-size: 1.25rem !important;
        margin-top: 0.5rem !important;
        margin-bottom: 0.75rem !important;
    }

    .row.g-4 {
        --bs-gutter-y: 0.5rem !important;
    }

    .smash-stat-row {
        padding: 0.1rem 0 !important;
    }

    .stat-label {
        font-size: 0.8rem !important;
    }

    .stat-value {
        font-size: 0.9rem !important;
    }

    .small-text {
        font-size: 0.7rem !important;
    }
}
/* Date input styling */
input[type="date"] {
    position: relative;
}

input[type="date"]:before {
    content: attr(placeholder);
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bs-dark);
    color: #6c757d;
    display: flex;
    align-items: center;
    padding-left: 12px;
    pointer-events: none;
}

input[type="date"]:focus:before,
input[type="date"]:valid:before {
    display: none;
}

/* Mobile stats value styling */
.stats-mobile-value {
    font-weight: 700;
    text-align: right;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 10px; /* Ensure consistent spacing between name and value */
}

.player-name {
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    display: flex;
    align-items: center;
    justify-content: flex-start; /* Align text to the left */
    text-align: left;
    min-height: 24px; /* Ensures consistent height */
}

@media (min-width: 576px) {
    .player-name {
        max-width: 150px;
    }
}

/* Leaderboard specific styling */
.name-col {
    text-align: left !important;
    justify-content: flex-start !important;
}

.sticky-col {
    position: sticky;
    background-color: var(--bs-dark);
    z-index: 1;
}

.rank-col {
    left: 0;
    width: 50px;
}

.name-col {
    left: 50px;
    min-width: 120px;
    max-width: 200px;
}
/* Include player badge fix */
@import url("player-badges-fix.css");

/* Modern Button Styling - Applied to all buttons across the app */
.btn,
.homepage-button,
.btn-primary,
.btn-secondary,
.btn-success,
.btn-warning,
.btn-danger,
.btn-info,
.btn-light,
.btn-dark,
.btn-outline-primary,
.btn-outline-secondary,
.btn-outline-success,
.btn-outline-warning,
.btn-outline-danger,
.btn-outline-info,
.btn-outline-light,
.btn-outline-dark {
    min-height: 40px !important;
    font-size: 0.95rem !important;
    font-weight: 500 !important;
    padding: 0.6rem 1.2rem !important;
    border-radius: 0.5rem !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    text-decoration: none !important;
    border-width: 2px !important;
    transition: all 0.3s ease !important;
    position: relative !important;
    overflow: hidden !important;
}

/* Hover effects for all buttons */
.btn:hover,
.homepage-button:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3) !important;
}

/* Disable button transform on mobile devices to prevent scroll issues */
@media (hover: none) and (pointer: coarse) {
    .btn:hover,
    .homepage-button:hover,
    .card:hover,
    .match-card:hover,
    .competition-card:hover,
    .create-competition-card:hover,
    .btn-primary:hover,
    .btn-secondary:hover,
    .btn-success:hover,
    .btn-warning:hover,
    .btn-danger:hover,
    .btn-outline-primary:hover,
    .btn-outline-secondary:hover,
    .admin-stat-card .btn:hover {
        transform: translateY(0) !important;
    }
}

/* Primary button styling */
.btn-primary {
    background-color: var(--bs-primary) !important;
    border-color: var(--bs-primary) !important;
    color: #ffffff !important;
}

.btn-primary:hover {
    background-color: rgba(var(--bs-primary-rgb), 0.9) !important;
    border-color: var(--bs-primary) !important;
    box-shadow: 0 4px 12px rgba(var(--bs-primary-rgb), 0.4) !important;
}

/* Outline primary styling */
.btn-outline-primary {
    background-color: transparent !important;
    border-color: var(--bs-primary) !important;
    color: var(--bs-primary) !important;
}

.btn-outline-primary:hover {
    background-color: var(--bs-primary) !important;
    border-color: var(--bs-primary) !important;
    color: #ffffff !important;
    box-shadow: 0 4px 12px rgba(var(--bs-primary-rgb), 0.4) !important;
}

/* Success button styling */
.btn-success {
    background-color: #1e5631 !important;
    border-color: #1e5631 !important;
    color: #ffffff !important;
}

.btn-success:hover {
    background-color: #184628 !important;
    border-color: #184628 !important;
    box-shadow: 0 4px 12px rgba(30, 86, 49, 0.4) !important;
}

/* Danger button styling */
.btn-danger {
    background-color: #8B0000 !important;
    border-color: #8B0000 !important;
    color: #ffffff !important;
}

.btn-danger:hover {
    background-color: #7a0000 !important;
    border-color: #7a0000 !important;
    box-shadow: 0 4px 12px rgba(139, 0, 0, 0.4) !important;
}

/* Warning button styling */
.btn-warning {
    background-color: #a14a00 !important;
    border-color: #a14a00 !important;
    color: #ffffff !important;
}

.btn-warning:hover {
    background-color: #8b3f00 !important;
    border-color: #8b3f00 !important;
    box-shadow: 0 4px 12px rgba(161, 74, 0, 0.4) !important;
}

/* Secondary button styling */
.btn-secondary {
    background-color: #6c757d !important;
    border-color: #6c757d !important;
    color: #ffffff !important;
}

.btn-secondary:hover {
    background-color: #5a6268 !important;
    border-color: #5a6268 !important;
    box-shadow: 0 4px 12px rgba(108, 117, 125, 0.4) !important;
}

/* Homepage specific buttons keep their fixed size */
.homepage-button {
    min-width: 150px !important;
    width: 150px !important;
    height: 45px !important;
    color: #ffffff !important;
}

/* Make sure login button text is always white */
.homepage-button.btn-outline-primary {
    color: var(--bs-primary) !important;
}

.homepage-button.btn-outline-primary:hover {
    color: #ffffff !important;
}

/* Login button styling - only for login button */
a.btn.homepage-button:not(.btn-outline-primary) {
    background: var(--bs-primary) !important;
    border: none !important;
    color: white !important;
    transition: all 0.2s ease !important;
    text-decoration: none !important;
}

a.btn.homepage-button:not(.btn-outline-primary):hover,
a.btn.homepage-button:not(.btn-outline-primary):focus {
    background: var(--bs-primary) !important;
    opacity: 0.85 !important;
    border: none !important;
    color: white !important;
    text-decoration: none !important;
}

/* Round plus button for availability form */
.btn-plus-circle {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: transparent;
    border: 2px solid var(--bs-primary);
    color: var(--bs-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.btn-plus-circle span {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    transform: translateY(-2px);
}

.btn-plus-circle:hover {
    background: var(--bs-primary);
    color: white;
    border-color: var(--bs-primary);
}

.btn-plus-circle:active {
    transform: scale(0.95);
}

/* Propose button styling with medium border like circle button */
.btn-propose {
    background: transparent !important;
    border: 2px solid var(--bs-primary) !important;
    color: var(--bs-primary) !important;
    font-weight: 500 !important;
    padding: 0.5rem 1.5rem !important;
    border-radius: 0.75rem !important;
    transition: all 0.2s ease !important;
    height: 48px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

/* More specific selector to override Bootstrap defaults */
#submitBtn.btn.btn-propose {
    border-radius: 0.75rem !important;
    border: 2px solid var(--bs-primary) !important;
}

/* Even more specific selectors for propose buttons in forms */
form .btn-propose,
.availability-form .btn-propose,
button.btn-propose {
    border: 2px solid var(--bs-primary) !important;
}

.btn-propose:hover {
    background: var(--bs-primary) !important;
    color: white !important;
    border-color: var(--bs-primary) !important;
}

.btn-propose:disabled {
    opacity: 0.6 !important;
    cursor: not-allowed !important;
}

.btn-propose:disabled:hover {
    background: transparent !important;
    color: var(--bs-primary) !important;
}

/* Private Link label styling */
.private-link-label {
    color: #ffffff !important;
    font-weight: 500 !important;
    font-size: 0.875rem !important;
}

/* Modal backdrop styling - darker backdrop for both join and reschedule modals */
#joinCompetitionModal .modal-backdrop,
#rescheduleMatchModal .modal-backdrop {
    background-color: rgba(0, 0, 0, 0.6) !important;
}

/* Alternative approach for darker modal backdrop */
.modal-backdrop.show {
    opacity: 0.6 !important;
    background-color: #000000 !important;
}

/* Compact score modal styling */
.score-modal .score-row {
    margin-bottom: 0.3rem !important; /* Reduced from default margin */
}

.score-modal .player-row {
    margin-bottom: 0.3rem !important; /* Reduced from default margin */
    display: flex !important;
    align-items: center !important;
    gap: 0.5rem !important;
}

.score-modal .score-input,
.score-modal .stat-input {
    height: 32px !important; /* Smaller input height */
    padding: 0.25rem 0.4rem !important; /* Reduced padding */
    width: 60px !important; /* Fixed narrow width for score inputs */
}

.score-modal .score-section {
    margin-bottom: 1.5rem !important; /* Reduced section spacing */
}

.score-modal .stats-section h6 {
    margin-bottom: 1rem !important; /* Reduced header margin */
}

/* Score grid styling - make more compact horizontally */
.score-modal .score-grid {
    display: table !important;
    width: 100% !important;
    border-spacing: 0.3rem !important;
}

.score-modal .score-row {
    display: table-row !important;
}

.score-modal .score-cell {
    display: table-cell !important;
    vertical-align: middle !important;
    padding: 0.3rem 0.2rem !important;
}

.score-modal .score-cell:first-child {
    width: 40% !important; /* Team names get more space */
    min-width: 120px !important;
}

.score-modal .score-cell input {
    width: 50px !important; /* Narrow score inputs */
    margin: 0 auto !important;
    display: block !important;
}

/* Stats grid - BOC and BOCR on same line */
.score-modal .stats-grid {
    display: table !important;
    width: 100% !important;
    border-spacing: 0.3rem !important;
}

.score-modal .player-row {
    display: table-row !important;
    margin-bottom: 0.3rem !important;
}

.score-modal .player-row > div {
    display: table-cell !important;
    vertical-align: middle !important;
    padding: 0.3rem 0.2rem !important;
}

.score-modal .player-row > div:first-child {
    width: 50% !important; /* Player name gets more space */
    min-width: 100px !important;
}

.score-modal .player-row > div input {
    width: 50px !important; /* Narrow BOC/BOCR inputs */
}

/* Score modal header styling - match all chats styling */
.score-modal .card-header {
    background-color: var(--bs-gray-800) !important; /* Lighter than bg-dark */
    border-bottom: 1px solid var(--bs-gray-600) !important;
}

.homepage-button.btn-primary {
    color: #ffffff !important;
}

/* Small buttons for specific contexts */
.btn-sm {
    min-height: 32px !important;
    font-size: 0.85rem !important;
    padding: 0.4rem 0.8rem !important;
}

/* Consistent player name badge sizing - ALL badges identical */
.player-list .badge,
.badge.player-yes,
.badge.player-no,
.badge.player-maybe,
.badge.badge-success,
.badge.badge-warning,
.badge.badge-danger,
.badge.text-bg-success,
.badge.text-bg-warning,
.badge.text-bg-danger,
.time-slot-bar .badge,
.availability-card .badge {
    font-size: 0.75rem !important;
    font-weight: 500 !important;
    font-family: inherit !important;
    padding: 0.25rem 0.4rem !important;
    min-height: 20px !important;
    line-height: 1.1 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    white-space: nowrap !important;
    border-radius: 0.25rem !important;
    text-align: center !important;
    vertical-align: middle !important;
}

/* Badge colors EXACT match with buttons */
.badge.player-yes,
.badge.text-bg-success,
.badge.badge-success {
    background-color: #1a5928 !important;
    border-color: #1a5928 !important;
    color: white !important;
}

.badge.player-maybe,
.badge.text-bg-warning,
.badge.badge-warning {
    background-color: #c55e02 !important;
    border-color: #c55e02 !important;
    color: white !important;
}

.badge.player-no,
.badge.text-bg-danger,
.badge.badge-danger {
    background-color: #5c0000 !important;
    border-color: #5c0000 !important;
    color: white !important;
}

/* Push Notification Button Styling - matches availability planner badge colors */
.push-notification-btn {
    background-color: #5c0000 !important; /* Dark red - needs permission */
    border-color: #5c0000 !important;
    color: white !important;
    border-radius: 50% !important;
    width: 32px !important;
    height: 32px !important;
    padding: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.push-notification-btn:hover {
    background-color: #6e0000 !important; /* Slightly lighter red on hover */
    border-color: #6e0000 !important;
    color: white !important;
}

.push-notification-btn-success {
    background-color: #1a5928 !important; /* Dark green - permission granted */
    border-color: #1a5928 !important;
    color: white !important;
    border-radius: 50% !important;
    width: 32px !important;
    height: 32px !important;
    padding: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.push-notification-btn-error {
    background-color: #800000 !important; /* Darker red - error */
    border-color: #800000 !important;
    color: white !important;
    border-radius: 50% !important;
    width: 32px !important;
    height: 32px !important;
    padding: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.push-notification-btn-disabled {
    background-color: #666666 !important; /* Grey - disabled */
    border-color: #666666 !important;
    color: #cccccc !important;
    border-radius: 50% !important;
    width: 32px !important;
    height: 32px !important;
    padding: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: not-allowed !important;
}

/* Override any bootstrap badge variations in availability context */
.availability-card .badge-success,
.availability-card .badge-warning,
.availability-card .badge-danger,
.availability-card .text-bg-success,
.availability-card .text-bg-warning,
.availability-card .text-bg-danger,
.time-slot-bar .badge-success,
.time-slot-bar .badge-warning,
.time-slot-bar .badge-danger,
.time-slot-bar .text-bg-success,
.time-slot-bar .text-bg-warning,
.time-slot-bar .text-bg-danger {
    font-size: 0.75rem !important;
    font-weight: 500 !important;
    font-family: inherit !important;
    padding: 0.25rem 0.4rem !important;
    min-height: 20px !important;
    line-height: 1.1 !important;
}

/* Large buttons for primary actions */
.btn-lg {
    min-height: 50px !important;
    font-size: 1.1rem !important;
    padding: 0.8rem 1.5rem !important;
}

/* Exceptions: Keep specific functionality buttons intact */
.availability-card .btn,
.availability-card .response-btn,
.response-buttons .btn {
    /* Keep original availability button styling */
    transform: none !important;
    box-shadow: none !important;
    border-radius: 0.25rem !important;
    min-height: auto !important;
    padding: 0.375rem 0.75rem !important;
    border-width: 1px !important;
}

.availability-card .btn:hover,
.availability-card .response-btn:hover,
.response-buttons .btn:hover {
    transform: none !important;
    box-shadow: none !important;
}

/* Circle buttons keep their original styling */
.btn-circle {
    border-radius: 50% !important;
    padding: 6px 0 !important;
    min-height: 36px !important;
    width: 36px !important;
    height: 36px !important;
}

/* Mobile navigation buttons keep their styling */
.mobile-nav-item {
    transform: none !important;
    box-shadow: none !important;
}

/* Keep admin button styling simple */
.admin-stat-card .btn {
    transform: none !important;
}

.admin-stat-card .btn:hover {
    transform: translateY(-2px) !important;
}

/* Compact leaderboard action buttons (replace/remove) */
.leaderboard-table .btn,
.leaderboard .btn,
table .btn-sm,
.btn-replace,
.btn-remove {
    min-height: 22px !important;
    font-size: 0.7rem !important;
    padding: 0.15rem 0.3rem !important;
    line-height: 1.1 !important;
    border-width: 1px !important;
}

/* Specific styling for replace and remove buttons in tables */
.table .btn-sm {
    min-height: 20px !important;
    padding: 0.1rem 0.25rem !important;
    font-size: 0.65rem !important;
}

/* Extra compact styling for leaderboard buttons specifically */
.redesigned-leaderboard .btn-sm,
.leaderboard-container .btn-sm,
td .btn-sm {
    min-height: 18px !important;
    max-height: 18px !important;
    padding: 0.05rem 0.2rem !important;
    font-size: 0.6rem !important;
    line-height: 1 !important;
    border-radius: 0.2rem !important;
    transform: none !important;
    box-shadow: none !important;
}

/* Make sure leaderboard table rows have consistent height */
.redesigned-leaderboard tr,
.leaderboard-container tr,
.table tr {
    height: auto !important;
    line-height: 1.2 !important;
}

.redesigned-leaderboard td,
.leaderboard-container td,
.table td {
    padding: 0.3rem 0.5rem !important;
    vertical-align: middle !important;
}

/* Upcoming match date/venue styling improvements */
.upcoming-badge {
    height: 22px !important;
    line-height: 1.2 !important;
    font-size: 0.8rem !important;
    padding: 0.25rem 0.5rem !important;
    display: inline-flex !important;
    align-items: center !important;
}

.rounds-badge {
    height: 22px !important;
    line-height: 1.2 !important;
    font-size: 0.8rem !important;
    padding: 0.25rem 0.5rem !important;
    display: inline-flex !important;
    align-items: center !important;
    background-color: transparent !important;
    background-image: none !important;
    background: transparent !important;
}

/* Round badge stroke colors - MUST be defined here as custom.css loads last */
.rounds-badge--completed,
.badge.rounds-badge--completed,
body .rounds-badge--completed {
    border: 2px solid #28a745 !important;
    border-color: #28a745 !important;
    color: #ffffff !important;
}

.rounds-badge--upcoming,
.badge.rounds-badge--upcoming,
body .rounds-badge--upcoming {
    border: 2px solid #c55e02 !important;
    border-color: #c55e02 !important;
    color: #ffffff !important;
}

.rounds-badge--validating,
.badge.rounds-badge--validating,
body .rounds-badge--validating {
    border: 2px solid #6c757d !important;
    border-color: #6c757d !important;
    color: #ffffff !important;
}

.venue-info-compact {
    margin-top: 0.05rem !important;
    line-height: 1.1 !important;
}

.completed-badge {
    height: 22px !important;
    line-height: 1.2 !important;
    font-size: 0.8rem !important;
    padding: 0.25rem 0.5rem !important;
    display: inline-flex !important;
    align-items: center !important;
    background-color: #155724 !important;
    border: 1px solid #155724 !important;
    color: white !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3) !important;
}

/* Tournament badges force override - more specific selectors - EXCLUDE completed-badge */
.badge.bg-success:not(.completed-badge),
.badge[style*="background-color: #1a5928"],
.accordion-button .badge.bg-success:not(.completed-badge),
.completed-round .badge,
body .badge.bg-success:not(.completed-badge) {
    background-color: #28a745 !important;
    color: white !important;
    border: none !important;
}

.compact-round-badge {
    height: 22px !important;
    line-height: 1.2 !important;
    font-size: 0.8rem !important;
    padding: 0.25rem 0.5rem !important;
    display: inline-flex !important;
    align-items: center !important;
    font-weight: 600 !important;
    min-width: 28px !important;
    justify-content: center !important;
}

/* Timer round badge gets blue outline like other active elements */
#current-round-badge.compact-round-badge {
    border: 1px solid #0d6efd !important; /* Blue outline like active buttons */
}

/* Profile picture and edit button fixes */
.profile-image-container,
.profile-image-container-mobile {
    position: relative;
    display: inline-block;
}

/* Nieuwe profielfoto styling met zichtbare border */
.profile-image-outer-ring {
    width: 170px !important;
    height: 170px !important;
    border-radius: 50% !important;
    border: 6px solid var(--bs-border-color) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin: 0 auto !important;
    padding: 6px !important;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15) !important;
    transition: all 0.3s ease !important;
    position: relative !important;
    background: var(--bs-border-color) !important;
}

.profile-image-outer-ring:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.2) !important;
}

.profile-picture-wrapper {
    width: 158px !important;
    height: 158px !important;
    border-radius: 50% !important;
    overflow: hidden !important;
    position: relative !important;
    background: white !important;
}

.profile-picture {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    object-position: center !important;
    display: block !important;
    border-radius: 50% !important;
}

.profile-picture-placeholder {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: var(--bs-secondary-bg) !important;
    width: 158px !important;
    height: 158px !important;
    border-radius: 50% !important;
}

.avatar-emoji {
    font-size: 4rem !important;
    line-height: 1 !important;
}

/* Fallback voor oude styling */
.profile-image {
    width: 150px !important;
    height: 150px !important;
    object-fit: cover;
    border-radius: 50%;
    cursor: pointer;
    transition: opacity 0.3s ease;
}

.profile-image:hover {
    opacity: 0.9;
}

/* Avatar emoji styling to match image size */
.avatar-preview.profile-image {
    width: 150px !important;
    height: 150px !important;
    border-radius: 50%;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 4rem !important;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    cursor: pointer;
    transition: opacity 0.3s ease;
}

.avatar-preview.profile-image:hover {
    opacity: 0.9;
}

/* Edit button positioning and styling */
.profile-edit-button {
    position: absolute !important;
    bottom: 12px !important;
    right: 12px !important;
    width: 32px !important;
    height: 32px !important;
    border-radius: 50% !important;
    background: var(--bs-primary) !important;
    border: 3px solid white !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2) !important;
}

.profile-edit-button:hover {
    background: var(--bs-primary) !important;
    opacity: 0.9 !important;
    transform: scale(1.1) !important;
}

.profile-edit-button i {
    color: white !important;
}

.edit-profile-btn {
    position: absolute !important;
    bottom: 5px !important;
    right: 5px !important;
    background: rgba(255, 255, 255, 0.9) !important;
    color: #333 !important;
    border: 1px solid #ddd !important;
    border-radius: 20px !important;
    padding: 0.3rem 0.8rem !important;
    font-size: 0.75rem !important;
    font-weight: 500 !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1) !important;
}

.edit-profile-btn:hover {
    background: rgba(255, 255, 255, 1) !important;
    color: #000 !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 8px rgba(0,0,0,0.15) !important;
}

/* Mobile profile image container */
.profile-image-container-mobile .profile-image {
    width: 120px !important;
    height: 120px !important;
}

.profile-image-container-mobile .avatar-preview.profile-image {
    width: 120px !important;
    height: 120px !important;
    font-size: 3rem !important;
}

/* Nieuwe profielfoto styling voor view.html */
.profile-photo-wrapper {
    position: relative;
    display: inline-block;
}

.profile-photo {
    width: 150px !important;
    height: 150px !important;
    border-radius: 50% !important;
    object-fit: cover !important;
    border: 4px solid var(--bs-border-color) !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1) !important;
    transition: all 0.3s ease !important;
}

.profile-photo:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15) !important;
}

.profile-photo-placeholder {
    width: 150px !important;
    height: 150px !important;
    border-radius: 50% !important;
    border: 4px solid var(--bs-border-color) !important;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 4rem !important;
    color: white !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1) !important;
    transition: all 0.3s ease !important;
}

.profile-photo-placeholder:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15) !important;
}

/* Profile photo display for edit page - same styling as view page */
.profile-photo-display {
    width: 150px !important;
    height: 150px !important;
    border-radius: 50% !important;
    object-fit: cover !important;
    border: 4px solid var(--bs-border-color) !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1) !important;
    transition: all 0.3s ease !important;
}

.profile-photo-display:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15) !important;
}

.profile-edit-button {
    position: absolute !important;
    bottom: 8px !important;
    right: 8px !important;
    font-size: 0.65rem !important;
    padding: 0.2rem 0.6rem !important;
    background-color: var(--bs-primary) !important;
    color: white !important;
    text-shadow: none !important;
    border: 1px solid var(--bs-primary) !important;
    font-weight: 600 !important;
    border-radius: 4px !important;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2) !important;
    transition: all 0.2s ease !important;
    font-weight: 500 !important;
    text-decoration: none !important;
    letter-spacing: 0.2px !important;
    text-transform: none !important;
    line-height: 1.2 !important;
    min-width: 45px !important;
    height: 14px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.profile-edit-button:hover {
    background-color: rgba(var(--bs-primary-rgb), 0.9) !important;
    border-color: var(--bs-primary) !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 12px rgba(var(--bs-primary-rgb), 0.4) !important;
    color: white !important;
    text-decoration: none !important;
}

/* Force white text on edit button - all states */
.profile-edit-button,
.profile-edit-button:link,
.profile-edit-button:visited,
.profile-edit-button:active,
.profile-edit-button:focus {
    color: #ffffff !important;
    text-shadow: 0 0 1px rgba(0,0,0,0.5) !important;
}

/* Profile Photo Popup Modal */
.profile-photo-popup {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.profile-photo-popup-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    max-width: 95%;
    max-height: 95%;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.7);
}

.profile-photo-popup img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 12px;
    cursor: zoom-in;
    transition: transform 0.3s ease;
    max-height: 90vh;
    object-fit: contain;
}

.profile-photo-popup img.zoomed {
    cursor: zoom-out;
    transform: scale(2);
}

.profile-photo-popup-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    border: none;
    border-radius: 50%;
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 22px;
    font-weight: bold;
    transition: all 0.2s ease;
    z-index: 10000;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.profile-photo-popup-close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

/* Back button cirkel styling - same as competition page */
.btn-circle-back {
    width: 40px !important;
    height: 40px !important;
    border-radius: 50% !important;
    padding: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.clickable-venue {
    font-size: 0.8rem !important;
    line-height: 1.1 !important;
    color: #9fa6b2 !important;
    cursor: pointer !important;
    transition: color 0.2s ease !important;
}

.clickable-venue:hover {
    color: var(--bs-primary) !important;
}

.match-datetime {
    line-height: 1.2 !important;
    font-size: 0.85rem !important;
}

/* Join button circular styling */
.join-btn {
    width: 48px !important;
    height: 48px !important;
    border-radius: 50% !important;
    padding: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    border: 2px solid white !important;
    background-color: transparent !important;
    transition: all 0.3s ease !important;
    font-size: 0.75rem !important;
    font-weight: 600 !important;
    color: white !important;
}

.join-btn:hover {
    background-color: white !important;
    border-color: white !important;
    color: var(--bs-dark) !important;
    transform: scale(1.05) !important;
}

.join-btn:focus {
    background-color: white !important;
    border-color: white !important;
    color: var(--bs-dark) !important;
    box-shadow: 0 0 0 0.2rem rgba(255, 255, 255, 0.25) !important;
}

/* Podium border with glow effect for competition cards */
.competition-card.podium-gold {
    border: 3px solid #FFD700 !important;
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.6),
                0 0 40px rgba(255, 215, 0, 0.4),
                inset 0 0 15px rgba(255, 215, 0, 0.1) !important;
}

.competition-card.podium-silver {
    border: 3px solid #C0C0C0 !important;
    box-shadow: 0 0 20px rgba(192, 192, 192, 0.6),
                0 0 40px rgba(192, 192, 192, 0.4),
                inset 0 0 15px rgba(192, 192, 192, 0.1) !important;
}

.competition-card.podium-bronze {
    border: 3px solid #CD7F32 !important;
    box-shadow: 0 0 20px rgba(205, 127, 50, 0.6),
                0 0 40px rgba(205, 127, 50, 0.4),
                inset 0 0 15px rgba(205, 127, 50, 0.1) !important;
}

/* Rules Modal Fullscreen with Notch Support */
#rulesModal .modal-fullscreen {
    padding: 0 !important;
    margin: 0 !important;
}

#rulesModal .modal-fullscreen .modal-content {
    height: 100vh !important;
    height: 100dvh !important;
    border: none !important;
    border-radius: 0 !important;
    display: flex;
    flex-direction: column;
}

#rulesModal .modal-header {
    flex-shrink: 0;
    padding-top: max(1rem, env(safe-area-inset-top)) !important;
    padding-left: max(1rem, env(safe-area-inset-left)) !important;
    padding-right: max(1rem, env(safe-area-inset-right)) !important;
    padding-bottom: 1rem !important;
}

#rulesModal .modal-body {
    flex: 1;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch;
    padding-left: max(1rem, env(safe-area-inset-left)) !important;
    padding-right: max(1rem, env(safe-area-inset-right)) !important;
}

#rulesModal .modal-footer {
    flex-shrink: 0;
    padding-bottom: max(1rem, env(safe-area-inset-bottom)) !important;
    padding-left: max(1rem, env(safe-area-inset-left)) !important;
    padding-right: max(1rem, env(safe-area-inset-right)) !important;
    padding-top: 1rem !important;
}

/* ============================================================================
   CRITICAL FINAL OVERRIDES - HIGHEST SPECIFICITY
   Must be at END of file to override all previous rules
   ============================================================================ */

/* FOLDER CARDS: Force light grey background with MAXIMUM specificity */
html body .folder-card .card.folder-card-inner,
html body .card.folder-card-inner.competition-card,
html body .card.folder-card-inner,
html body div.card.folder-card-inner.competition-card,
.competitions-page .folder-card-inner.competition-card,
.competitions-page .folder-card .card.folder-card-inner,
.competitions-page .card.folder-card-inner,
div.card.folder-card-inner.competition-card {
    background: rgba(140, 140, 140, 0.5) !important;
    background-color: rgba(140, 140, 140, 0.5) !important;
    backdrop-filter: blur(10px) !important;
    -webkit-backdrop-filter: blur(10px) !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4) !important;
    border-radius: 0.75rem !important;
    overflow: hidden !important;
}

/* Remove any dark ::before overlay from folder cards */
html body .folder-card .card.folder-card-inner::before,
html body .card.folder-card-inner.competition-card::before,
html body .card.folder-card-inner::before,
html body div.card.folder-card-inner.competition-card::before {
    background: transparent !important;
    opacity: 0 !important;
    display: none !important;
}

/* Transparent dropdown toggle button - only show the three dots icon - NO HIGHLIGHT */
.dropdown-toggle.btn-link,
.dropdown-toggle.btn-link:hover,
.dropdown-toggle.btn-link:focus,
.dropdown-toggle.btn-link:active,
.dropdown-toggle.btn-link:focus-visible,
.dropdown-toggle.btn-link:focus-within {
    background: transparent !important;
    background-color: transparent !important;
    border: none !important;
    box-shadow: none !important;
    outline: none !important;
    color: inherit !important;
    text-decoration: none !important;
    opacity: 1 !important;
}

.dropdown-toggle.btn-link::after {
    display: none !important;
}

/* When dropdown is open, increase z-index - NO GLOW */
.dropdown.show .dropdown-toggle {
    z-index: 1 !important;
}

.dropdown.show,
.dropdown:focus,
.dropdown:active,
.dropdown.position-absolute.show,
.dropdown.position-absolute:focus,
.dropdown.position-absolute:active {
    background: none !important;
    background-color: transparent !important;
    box-shadow: none !important;
    outline: none !important;
    border: none !important;
}

/* Volledig geen highlight op de button zelf */
.btn.btn-link.dropdown-toggle:active,
.btn.btn-link.dropdown-toggle:focus,
.btn.btn-link.dropdown-toggle:hover {
    background: none !important;
    background-color: transparent !important;
    box-shadow: none !important;
    border-color: transparent !important;
}

/* Bootstrap focus ring verwijderen */
.btn-link:focus,
.btn-link:active:focus {
    box-shadow: none !important;
    outline: none !important;
}

.dropdown.show .dropdown-menu {
    z-index: 99999 !important;
}

/* THREE-DOT BUTTON POSITIONING - 5px from right edge */
.folder-card-inner .dropdown.position-absolute,
.card.folder-card-inner .dropdown.position-absolute {
    top: 2px !important;
    right: 5px !important;
}

/* RESPONSIVE MATCH CARD BADGE FIX - status+round badges inline, venue can wrap */
.match-card .d-flex.justify-content-between.align-items-start {
    flex-wrap: wrap !important;
    gap: 8px !important;
}

/* Badge container left side - status + round badges ALWAYS inline, no wrapping */
.match-card .d-flex.justify-content-between.align-items-start > div:first-child {
    flex-shrink: 0 !important;
    display: flex !important;
    align-items: center !important;
    gap: 4px !important;
    flex-wrap: nowrap !important;
    white-space: nowrap !important;
}

/* Force badges to stay inline */
.match-card .upcoming-badge,
.match-card .completed-badge,
.match-card .rounds-badge {
    flex-shrink: 0 !important;
    white-space: nowrap !important;
}

/* Badge container right side - venue and date can wrap */
.match-card .d-flex.justify-content-between.align-items-start > div.text-end {
    flex-shrink: 1 !important;
    min-width: 0 !important;
}

/* Venue text can wrap naturally - NO truncation */
.venue-text {
    display: inline-block !important;
    max-width: 100% !important;
    white-space: normal !important;
    word-wrap: break-word !important;
}

/* Scale down font sizes on smaller/wider screens */
@media (max-width: 500px) {
    .match-card .upcoming-badge,
    .match-card .completed-badge,
    .match-card .rounds-badge {
        font-size: 0.7rem !important;
        padding: 3px 8px !important;
    }

    .match-card .match-datetime {
        font-size: 0.7rem !important;
    }

    .match-card .venue-text {
        font-size: 0.7rem !important;
    }

    .match-card .badge-host,
    .match-card .badge-member {
        font-size: 0.65rem !important;
        padding: 2px 6px !important;
    }
}

/* Extra small screens - scale even more */
@media (max-width: 380px) {
    .match-card .upcoming-badge,
    .match-card .completed-badge,
    .match-card .rounds-badge {
        font-size: 0.65rem !important;
        padding: 2px 6px !important;
    }

    .match-card .match-datetime {
        font-size: 0.65rem !important;
    }

    .match-card .venue-text {
        font-size: 0.65rem !important;
        max-width: 120px !important;
    }

    .match-card .badge-host,
    .match-card .badge-member {
        font-size: 0.6rem !important;
        padding: 2px 5px !important;
    }
}

/* Competition card bottom row alignment - date aligned with badge baseline */
.competition-bottom-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
}

.competition-date {
    display: inline-block;
    line-height: 1.5;
    vertical-align: baseline;
}

/* Boxscore container styling - matches match card appearance (no border) */
.boxscore-container {
    background: rgba(17, 24, 39, 0.85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: none;
    border-radius: 0.5rem;
    padding: 0.75rem 1rem;
    font-size: 0.9rem;
}

.boxscore-header {
    display: grid;
    grid-template-columns: auto auto;
    gap: 1rem;
    justify-content: end;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.85rem;
}

.boxscore-row {
    display: grid;
    grid-template-columns: 1fr auto auto;
    gap: 1rem;
    padding: 0.4rem 0;
}

.boxscore-player-name {
    color: var(--bs-body-color);
    font-weight: 500;
    font-size: 1rem;
    text-align: left;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.boxscore-stat-header {
    width: 50px;
    text-align: center;
    font-size: 0.85rem;
}

.boxscore-stat {
    width: 50px;
    text-align: center;
    font-weight: 500;
}

/* BOC/BOCR stat colors: green if > 0, red if = 0 (only visible when other stat > 0) */
.boxscore-stat.stat-positive {
    color: #28a745 !important;
}

.boxscore-stat.stat-zero {
    color: #dc3545 !important;
}