/* Full Screen Calendar View - Force Full Width */
#calendar-view {
    padding: 0 !important;
    margin: 0 !important;
    background: #f9fafb;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    width: 100vw !important;
    max-width: none !important;
    position: relative;
    left: 0;
    right: 0;
}

/* Calendar Day Styling - Full Width */
.calendar-day {
    min-height: 100px;
    border-bottom: 1px solid #e5e7eb;
    border-right: 1px solid #e5e7eb;
    padding: 12px 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    display: flex;
    flex-direction: column;
    background: white;
}

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

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

.calendar-day.today {
    background: #dbeafe;
    border: 2px solid #3b82f6;
}

.calendar-day.selected {
    background: #e0f2fe;
    border: 2px solid #0ea5e9;
}

.day-number {
    font-weight: 600;
    color: #374151;
    margin-bottom: 6px;
    font-size: 16px;
}

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

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

/* Force full width grid containers */
#calendar-days,
.grid.grid-cols-7 {
    width: 100vw !important;
    max-width: none !important;
    margin: 0 !important;
}

/* Mobile responsive - force full width and height */
@media (max-width: 768px) {
    #calendar-view {
        width: 100vw !important;
        margin-left: calc(50% - 50vw) !important;
        margin-right: calc(50% - 50vw) !important;
        height: 100vh !important;
    }
    
    .calendar-day {
        min-height: calc((100vh - 120px) / 6) !important;
        padding: 8px 6px;
        width: calc(100vw / 7) !important;
        box-sizing: border-box;
    }
    
    .day-number {
        font-size: 14px;
        margin-bottom: 4px;
    }
    
    /* Remove right border on last column */
    .calendar-day:nth-child(7n) {
        border-right: none;
    }
    
    /* Force grid to full width */
    #calendar-days {
        display: grid !important;
        grid-template-columns: repeat(7, 1fr) !important;
        width: 100vw !important;
    }
}

/* Force white text in calendar header */
#calendar-month-year {
    color: white !important;
    text-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

/* 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;
        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;
}
