/* Games Page Specific Styles */

/* Force text color for dropdowns and table headers */
#calendarViewFilter, #gameViewFilter, #seasonFilter, #leagueFilter, #competitionFilter, #gameLeagueFilter, #gameCompetitionFilter {
    color: #333 !important;
}

#calendarViewFilter option, #gameViewFilter option, #seasonFilter option, #leagueFilter option, #competitionFilter option, #gameLeagueFilter option, #gameCompetitionFilter option {
    color: #333 !important;
}

.calendar-day-header {
    color: #333 !important;
}

#currentMonth {
    color: #333 !important;
}

.game-table th {
    background: var(--theme-primary, #111037) !important;
    color: var(--theme-surface, #ffffff) !important;
}

/* Professional Calendar Styles */
.professional-calendar {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    border: 1px solid #e9ecef;
}

.calendar-header {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    background: var(--theme-primary, #111037);
    color: white;
}

.calendar-day-header {
    padding: 15px 8px;
    text-align: center;
    font-weight: 600;
    font-size: 14px;
    color: white !important;
    border-right: 1px solid rgba(255, 255, 255, 0.2);
}

.calendar-day-header:last-child {
    border-right: none;
}

.calendar-body {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    grid-template-rows: repeat(6, 120px);
}

.calendar-day {
    border-right: 1px solid #e9ecef;
    border-bottom: 1px solid #e9ecef;
    padding: 8px;
    background: white;
    position: relative;
    overflow: hidden;
}

.calendar-day:nth-child(7n) {
    border-right: none;
}

.calendar-day.other-month {
    background: #f8f9fa;
    color: #adb5bd;
}

.calendar-day.today {
    background: linear-gradient(135deg, var(--club-primary, #667eea)15, var(--club-secondary, #764ba2)15);
    border: 2px solid var(--club-primary, #667eea);
}

.calendar-day-number {
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 4px;
    color: #333;
}

.calendar-day.other-month .calendar-day-number {
    color: #adb5bd;
}

.calendar-day.today .calendar-day-number {
    color: var(--club-primary, #667eea);
    font-weight: 700;
}

.calendar-games {
    display: flex;
    flex-direction: column;
    gap: 2px;
    max-height: 90px;
    overflow: hidden;
}

.calendar-game {
    background: var(--club-primary, #667eea);
    color: white;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    position: relative;
}

.calendar-game:hover {
    background: var(--club-secondary, #764ba2);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    z-index: 10;
}

.calendar-game.away {
    background: #6c757d;
}

.calendar-game.away:hover {
    background: #5a6268;
}

.calendar-game.completed {
    background: #28a745;
}

.calendar-game.completed:hover {
    background: #218838;
}

.game-tooltip {
    position: absolute;
    background: #333;
    color: white;
    padding: 12px;
    border-radius: 8px;
    font-size: 12px;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    max-width: 300px;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s;
}

.game-tooltip.show {
    opacity: 1;
}

.game-tooltip::before {
    content: '';
    position: absolute;
    top: -5px;
    left: 50%;
    transform: translateX(-50%);
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-bottom: 5px solid #333;
}

.games-overflow {
    font-size: 10px;
    color: #6c757d;
    font-weight: 500;
    text-align: center;
    margin-top: 2px;
    cursor: pointer;
}

.games-overflow:hover {
    color: var(--club-primary, #667eea);
}

/* View Toggle Group */
.view-toggle-group {
    display: flex;
    background: #f8f9fa;
    border-radius: 8px;
    padding: 4px;
    border: 1px solid #e9ecef;
}

.view-toggle-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    border: none;
    background: transparent;
    color: #6c757d;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 13px;
    font-weight: 500;
}

.view-toggle-btn:hover {
    background: #e9ecef;
    color: #495057;
}

.view-toggle-btn.active {
    background: var(--club-primary, #667eea);
    color: white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.view-toggle-btn i {
    font-size: 14px;
}

#calendar {
    overflow-x: auto;
    max-width: 100%;
    width: 100%;
}

.week-view-container {
    width: 100% !important;
    min-width: 100% !important;
}

.club-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="%23ffffff" opacity="0.1"/><circle cx="75" cy="75" r="1" fill="%23ffffff" opacity="0.1"/><circle cx="50" cy="10" r="0.5" fill="%23ffffff" opacity="0.15"/><circle cx="10" cy="50" r="0.5" fill="%23ffffff" opacity="0.15"/><circle cx="90" cy="30" r="0.5" fill="%23ffffff" opacity="0.15"/><circle cx="30" cy="90" r="0.5" fill="%23ffffff" opacity="0.15"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
}

.professional-tabs {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    margin-bottom: 24px;
    overflow: hidden;
}

.tab-navigation {
    display: flex;
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
    position: relative;
}

.tab-nav-item {
    flex: 1;
    padding: 16px 20px;
    background: var(--theme-primary, #111037) !important;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
    font-weight: 500;
    color: white !important;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    position: relative;
    min-height: 56px;
}

.tab-nav-item i {
    color: white !important;
}

.tab-nav-item:hover {
    opacity: 0.9;
}

.tab-nav-item.active {
    background: white;
    color: var(--theme-secondary, #DD4242) !important;
    font-weight: 600;
}

.tab-nav-item.active i {
    color: var(--theme-secondary, #DD4242) !important;
}

.tab-nav-item.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--theme-secondary, #DD4242);
}

.tab-nav-item i {
    font-size: 16px;
}

.tab-content-wrapper {
    padding: 24px;
    min-height: 400px;
}

.tab-panel {
    display: none;
}

.tab-panel.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

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

.tab-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid #e9ecef;
}

.tab-panel-title {
    font-size: 20px;
    font-weight: 600;
    color: #2c3e50;
    margin: 0;
}

.tab-panel-actions {
    display: flex;
    gap: 12px;
}

/* Mobile responsive tabs */
@media (max-width: 768px) {
    .tab-nav-item {
        padding: 12px 8px;
        font-size: 12px;
        min-height: 48px;
    }
    
    .tab-nav-item span {
        display: none;
    }
    
    .tab-content-wrapper {
        padding: 16px;
    }
}