/* AI Chat Availability Display Styles */

/* Ensure AI messages don't overflow */
.ai-message {
    max-width: 100%;
    overflow-x: hidden;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.ai-availability-container {
    margin: 10px 0;
    padding: 15px;
    background: var(--card-bg, #0a0e1a);
    border-radius: 10px;
    border: 1px solid var(--primary-border, rgba(156, 39, 176, 0.3));
    max-width: 100%;
    box-sizing: border-box;
    overflow: hidden;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.availability-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--primary-border, rgba(156, 39, 176, 0.3));
}

.availability-header h3 {
    margin: 0;
    color: var(--primary-color, #9c27b0);
    font-size: 1.2em;
}

.availability-date {
    color: var(--text-secondary, #888);
    font-size: 0.9em;
}

/* Player Cards */
.player-card {
    background: var(--card-secondary, #141824);
    border: 1px solid var(--border-color, rgba(156, 39, 176, 0.2));
    border-radius: 8px;
    padding: 12px 15px;
    margin: 8px 0;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
}

.player-card:hover {
    background: var(--card-hover, #1a1f2e);
    border-color: var(--primary-color, #9c27b0);
    transform: translateX(5px);
    box-shadow: 0 2px 10px rgba(156, 39, 176, 0.2);
}

.player-name {
    font-weight: bold;
    color: var(--text-primary, #fff);
    display: flex;
    align-items: center;
    gap: 8px;
}

.player-emoji {
    font-size: 1.2em;
}

.time-range {
    display: flex;
    align-items: center;
    gap: 5px;
    background: var(--time-bg, rgba(156, 39, 176, 0.1));
    padding: 4px 10px;
    border-radius: 15px;
    color: var(--text-secondary, #ccc);
    font-size: 0.9em;
}

.location-badge {
    font-size: 0.85em;
    color: var(--text-muted, #888);
    font-style: italic;
}

/* Availability Sections */
.availability-section {
    margin: 20px 0;
}

.section-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    font-weight: bold;
    font-size: 1.1em;
}

/* Available Section - Green Theme */
.available-section .section-header {
    color: #4caf50;
}

.available-section .player-card {
    border-left: 3px solid #4caf50;
}

.available-section .player-card:hover {
    background: rgba(76, 175, 80, 0.1);
}

/* Limited Section - Orange Theme */
.limited-section .section-header {
    color: #ff9800;
}

.limited-section .player-card {
    border-left: 3px solid #ff9800;
}

.limited-section .player-card:hover {
    background: rgba(255, 152, 0, 0.1);
}

/* Unavailable Section - Red Theme */
.unavailable-section .section-header {
    color: #f44336;
}

.unavailable-section .player-card {
    border-left: 3px solid #f44336;
    opacity: 0.7;
}

.unavailable-section .player-card:hover {
    background: rgba(244, 67, 54, 0.1);
    opacity: 0.85;
}

/* All Day Badge */
.all-day-badge {
    background: var(--success-bg, rgba(76, 175, 80, 0.2));
    color: var(--success-color, #4caf50);
    padding: 4px 10px;
    border-radius: 15px;
    font-size: 0.9em;
    font-weight: 500;
}

/* Mobile Responsive */
@media (max-width: 600px) {
    .player-card {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .time-range {
        font-size: 0.85em;
    }
    
    .availability-header h3 {
        font-size: 1.1em;
    }
}

/* Dark Mode Adjustments */
@media (prefers-color-scheme: dark) {
    .ai-availability-container {
        background: #0a0e1a;
    }
    
    .player-card {
        background: #141824;
    }
    
    .player-card:hover {
        background: #1a1f2e;
    }
}

/* Animation for loading */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.player-card {
    animation: slideIn 0.3s ease forwards;
}

.player-card:nth-child(1) { animation-delay: 0.05s; }
.player-card:nth-child(2) { animation-delay: 0.1s; }
.player-card:nth-child(3) { animation-delay: 0.15s; }
.player-card:nth-child(4) { animation-delay: 0.2s; }
.player-card:nth-child(5) { animation-delay: 0.25s; }

/* Special Darth Vader Theme for Obi-Wan */
.vader-response .ai-availability-container {
    background: linear-gradient(135deg, #1a0000 0%, #0a0e1a 100%);
    border-color: #8b0000;
}

.vader-response .availability-header {
    border-bottom-color: #8b0000;
}

.vader-response .player-card:hover {
    border-color: #ff0000;
    box-shadow: 0 2px 10px rgba(255, 0, 0, 0.3);
}

/* AI Events Display Styles */
.ai-events-container {
    margin: 10px 0;
    padding: 15px;
    background: var(--card-bg, #0a0e1a);
    border-radius: 10px;
    border: 1px solid var(--primary-border, rgba(156, 39, 176, 0.3));
    overflow: hidden;
    max-width: 100%;
    box-sizing: border-box;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.events-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--primary-border, rgba(156, 39, 176, 0.3));
}

.events-header h3 {
    margin: 0;
    color: var(--primary-color, #9c27b0);
    font-size: 1.2em;
}

.events-count {
    background: var(--primary-bg, rgba(156, 39, 176, 0.2));
    color: var(--primary-color, #9c27b0);
    padding: 4px 10px;
    border-radius: 15px;
    font-size: 0.9em;
}

/* Event Cards */
.event-card {
    background: var(--card-secondary, #141824);
    border: 1px solid var(--border-color, rgba(156, 39, 176, 0.2));
    border-radius: 8px;
    padding: 15px;
    margin: 10px 0;
    transition: all 0.3s ease;
    max-width: 100%;
    box-sizing: border-box;
}

.event-card:hover {
    background: var(--card-hover, #1a1f2e);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(156, 39, 176, 0.3);
}

.event-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
    font-size: 1.1em;
    font-weight: bold;
}

.event-icon {
    font-size: 1.3em;
}

.event-title {
    color: var(--text-primary, #fff);
}

.event-details {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.event-datetime,
.event-participants,
.event-description {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-secondary, #ccc);
    font-size: 0.95em;
}

.detail-icon {
    font-size: 1.1em;
    min-width: 20px;
}

.event-time {
    margin-left: 10px;
    color: var(--text-muted, #888);
}

/* Event Sections */
.events-section {
    margin: 20px 0;
}

.events-section .section-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    font-weight: bold;
    font-size: 1.1em;
    color: var(--text-primary, #fff);
}

/* Match Cards - Blue Theme */
.match-card {
    border-left: 3px solid #2196f3;
}

.match-card:hover {
    background: rgba(33, 150, 243, 0.1);
    border-color: #2196f3;
}

.matches-section .section-header {
    color: #2196f3;
}

/* Scrimmage Cards - Purple Theme */
.scrimmage-card {
    border-left: 3px solid #9c27b0;
}

.scrimmage-card:hover {
    background: rgba(156, 39, 176, 0.1);
    border-color: #9c27b0;
}

.scrimmages-section .section-header {
    color: #9c27b0;
}

/* Past Events - Gray Theme */
.past-card {
    border-left: 3px solid #666;
    opacity: 0.7;
}

.past-card:hover {
    background: rgba(102, 102, 102, 0.1);
    opacity: 0.85;
}

.past-section .section-header {
    color: #888;
}

/* No Events Message */
.no-events {
    text-align: center;
    padding: 40px;
    color: var(--text-muted, #888);
    font-style: italic;
}

/* Mobile Responsive */
@media (max-width: 600px) {
    .event-card {
        padding: 12px;
    }
    
    .event-header {
        font-size: 1em;
    }
    
    .event-details {
        font-size: 0.9em;
    }
    
    .events-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
}

/* Animation */
.event-card {
    animation: slideIn 0.3s ease forwards;
}

.event-card:nth-child(1) { animation-delay: 0.05s; }
.event-card:nth-child(2) { animation-delay: 0.1s; }
.event-card:nth-child(3) { animation-delay: 0.15s; }
.event-card:nth-child(4) { animation-delay: 0.2s; }