/* Schedule Page Styles */

/* Timeline and Calendar Views */
.schedule-view {
    transition: all 0.3s ease;
}

.schedule-view.hidden {
    opacity: 0;
    visibility: hidden;
    height: 0;
    overflow: hidden;
}

/* Week View Enhancements */
.week-schedule-row:hover {
    background-color: #f9fafb;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.assignment-block {
    position: relative;
    border-radius: 4px;
    border: 1px solid transparent;
    transition: all 0.2s ease;
    cursor: pointer;
}

.assignment-block:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    z-index: 10;
}

.assignment-block.busy {
    background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
    border-color: #fca5a5;
    color: #991b1b;
}

.assignment-block.scheduled {
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    border-color: #93c5fd;
    color: #1e40af;
}

.assignment-block.available {
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
    border-color: #86efac;
    color: #166534;
}

.assignment-block.completed {
    background: linear-gradient(135deg, #f9fafb 0%, #f3f4f6 100%);
    border-color: #d1d5db;
    color: #374151;
}

/* Day View Timeline */
.timeline-container {
    position: relative;
    background: #ffffff;
}

.timeline-hour {
    border-bottom: 1px solid #e5e7eb;
    position: relative;
}

.timeline-hour:hover {
    background-color: #f9fafb;
}

.timeline-assignment {
    position: absolute;
    left: 4px;
    right: 4px;
    border-radius: 4px;
    padding: 4px 8px;
    font-size: 11px;
    line-height: 1.2;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.2s ease;
    z-index: 5;
}

.timeline-assignment:hover {
    z-index: 10;
    transform: scale(1.02);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Month View Calendar */
.calendar-day {
    min-height: 100px;
    border: 1px solid #e5e7eb;
    position: relative;
    overflow: hidden;
    transition: all 0.2s ease;
}

.calendar-day:hover {
    background-color: #f9fafb;
    border-color: #d1d5db;
}

.calendar-day.today {
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    border-color: #3b82f6;
}

.calendar-day.has-assignments {
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
}

.calendar-assignment {
    padding: 2px 4px;
    border-radius: 3px;
    font-size: 10px;
    margin-bottom: 2px;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.calendar-assignment:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Staff Avatar Styles */
.staff-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    border: 2px solid #ffffff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.staff-avatar.online {
    border-color: #10b981;
    box-shadow: 0 0 0 2px #10b981, 0 2px 4px rgba(0, 0, 0, 0.1);
}

.staff-avatar.busy {
    border-color: #ef4444;
    box-shadow: 0 0 0 2px #ef4444, 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Status Indicators */
.status-indicator {
    position: relative;
    display: inline-flex;
    align-items: center;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-indicator::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    margin-right: 6px;
    animation: pulse 2s infinite;
}

.status-indicator.available::before {
    background-color: #10b981;
}

.status-indicator.busy::before {
    background-color: #ef4444;
}

.status-indicator.scheduled::before {
    background-color: #3b82f6;
}

.status-indicator.offline::before {
    background-color: #6b7280;
    animation: none;
}

/* Availability Cards */
.availability-card {
    background: #ffffff;
    border-radius: 8px;
    padding: 16px;
    border: 1px solid #e5e7eb;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

.availability-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: #e5e7eb;
    transition: all 0.2s ease;
}

.availability-card.available::before {
    background: #10b981;
}

.availability-card.busy::before {
    background: #ef4444;
}

.availability-card.scheduled::before {
    background: #3b82f6;
}

.availability-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Loading States */
.loading-skeleton {
    background: linear-gradient(90deg, #f3f4f6 25%, #e5e7eb 37%, #f3f4f6 63%);
    background-size: 400% 100%;
    animation: skeleton-loading 1.5s ease-in-out infinite;
}

@keyframes skeleton-loading {
    0% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

.loading-pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .schedule-view {
        overflow-x: auto;
    }
    
    .assignment-block {
        font-size: 10px;
        padding: 2px 4px;
    }
    
    .calendar-day {
        min-height: 80px;
    }
    
    .staff-avatar {
        width: 24px;
        height: 24px;
        font-size: 10px;
    }
    
    .timeline-assignment {
        font-size: 9px;
        padding: 2px 4px;
    }
}

@media (max-width: 640px) {
    .calendar-day {
        min-height: 60px;
        font-size: 12px;
    }
    
    .assignment-block {
        font-size: 9px;
        padding: 1px 3px;
        margin-bottom: 1px;
    }
    
    .availability-card {
        padding: 12px;
    }
}

/* Animation Utilities */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-slide-in {
    animation: slideIn 0.3s ease-out;
}

/* Focus States for Accessibility */
.assignment-block:focus,
.calendar-assignment:focus,
.timeline-assignment:focus {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

/* Print Styles */
@media print {
    .schedule-view {
        box-shadow: none;
        border: 1px solid #000;
    }
    
    .assignment-block {
        background: #f3f4f6 !important;
        color: #000 !important;
        border: 1px solid #000;
    }
    
    .status-indicator::before {
        display: none;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .schedule-view {
        background-color: #1f2937;
        color: #f9fafb;
    }
    
    .calendar-day {
        border-color: #374151;
        background-color: #1f2937;
    }
    
    .calendar-day:hover {
        background-color: #374151;
    }
    
    .assignment-block.busy {
        background: linear-gradient(135deg, #7f1d1d 0%, #991b1b 100%);
        color: #fef2f2;
    }
    
    .assignment-block.scheduled {
        background: linear-gradient(135deg, #1e3a8a 0%, #1e40af 100%);
        color: #eff6ff;
    }
    
    .assignment-block.available {
        background: linear-gradient(135deg, #14532d 0%, #166534 100%);
        color: #f0fdf4;
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .assignment-block {
        border-width: 2px;
        font-weight: 600;
    }
    
    .status-indicator {
        border: 2px solid currentColor;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    .assignment-block,
    .calendar-assignment,
    .timeline-assignment,
    .availability-card {
        transition: none;
    }
    
    .loading-skeleton {
        animation: none;
        background: #e5e7eb;
    }
    
    .status-indicator::before {
        animation: none;
    }
}
