/* My Week Styles */

/* Week Navigation */
.week-navigation {
    display: flex;
    align-items: center;
    gap: 12px;
}

.week-display {
    font-weight: 600;
    color: #0f172a;
    font-size: 15px;
    min-width: 200px;
    text-align: center;
    padding: 0 12px;
}

/* Weekly Calendar Container */
.weekly-calendar-container {
    background: white;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    margin-bottom: 20px;
}

/* Weekly Grid */
.weekly-grid {
    display: flex;
    flex-direction: column;
    height: calc(100vh - 350px);
    min-height: 500px;
}

/* Grid Header */
.weekly-grid-header {
    display: grid;
    grid-template-columns: 80px repeat(7, 1fr);
    background: #f8fafc;
    border-bottom: 2px solid #e2e8f0;
}

.time-header {
    padding: 16px 12px;
    text-align: center;
    font-weight: 600;
    font-size: 13px;
    color: #475569;
    border-right: 1px solid #e2e8f0;
    background: #fafafa;
}

.day-header {
    padding: 16px 12px;
    text-align: center;
    font-weight: 600;
    font-size: 13px;
    color: #475569;
    border-right: 1px solid #e2e8f0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.day-header:last-child {
    border-right: none;
}

.day-header.weekend {
    background: #fef3f2;
}

.day-header.today {
    background: #dbeafe;
}

.day-name {
    color: #0f172a;
    font-weight: 700;
    font-size: 14px;
}

.day-date {
    font-weight: 400;
    color: #64748b;
    font-size: 12px;
}

/* Grid Body */
.weekly-grid-body {
    display: grid;
    grid-template-columns: 80px repeat(7, 1fr);
    overflow-y: auto;
    flex: 1;
}

/* Time Column */
.time-column {
    border-right: 2px solid #e2e8f0;
    background: #fafafa;
}

