/* Calendar View Styles */
.calendar-container {
    background: white;
    border-radius: 1rem;
    box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1);
    overflow: hidden;
    margin: 0.5rem;
}

/* Calendar Header */
.calendar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(135deg, var(--accent-600) 0%, var(--accent-500) 100%);
    color: white;
    padding: 1.5rem;
}

.calendar-title {
    font-size: 1.5rem;
    font-weight: bold;
    margin: 0;
}

.calendar-nav-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.calendar-nav-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

/* Calendar Grid */
.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
}

.calendar-day-header {
    background: #f8fafc;
    padding: 1rem;
    text-align: center;
    font-weight: 600;
    color: #64748b;
    border-bottom: 1px solid #e2e8f0;
    font-size: 0.875rem;
}

.calendar-days-container {
    display: contents;
}

.calendar-day {
    min-height: 130px;
    border-right: 1px solid #e2e8f0;
    border-bottom: 1px solid #e2e8f0;
    padding: 0.75rem;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    display: flex;
    flex-direction: column;
}

.calendar-day:hover {
    background: #f1f5f9;
}

.calendar-day.empty {
    background: #fafafa;
    cursor: default;
}

.calendar-day.today {
    background: #dbeafe;
    border: 2px solid var(--accent-600);
}

.calendar-day.selected {
    background: #e0f2fe;
    border: 2px solid var(--accent-600);
}

.day-number {
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 0.25rem;
}

.calendar-day.today .day-number {
    color: #1d4ed8;
}

.day-tasks {
    flex: 1;
    display: flex;
    flex-wrap: wrap;
    gap: 2px;
    align-items: flex-start;
}

/* Task Dots */
.task-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin: 1px;
}

.task-dot.high {
    background: #ef4444;
}

.task-dot.medium {
    background: #f59e0b;
}

.task-dot.low {
    background: #6b7280;
}

.task-count {
    background: #4b5563;
    color: white;
    font-size: 0.625rem;
    padding: 1px 4px;
    border-radius: 10px;
    margin-left: 2px;
}

/* Selected Day Panel */
.selected-day-panel {
    background: white;
    border-top: 1px solid #e2e8f0;
    max-height: 400px;
    overflow-y: auto;
}

.selected-day-panel.hidden {
    display: none;
}

.selected-day-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #e2e8f0;
    background: #f8fafc;
}

.selected-day-header h3 {
    margin: 0;
    font-size: 1.125rem;
    font-weight: 600;
    color: #1f2937;
}

.close-panel-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #6b7280;
    cursor: pointer;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.close-panel-btn:hover {
    background: #e5e7eb;
    color: #374151;
}

.selected-day-tasks {
    padding: 1rem;
}

.no-tasks {
    text-align: center;
    color: #6b7280;
    font-style: italic;
    padding: 2rem;
}

/* Day Panel Task Cards */
.day-panel-task {
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    padding: 1rem;
    margin-bottom: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    transition: all 0.2s ease;
}

.day-panel-task:hover {
    box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1);
    transform: translateY(-1px);
}

.day-panel-task.priority-high {
    border-left: 4px solid #ef4444;
}

.day-panel-task.priority-medium {
    border-left: 4px solid #f59e0b;
}

.day-panel-task.priority-low {
    border-left: 4px solid #6b7280;
}

.day-panel-task.overdue {
    background: #fef2f2;
    border-color: #fca5a5;
}

.task-info {
    flex: 1;
    margin-right: 1rem;
}

.task-title {
    font-size: 1rem;
    font-weight: 600;
    color: #1f2937;
    margin: 0 0 0.5rem 0;
}

.task-description {
    font-size: 0.875rem;
    color: #6b7280;
    margin: 0 0 0.75rem 0;
    line-height: 1.4;
}

.task-meta {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.task-meta span {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
    border-radius: 0.375rem;
    background: #f3f4f6;
    color: #374151;
}

.task-category {
    background: #dbeafe !important;
    color: #1e40af !important;
}

.task-cost {
    background: #d1fae5 !important;
    color: #065f46 !important;
}

.task-priority.priority-high,
.overdue-badge {
    background: #fee2e2 !important;
    color: #991b1b !important;
}

.task-actions {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.complete-task-btn,
.reschedule-task-btn {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.complete-task-btn {
    background: #dcfce7;
    color: #166534;
}

.complete-task-btn:hover {
    background: #bbf7d0;
}

.reschedule-task-btn {
    background: #dbeafe;
    color: #1e40af;
}

.reschedule-task-btn:hover {
    background: #bfdbfe;
}

@media (max-width: 768px) {
    .calendar-container {
        margin: 0.25rem;
        border-radius: 0.75rem;
    }
    
    .calendar-header {
        padding: 1rem;
    }
    
    .calendar-title {
        font-size: 1.25rem;
    }
    
    .calendar-day {
        min-height: 120px;
        padding: 0.75rem 0.5rem;
    }
    
    .calendar-day-header {
        padding: 0.75rem 0.5rem;
        font-size: 0.75rem;
    }
    
    .day-panel-task {
        flex-direction: column;
        align-items: stretch;
    }
    
    .task-info {
        margin-right: 0;
        margin-bottom: 1rem;
    }
    
    .task-actions {
        flex-direction: row;
    }
    
    .selected-day-panel {
        max-height: 300px;
    }
}

@media (max-width: 480px) {
    .calendar-day {
        min-height: 60px;
        font-size: 0.875rem;
    }
    
    .task-meta {
        flex-direction: column;
        gap: 0.25rem;
    }
}
/* ADD THESE STYLES TO YOUR calendar.css FILE */

/* Updated Task Dots with Visual Priority Colors */
.task-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin: 1px;
    display: inline-block;
}

.task-dot.overdue {
    background: #ef4444; /* Red for overdue */
}

.task-dot.safety {
    background: #f97316; /* Orange for safety */
}

.task-dot.due-soon {
    background: #eab308; /* Yellow for due soon */
}

.task-dot.normal {
    background: #6b7280; /* Gray for normal */
}

/* REPLACE the old priority styles with these new ones */
.task-dot.high {
    background: #ef4444; /* Keep for backwards compatibility */
}

.task-dot.medium {
    background: #f59e0b; /* Keep for backwards compatibility */
}

.task-dot.low {
    background: #6b7280; /* Keep for backwards compatibility */
}

/* Day Panel Task Priority Classes */
.day-panel-task.priority-overdue {
    border-left: 4px solid #ef4444;
    background: #fef2f2;
}

.day-panel-task.priority-safety {
    border-left: 4px solid #f97316;
    background: #fff7ed;
}

.day-panel-task.priority-due-soon {
    border-left: 4px solid #eab308;
    background: #fefce8;
}

.day-panel-task.priority-normal {
    border-left: 4px solid #e5e7eb;
}

/* Enhanced overdue styling */
.day-panel-task.overdue {
    background: #fef2f2;
    border-color: #fca5a5;
}

.overdue-badge {
    background: #fee2e2 !important;
    color: #991b1b !important;
    font-weight: 600;
    padding: 0.25rem 0.5rem;
    border-radius: 0.375rem;
    font-size: 0.75rem;
}

/* Task count styling */
.task-count {
    background: #4b5563;
    color: white;
    font-size: 0.625rem;
    padding: 1px 4px;
    border-radius: 10px;
    margin-left: 2px;
    display: inline-block;
}
