/* Enhanced Calendar Styles for Project Schedules */

/* FullCalendar Container */
.fullcalendar-container {
    background: white;
    border-radius: 8px;
    padding: 10px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Calendar Navigation Styles */
.calendar-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding: 10px 0;
    border-bottom: 1px solid #e0e0e0;
}

.view-controls {
    display: flex;
    gap: 5px;
}

.view-btn {
    padding: 8px 15px;
    border: 1px solid #ddd;
    background: #f8f9fa;
    color: #6c757d;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s ease;
}

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

.view-btn.active {
    background: #007bff;
    color: white;
    border-color: #007bff;
}

.month-navigation {
    display: flex;
    align-items: center;
    gap: 15px;
}

.nav-btn {
    background: #f8f9fa;
    border: 1px solid #ddd;
    color: #6c757d;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    transition: all 0.2s ease;
}

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

.current-month {
    font-size: 18px;
    font-weight: 600;
    color: #2c3e50;
    min-width: 200px;
    text-align: center;
}

/* Gantt Chart Styles */
.gantt-container {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.gantt-header {
    background: #f8f9fa;
    border-bottom: 2px solid #dee2e6;
}

.gantt-timeline {
    padding: 10px;
}

.timeline-header {
    margin-bottom: 10px;
}

.timeline-month {
    font-size: 16px;
    font-weight: 600;
    color: #2c3e50;
    text-align: center;
}

.timeline-days {
    display: flex;
    gap: 2px;
}

.day-header {
    flex: 1;
    text-align: center;
    padding: 8px 4px;
    background: #e9ecef;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    color: #6c757d;
    min-width: 30px;
}

.gantt-body {
    padding: 10px;
    max-height: 400px;
    overflow-y: auto;
}

.gantt-task {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
    position: relative;
    cursor: pointer;
    transition: all 0.2s ease;
}

.gantt-task:hover {
    background: rgba(0, 123, 255, 0.05);
    border-radius: 4px;
    padding: 2px;
    margin: 6px -2px;
}

.task-label {
    flex: 0 0 200px;
    padding: 8px 12px;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 4px 0 0 4px;
    font-size: 14px;
    font-weight: 500;
    color: #2c3e50;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.task-bar {
    position: relative;
    height: 32px;
    border-radius: 0 4px 4px 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 12px;
    font-weight: 500;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
    min-width: 50px;
    overflow: hidden;
}

.task-duration {
    z-index: 2;
    position: relative;
}

.task-progress {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    background: rgba(255, 255, 255, 0.3);
    border-radius: inherit;
    transition: width 0.3s ease;
}

.no-schedule {
    text-align: center;
    padding: 40px;
    color: #6c757d;
    font-style: italic;
}

/* Phase Status Colors */
.phase-not-started {
    background: #6c757d !important;
}

.phase-in-progress {
    background: #007bff !important;
}

.phase-completed {
    background: #28a745 !important;
}

.phase-delayed {
    background: #dc3545 !important;
}

.phase-on-hold {
    background: #ffc107 !important;
    color: #212529 !important;
}

/* Calendar Event Styles in FullCalendar */
.fc-event {
    border-radius: 4px !important;
    border: none !important;
    padding: 2px 6px !important;
    font-size: 12px !important;
    font-weight: 500 !important;
}

.fc-event-title {
    font-weight: 500 !important;
}

/* Calendar Filters */
.calendar-filters {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 6px;
    border: 1px solid #e9ecef;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.filter-group label {
    font-size: 14px;
    font-weight: 500;
    color: #495057;
    white-space: nowrap;
}

.filter-group select {
    padding: 6px 10px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 14px;
    background: white;
    color: #495057;
    min-width: 120px;
}

.filter-group select:focus {
    border-color: #007bff;
    outline: none;
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
}

/* Responsive Design */
@media (max-width: 768px) {
    .calendar-navigation {
        flex-direction: column;
        gap: 15px;
    }
    
    .view-controls {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .calendar-filters {
        flex-direction: column;
        gap: 10px;
    }
    
    .gantt-task {
        flex-direction: column;
        align-items: stretch;
    }
    
    .task-label {
        flex: none;
        border-radius: 4px 4px 0 0;
        text-align: center;
    }
    
    .task-bar {
        border-radius: 0 0 4px 4px;
        min-height: 20px;
    }
}

/* Schedule Editor Modal Styles */
.schedule-editor-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.schedule-editor-content {
    background: white;
    border-radius: 8px;
    padding: 20px;
    min-width: 800px;
    max-width: 90vw;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

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

.schedule-editor-header h3 {
    margin: 0;
    color: #2c3e50;
}

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

.close-editor-btn:hover {
    background: #f8f9fa;
    color: #495057;
}

/* Phase Details Modal */
.phase-details-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1001;
}

.phase-details-content {
    background: white;
    border-radius: 8px;
    padding: 20px;
    min-width: 500px;
    max-width: 80vw;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

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

.phase-status-badge {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
}

.phase-progress-bar {
    width: 100%;
    height: 8px;
    background: #e9ecef;
    border-radius: 4px;
    overflow: hidden;
    margin: 10px 0;
}

.phase-progress-fill {
    height: 100%;
    background: #28a745;
    transition: width 0.3s ease;
}

/* Animation for calendar transitions */
.calendar-transition {
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.calendar-transition.fade-out {
    opacity: 0;
    transform: translateY(-10px);
}

.calendar-transition.fade-in {
    opacity: 1;
    transform: translateY(0);
}
