/**
 * Calendar Styles
 * Styles for calendar views and components
 */

/* Calendar Month View */
.calendar-month {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 1px;
    background-color: #e9ecef;
    border: 1px solid #dee2e6;
    border-radius: 0.375rem;
    overflow: hidden;
}

.calendar-header {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    background-color: #f8f9fa;
    font-weight: 600;
    font-size: 0.875rem;
    color: #6c757d;
}

.calendar-day-header {
    padding: 0.75rem;
    text-align: center;
    border-right: 1px solid #dee2e6;
}

.calendar-day-header:last-child {
    border-right: none;
}

.calendar-body {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    grid-template-rows: repeat(6, 1fr);
    min-height: 600px;
    gap: 1px;
    background-color: #e9ecef;
}

.calendar-day {
    background-color: white;
    border: none;
    padding: 0.5rem;
    min-height: 100px;
    height: 100%;
    cursor: pointer;
    transition: background-color 0.2s;
    display: flex;
    flex-direction: column;
}

.calendar-day:hover {
    background-color: #f8f9fa;
}

.calendar-day.other-month {
    background-color: #f8f9fa;
    color: #6c757d;
}

.calendar-day.today {
    background-color: #e3f2fd;
    font-weight: 600;
}

.calendar-day.today .day-number {
    background-color: #2196f3;
    color: white;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.25rem;
}

.day-number {
    font-weight: 600;
    margin-bottom: 0.25rem;
    font-size: 0.875rem;
    color: #495057;
}

.day-items {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    flex: 1;
    overflow: hidden;
}

.item-card {
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 0.25rem;
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.2s;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    margin-bottom: 0.125rem;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

.item-card:hover {
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transform: translateY(-1px);
}

.item-card.task {
    border-left: 3px solid #28a745;
}

.item-card.event {
    border-left: 3px solid #007bff;
}

.item-title {
    font-weight: 600;
    margin-bottom: 0.125rem;
}

.item-time {
    font-size: 0.625rem;
    color: #6c757d;
}

.more-items {
    font-size: 0.625rem;
    color: #6c757d;
    font-style: italic;
}

/* Calendar Week View */
.calendar-week {
    display: flex;
    flex-direction: column;
    height: 600px;
    border: 1px solid #dee2e6;
    border-radius: 0.375rem;
    overflow: hidden;
}

.week-header {
    display: grid;
    grid-template-columns: 60px repeat(7, 1fr);
    background-color: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
}

.week-header .time-column {
    padding: 0.75rem;
    border-right: 1px solid #dee2e6;
}

.week-header .day-column {
    padding: 0.75rem;
    text-align: center;
    border-right: 1px solid #dee2e6;
}

.week-header .day-column:last-child {
    border-right: none;
}

.week-header .day-column.today {
    background-color: #e3f2fd;
    font-weight: 600;
}

.day-name {
    font-size: 0.875rem;
    color: #6c757d;
    margin-bottom: 0.25rem;
}

.day-number {
    font-size: 1.25rem;
    font-weight: 600;
}

.week-body {
    display: grid;
    grid-template-columns: 60px repeat(7, 1fr);
    flex: 1;
    overflow-y: auto;
}

.week-body .time-column {
    background-color: #f8f9fa;
    border-right: 1px solid #dee2e6;
}

.week-body .day-column {
    border-right: 1px solid #dee2e6;
    position: relative;
}

.week-body .day-column:last-child {
    border-right: none;
}

.week-body .day-column.today {
    background-color: #f8f9fa;
}

.time-slot {
    height: 60px;
    padding: 0.25rem;
    font-size: 0.75rem;
    color: #6c757d;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    align-items: center;
}

.timeline-item {
    position: absolute;
    left: 0;
    right: 0;
    background-color: white;
    border: 1px solid #dee2e6;
    border-radius: 0.25rem;
    margin: 0 2px;
    padding: 0.25rem;
    cursor: pointer;
    transition: all 0.2s;
    overflow: hidden;
}

.timeline-item:hover {
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    z-index: 10;
}

.timeline-item.task {
    border-left: 3px solid #28a745;
}

.timeline-item.event {
    border-left: 3px solid #007bff;
}

.timeline-item-content {
    font-size: 0.75rem;
}

.timeline-item-content .item-title {
    font-weight: 600;
    margin-bottom: 0.125rem;
}

.timeline-item-content .item-description {
    color: #6c757d;
    font-size: 0.625rem;
    margin-bottom: 0.125rem;
}

.timeline-item-content .item-time {
    color: #6c757d;
    font-size: 0.625rem;
}

/* Calendar Day View */
.calendar-day-view {
    display: flex;
    flex-direction: column;
    height: 600px;
    border: 1px solid #dee2e6;
    border-radius: 0.375rem;
    overflow: hidden;
}

.day-header {
    display: grid;
    grid-template-columns: 60px 1fr;
    background-color: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
}

.day-header .time-column {
    padding: 0.75rem;
    border-right: 1px solid #dee2e6;
}

.day-header .events-column {
    padding: 0.75rem;
}

.day-body {
    display: grid;
    grid-template-columns: 60px 1fr;
    flex: 1;
    overflow-y: auto;
}

.day-body .time-column {
    background-color: #f8f9fa;
    border-right: 1px solid #dee2e6;
}

.day-body .events-column {
    position: relative;
}

/* Calendar Year View */
.calendar-year {
    padding: 1rem;
}

.year-header {
    text-align: center;
    margin-bottom: 2rem;
}

.year-header h4 {
    font-size: 2rem;
    font-weight: 600;
    color: #495057;
}

.year-body {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
}

.month-mini {
    border: 1px solid #dee2e6;
    border-radius: 0.375rem;
    overflow: hidden;
}

.month-header {
    background-color: #f8f9fa;
    padding: 0.75rem;
    text-align: center;
    font-weight: 600;
    border-bottom: 1px solid #dee2e6;
}

.month-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 1px;
    background-color: #e9ecef;
}

