/* Game Details Modal Styles */
.game-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    transition: opacity 0.3s ease;
    font-family: 'Grover', sans-serif;
}

.game-modal-overlay.show {
    opacity: 1;
}

.game-modal-container {
    background: #FAFBFD;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 800px;
    width: 90%;
    max-height: 90vh;
    overflow: hidden;
    transform: scale(0.9) translateY(20px);
    transition: transform 0.3s ease;
}

.game-modal-overlay.show .game-modal-container {
    transform: scale(1) translateY(0);
}

.game-modal-header {
    color: white;
    padding: 24px 32px;
    position: relative;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.game-modal-title {
    display: flex;
    align-items: center;
    gap: 12px;
}

.game-modal-icon {
    font-size: 24px;
}

.game-modal-title h2 {
    margin: 0;
    font-size: 24px;
    font-weight: 700;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.game-modal-close {
    position: absolute;
    top: 20px;
    right: 24px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    font-size: 24px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease;
}

.game-modal-close:hover {
    background: rgba(255, 255, 255, 0.3);
}

.game-modal-body {
    padding: 32px;
    max-height: 60vh;
    overflow-y: auto;
}

.game-modal-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
    margin-bottom: 32px;
}

.game-modal-section {
    background: #FAFBFD;
    border-radius: 12px;
    padding: 24px;
    border: 1px solid #E76185;
}

.game-modal-section h3 {
    margin: 0 0 20px 0;
    font-size: 18px;
    font-weight: 600;
    color: #111037;
    display: flex;
    align-items: center;
    gap: 8px;
}

.game-modal-section h3 i {
    color: #111037;
}

.game-detail-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #e9ecef;
}

.game-detail-item:last-child {
    border-bottom: none;
}

.detail-label {
    font-weight: 600;
    color: #6c757d;
    font-size: 14px;
}

.detail-value {
    font-weight: 500;
    color: #2c3e50;
    text-align: right;
    flex: 1;
    margin-left: 16px;
}