.time-slot {
    padding: 12px 10px;
    text-align: right;
    font-size: 12px;
    color: #64748b;
    font-weight: 600;
    height: 60px;
    border-bottom: 1px solid #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

/* Day Columns */
.day-column {
    border-right: 1px solid #e2e8f0;
    position: relative;
}

.day-column:last-child {
    border-right: none;
}

.day-column.weekend {
    background: #fafafa;
}

.hour-slot {
    height: 60px;
    border-bottom: 1px solid #f1f5f9;
    position: relative;
    padding: 4px;
}

/* Non-working hours styling */
.time-slot.non-working-hours,
.hour-slot.non-working-hours {
    background: repeating-linear-gradient(
        45deg,
        #f8fafc,
        #f8fafc 10px,
        #f1f5f9 10px,
        #f1f5f9 20px
    );
    opacity: 0.6;
}

/* Soft-hold (tentative) — Outlook-style hatched blue overlay */
.hour-slot.soft-hold,
.hour-slot.soft-hold:hover {
    background: repeating-linear-gradient(
        45deg,
        #dbeafe,
        #dbeafe 6px,
        #bfdbfe 6px,
        #bfdbfe 12px
    );
    border: 1px dashed #3b82f6;
    cursor: pointer;
}

.hour-slot.soft-hold.non-working-hours,
.hour-slot.soft-hold.non-working-hours:hover {
    opacity: 0.85;
}

/* Current Time Indicator */
.myweek-current-time-line {
    position: absolute;
    left: 0;
    right: 0;
    height: 2px;
    background: #dc2626;
    z-index: 20;
    pointer-events: none;
}

.myweek-current-time-dot {
    position: absolute;
    left: -4px;
    top: -4px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #dc2626;
}

.day-column.non-work-day {
    background: repeating-linear-gradient(
        45deg,
        #fafafa,
        #fafafa 10px,
        #f5f5f5 10px,
        #f5f5f5 20px
    );
}

.day-header.non-work-day {
    background: repeating-linear-gradient(
        45deg,
        #f8fafc,
        #f8fafc 10px,
        #f1f5f9 10px,
        #f1f5f9 20px
    );
    opacity: 0.7;
}

/* Calendar Items (Jobs and Tasks) */
.calendar-item {
    padding: 6px 8px;
    border-radius: 6px;
    font-size: 12px;
    position: absolute;
    left: 4px;
    right: 4px;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: all 0.2s;
    overflow: hidden;
    z-index: 10;
    border-left: 3px solid;
    min-height: 38px;
}

.calendar-item:hover {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    transform: translateY(-1px);
    z-index: 20;
}

.calendar-item.job {
    background: #dbeafe;
    border-color: #3b82f6;
    color: #1e3a8a;
}

.calendar-item.task {
    background: #fef3c7;
    border-color: #f59e0b;
    color: #78350f;
}

.calendar-item.overdue {
    background: #fee2e2;
    border-color: #ef4444;
    color: #7f1d1d;
}

/* Calendar Item Priority Colors for Jobs */
.calendar-item.job.priority-low {
    border-left-color: #3b82f6;
}

.calendar-item.job.priority-medium {
    border-left-color: #f59e0b;
}

.calendar-item.job.priority-high {
    border-left-color: #f97316;
}

.calendar-item.job.priority-urgent {
    border-left-color: #ef4444;
}

.calendar-item-title {
    font-weight: 600;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 13px;
}

.calendar-item-time {
    font-size: 11px;
    opacity: 0.85;
    font-weight: 500;
}

.calendar-item-location {
    font-size: 10px;
    opacity: 0.75;
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* No Results State */
.no-results {
    background: white;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    padding: 60px 40px;
    text-align: center;
}

.no-results i {
    font-size: 64px;
    color: #cbd5e1;
    margin-bottom: 16px;
}

.no-results p {
    font-size: 15px;
    color: #64748b;
    margin: 0;
}

/* Scrollbar Styling */
.weekly-grid-body::-webkit-scrollbar {
    width: 8px;
}

.weekly-grid-body::-webkit-scrollbar-track {
    background: #f1f5f9;
}

.weekly-grid-body::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

.weekly-grid-body::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Job Attribute Indicators */
.job-attributes-row {
    display: flex;
    gap: 4px;
    margin-top: 4px;
    flex-wrap: wrap;
}

.job-attribute-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
    border: 1.5px solid rgba(255, 255, 255, 0.8);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
    cursor: help;
    transition: transform 0.15s ease;
}

.job-attribute-indicator:hover {
    transform: scale(1.3);
}

/* For scheduled jobs on timeline - smaller, top-right positioned */
.calendar-item .job-attributes-timeline {
    position: absolute;
    top: 4px;
    right: 6px;
    display: flex;
    gap: 3px;
    z-index: 1;
}

.calendar-item .job-attributes-timeline .job-attribute-indicator {
    width: 8px;
    height: 8px;
    border-width: 1px;
}

/* Modal Styles (reuse from My Calendar) */
.modal-overlay {
    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;
    padding: 20px;
}

.modal-container {
    background: white;
    border-radius: 12px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.modal-header {
    padding: 24px;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-title {
    font-size: 20px;
    font-weight: 700;
    color: #0f172a;
    margin: 0;
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    color: #64748b;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: all 0.15s;
}

.modal-close:hover {
    background: #f1f5f9;
    color: #0f172a;
}

.modal-body {
    padding: 24px;
    overflow-y: auto;
    flex: 1;
}

.modal-footer {
    padding: 20px 24px;
    border-top: 1px solid #e2e8f0;
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

/* Responsive adjustments */
@media (max-width: 1200px) {
    .weekly-grid {
        height: calc(100vh - 300px);
    }

    .calendar-item-location {
        display: none;
    }
}

@media (max-width: 768px) {
    .weekly-grid-header,
    .weekly-grid-body {
        grid-template-columns: 60px repeat(7, 1fr);
    }

    .time-header,
    .time-slot {
        font-size: 11px;
        padding: 8px 4px;
    }

    .day-name {
        font-size: 12px;
    }

    .day-date {
        font-size: 10px;
    }

    .calendar-item-title {
        font-size: 11px;
    }

    .calendar-item-time {
        font-size: 10px;
    }
}