.mini-day {
    background-color: white;
    padding: 0.25rem;
    text-align: center;
    font-size: 0.75rem;
    cursor: pointer;
    transition: background-color 0.2s;
}

.mini-day:hover {
    background-color: #f8f9fa;
}

.mini-day.other-month {
    background-color: #f8f9fa;
    color: #6c757d;
}

.mini-day.today {
    background-color: #e3f2fd;
    font-weight: 600;
}

/* Calendar Schedule View */
.calendar-schedule {
    padding: 1rem;
}

.schedule-header {
    margin-bottom: 1.5rem;
}

.schedule-header h5 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #495057;
}

.schedule-day {
    margin-bottom: 2rem;
    border: 1px solid #dee2e6;
    border-radius: 0.375rem;
    overflow: hidden;
}

.schedule-day .day-header {
    background-color: #f8f9fa;
    padding: 1rem;
    border-bottom: 1px solid #dee2e6;
    display: block !important;
    grid-template-columns: none !important;
}

.schedule-day .day-header h6 {
    margin: 0;
    font-weight: 600;
    color: #495057;
    width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.schedule-day .day-items {
    padding: 1rem;
}

.schedule-item {
    display: flex;
    align-items: flex-start;
    padding: 0.75rem;
    border: 1px solid #dee2e6;
    border-radius: 0.375rem;
    margin-bottom: 0.75rem;
    cursor: pointer;
    transition: all 0.2s;
}

.schedule-item:hover {
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transform: translateY(-1px);
}

.schedule-item.task {
    border-left: 4px solid #28a745;
}

.schedule-item.event {
    border-left: 4px solid #007bff;
}

.schedule-item .item-time {
    min-width: 120px;
    font-size: 0.875rem;
    color: #6c757d;
    margin-right: 1rem;
}

.schedule-item .item-content {
    flex: 1;
}

.schedule-item .item-title {
    font-weight: 600;
    margin-bottom: 0.25rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.schedule-item .item-description {
    color: #6c757d;
    font-size: 0.875rem;
    margin-bottom: 0.25rem;
}

.schedule-item .item-project {
    font-size: 0.75rem;
    font-weight: 500;
}

/* (removed) Calendar 4 Days View */

/* Responsive Design */
@media (max-width: 768px) {
    .calendar-month {
        font-size: 0.75rem;
    }
    
    .calendar-day {
        min-height: 60px;
        padding: 0.25rem;
    }
    
    .item-card {
        font-size: 0.625rem;
        padding: 0.125rem 0.25rem;
    }
    
    .year-body {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .week-header,
    .week-body {
        grid-template-columns: 50px repeat(7, 1fr);
    }
    
    /* (removed) 4 days responsive columns */
    
    .time-slot {
        height: 50px;
        font-size: 0.625rem;
    }
}

@media (max-width: 576px) {
    .year-body {
        grid-template-columns: 1fr;
    }
    
    .week-header,
    .week-body {
        grid-template-columns: 40px repeat(7, 1fr);
    }
    
    /* (removed) 4 days responsive columns */
    
    .time-slot {
        height: 40px;
        font-size: 0.5rem;
    }
    
    .schedule-item {
        flex-direction: column;
    }
    
    .schedule-item .item-time {
        min-width: auto;
        margin-right: 0;
        margin-bottom: 0.5rem;
    }
}