.status-badge {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.score-section {
    grid-column: 1 / -1;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: 2px solid #22c55e;
}

.score-display {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 32px;
    margin-top: 16px;
}

.team-score {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.team-name {
    font-size: 16px;
    font-weight: 600;
    color: #2c3e50;
}

.score {
    font-size: 48px;
    font-weight: 700;
    color: #22c55e;
    line-height: 1;
}

.score-separator {
    font-size: 32px;
    font-weight: 300;
    color: #6c757d;
}

.team-sheet {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
}

.team-sheet-player {
    background: white;
    padding: 12px 16px;
    border-radius: 8px;
    border: 1px solid #e9ecef;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.player-name {
    font-weight: 600;
    color: #2c3e50;
}

.player-position {
    font-size: 12px;
    color: #6c757d;
    background: #e9ecef;
    padding: 4px 8px;
    border-radius: 4px;
}

.game-modal-footer {
    padding: 24px 32px;
    background: #f8f9fa;
    border-top: 1px solid #e9ecef;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.game-modal-footer .btn {
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.game-modal-footer .btn-secondary {
    background: #6c757d;
    color: white;
}

.game-modal-footer .btn-secondary:hover {
    background: #5a6268;
}

.game-modal-footer .btn-primary {
    background: #111037;
    color: white;
}

.game-modal-footer .btn-primary:hover {
    background: #0d0c2a;
}

.game-modal-footer .btn-info {
    background: #3AB5D6;
    color: white;
}

.game-modal-footer .btn-info:hover {
    background: #2a9bb8;
}

.game-modal-footer .btn-warning {
    background: #FEE66E;
    color: #111037;
}

.game-modal-footer .btn-warning:hover {
    background: #fed84a;
}

.game-modal-footer .btn-danger {
    background: #D91B5B;
    color: white;
}

.game-modal-footer .btn-danger:hover {
    background: #b8154a;
}

/* Modal Overlay Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10001;
}

.modal-content {
    background: #FAFBFD;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    max-width: 500px;
    width: 90%;
}

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

.modal-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #111037;
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    color: #6c757d;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.2s ease;
}

.modal-close:hover {
    background: #f8f9fa;
}

.modal-body {
    padding: 24px;
}

.modal-footer {
    padding: 20px 24px;
    border-top: 1px solid #e9ecef;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

/* Availability Section Styles */
.availability-section {
    grid-column: 1 / -1;
    background: linear-gradient(135deg, #FAFBFD 0%, #E76185 10%);
    border: 2px solid #111037;
}

/* Filter Bar Styles - Match Center UI */
.filter-bar {
    background: #FAFBFD;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    border: 1px solid #E76185;
}

.filter-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    align-items: end;
}

.form-group {
    margin: 0;
}

.form-group label {
    font-size: 12px;
    color: #6c757d;
    margin-bottom: 5px;
    display: block;
    font-weight: 600;
}

.form-group select {
    width: 100%;
    padding: 8px 12px;
    border: 2px solid #e9ecef;
    border-radius: 6px;
    font-size: 14px;
    background: white;
    color: #333;
    transition: border-color 0.2s;
}

.form-group select:focus {
    outline: none;
    border-color: #111037;
}

.form-group select option {
    color: #333;
}

.form-group select option[value=""] {
    color: #6c757d;
}

.filter-actions {
    display: flex;
    align-items: end;
}

.btn {
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn-secondary {
    background: #6c757d;
    color: white;
    height: 42px;
}

.btn-secondary:hover {
    background: #5a6268;
}

.availability-filter-bar {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-bottom: 16px;
    padding: 12px 16px;
    background: white;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
}

.availability-filter-bar label {
    font-size: 12px;
    font-weight: 600;
    color: #6b7280;
    margin-right: 4px;
}

.availability-filter-bar select {
    padding: 6px 10px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 12px;
    background: white;
    color: #374151;
    min-width: 120px;
}

.availability-filter-bar select:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.1);
}

.availability-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-top: 16px;
}

.availability-item {
    background: #FAFBFD;
    padding: 16px;
    border-radius: 8px;
    border: 1px solid #E76185;
    display: flex;
    flex-direction: column;
    gap: 8px;
    transition: all 0.2s ease;
    border-left: 4px solid #111037;
}

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

.availability-league-label {
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 2px 6px;
    border-radius: 4px;
    background: rgba(59, 130, 246, 0.1);
    color: #3b82f6;
    align-self: flex-start;
}

.availability-player {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.availability-name {
    font-weight: 600;
    color: #1f2937;
    font-size: 14px;
}

.availability-status {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.availability-status.available {
    background: #dcfce7;
    color: #166534;
    border: 1px solid #bbf7d0;
}

.availability-status.unavailable {
    background: #fef2f2;
    color: #dc2626;
    border: 1px solid #fecaca;
}

.availability-status.maybe {
    background: #fef3c7;
    color: #d97706;
    border: 1px solid #fed7aa;
}

.availability-status.no-response {
    background: #f3f4f6;
    color: #6b7280;
    border: 1px solid #d1d5db;
}

.availability-timestamp {
    font-size: 11px;
    color: #6b7280;
    font-style: italic;
}

.availability-summary {
    display: flex;
    justify-content: space-around;
    margin-bottom: 16px;
    padding: 16px;
    background: white;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
}

.availability-stat {
    text-align: center;
}

.availability-stat-number {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 4px;
}

.availability-stat-number.available {
    color: #22c55e;
}

.availability-stat-number.unavailable {
    color: #ef4444;
}

.availability-stat-number.maybe {
    color: #f59e0b;
}

.availability-stat-number.no-response {
    color: #6b7280;
}

.availability-stat-label {
    font-size: 12px;
    color: #6b7280;
    font-weight: 500;
}

.no-availability-data {
    text-align: center;
    padding: 32px;
    color: #6b7280;
    font-style: italic;
}

.no-availability-data i {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.5;
}

/* Responsive Design */
@media (max-width: 768px) {
    .game-modal-container {
        width: 95%;
        margin: 20px;
    }
    
    .game-modal-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .game-modal-header {
        padding: 20px 24px;
    }
    
    .game-modal-title h2 {
        font-size: 20px;
    }
    
    .game-modal-body {
        padding: 24px;
    }
    
    .game-modal-footer {
        padding: 20px 24px;
        flex-direction: column;
    }
    
    .score-display {
        gap: 20px;
    }
    
    .score {
        font-size: 36px;
    }
    
    .availability-grid {
        grid-template-columns: 1fr;
    }
    
    .availability-summary {
        flex-direction: column;
        gap: 12px;
    }
}