/* Weekly Calendar Styles */

#calendarGrid {
    display: grid;
    grid-template-columns: 120px repeat(7, 1fr);
    min-height: 600px;
}

.calendar-time-slot {
    border-top: 1px solid #e5e7eb;
    border-right: 1px solid #e5e7eb;
    min-height: 60px;
    position: relative;
}

.calendar-time-label {
    padding: 8px 12px;
    font-size: 12px;
    color: #6b7280;
    background-color: #f9fafb;
    border-top: 1px solid #e5e7eb;
    border-right: 1px solid #e5e7eb;
    display: flex;
    align-items: flex-start;
    justify-content: flex-end;
    min-height: 60px;
}

.calendar-time-label:first-child {
    border-top: none;
}

.calendar-day-column {
    position: relative;
}

.calendar-session {
    position: absolute;
    left: 2px;
    right: 2px;
    border-radius: 6px;
    padding: 4px 6px;
    font-size: 11px;
    line-height: 1.2;
    color: white;
    cursor: pointer;
    transition: all 0.2s ease;
    overflow: hidden;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.calendar-session:hover {
    transform: scale(1.02);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
    z-index: 10;
}

/* Session Type Colors */
.calendar-session.drill-session {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.calendar-session.practice-doubles-game {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
}

.calendar-session.casual-doubles-game {
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
}

.calendar-session.singles-game {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}

.calendar-session.lesson {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
}

.calendar-session-title {
    font-weight: 600;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.calendar-session-details {
    opacity: 0.9;
    font-size: 10px;
    line-height: 1.1;
}

.calendar-session-organizer {
    font-weight: 500;
    margin-bottom: 1px;
}

.calendar-session-players {
    margin-bottom: 1px;
}

.calendar-session-location {
    font-style: italic;
    opacity: 0.8;
}

/* Today highlight */
.calendar-today {
    background-color: #eff6ff;
}

.calendar-today .calendar-time-slot {
    background-color: #eff6ff;
}

/* Current time indicator */
.calendar-current-time {
    position: absolute;
    left: 0;
    right: 0;
    height: 2px;
    background-color: #ef4444;
    z-index: 20;
    pointer-events: none;
}

.calendar-current-time::before {
    content: '';
    position: absolute;
    left: -4px;
    top: -3px;
    width: 8px;
    height: 8px;
    background-color: #ef4444;
    border-radius: 50%;
}

/* Responsive design */
@media (max-width: 768px) {
    #calendarGrid {
        grid-template-columns: 80px repeat(7, 1fr);
    }
    
    .calendar-time-label {
        font-size: 10px;
        padding: 4px 6px;
    }
    
    .calendar-session {
        font-size: 9px;
        padding: 2px 4px;
    }
    
    .calendar-session-title {
        margin-bottom: 1px;
    }
    
    .calendar-session-details {
        font-size: 8px;
    }
}

@media (max-width: 640px) {
    #calendarGrid {
        grid-template-columns: 60px repeat(7, minmax(60px, 1fr));
    }
    
    .calendar-session-details {
        display: none;
    }
    
    .calendar-session {
        padding: 2px 3px;
        text-align: center;
    }
}