/* 달력 뷰 스타일 */

/* 달력 컨트롤 */
.calendar-controls {
    margin-bottom: 30px;
}

.calendar-filters {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.calendar-filters .form-select {
    flex: 1;
    min-width: 200px;
}

.calendar-navigation {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

.calendar-title {
    margin: 0;
    font-size: 24px;
    font-weight: 700;
    color: #1f2937;
    min-width: 180px;
    text-align: center;
}

/* 달력 통계 */
.calendar-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
    padding: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
}

.stat-item {
    text-align: center;
    color: white;
}

.stat-label {
    display: block;
    font-size: 14px;
    margin-bottom: 8px;
    opacity: 0.9;
}

.stat-value {
    display: block;
    font-size: 32px;
    font-weight: 700;
}

/* 달력 그리드 */
.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 1px;
    background: #e5e7eb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 30px;
}

/* 요일 헤더 */
.calendar-day-header {
    background: #f9fafb;
    padding: 12px;
    text-align: center;
    font-weight: 600;
    font-size: 14px;
    color: #374151;
    border-bottom: 2px solid #e5e7eb;
}

.calendar-day-header.sunday {
    color: #ef4444;
}

.calendar-day-header.saturday {
    color: #3b82f6;
}

/* 날짜 셀 */
.calendar-day {
    background: white;
    min-height: 120px;
    padding: 8px;
    position: relative;
    cursor: default;
    transition: background-color 0.2s;
}

.calendar-day.empty {
    background: #f9fafb;
    min-height: 120px;
}

.calendar-day.sunday {
    background: #fef2f2;
}

.calendar-day.saturday {
    background: #eff6ff;
}

.calendar-day.today {
    background: #fef3c7;
    border: 2px solid #f59e0b;
}

.calendar-day.has-leave {
    background: #f0fdf4;
}

.calendar-day.has-leave.sunday {
    background: linear-gradient(135deg, #fef2f2 0%, #f0fdf4 100%);
}

.calendar-day.has-leave.saturday {
    background: linear-gradient(135deg, #eff6ff 0%, #f0fdf4 100%);
}

/* 날짜 번호 */
.date-number {
    font-size: 16px;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 8px;
}

.sunday .date-number {
    color: #ef4444;
}

.saturday .date-number {
    color: #3b82f6;
}

.today .date-number {
    color: #f59e0b;
    font-size: 18px;
}

/* 연차 컨테이너 */
.leave-container {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

/* 연차 항목 */
.leave-item {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

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

/* 연차 타입별 색상 */
.leave-full {
    background: #dbeafe;
    color: #1e40af;
    border-left: 3px solid #3b82f6;
}

.leave-half {
    background: #e0e7ff;
    color: #4338ca;
    border-left: 3px solid #6366f1;
}

.leave-quarter {
    background: #fce7f3;
    color: #9f1239;
    border-left: 3px solid #ec4899;
}

.leave-birthday_half {
    background: #f3e8ff;
    color: #6b21a8;
    border-left: 3px solid #a855f7;
}

.leave-happy_quarter {
    background: #fef3c7;
    color: #92400e;
    border-left: 3px solid #f59e0b;
}

.leave-refresh {
    background: #d1fae5;
    color: #065f46;
    border-left: 3px solid #10b981;
}

.leave-unpaid_full,
.leave-unpaid_half,
.leave-unpaid_quarter {
    background: #f3f4f6;
    color: #4b5563;
    border-left: 3px solid #9ca3af;
    border-style: dashed;
}

.leave-family_event {
    background: #fee2e2;
    color: #991b1b;
    border-left: 3px solid #ef4444;
}

.leave-hourly {
    background: #e0f2fe;
    color: #075985;
    border-left: 3px solid #0ea5e9;
}

/* 범례 */
.calendar-legend {
    padding: 20px;
    background: #f9fafb;
    border-radius: 8px;
}

.calendar-legend h4 {
    margin: 0 0 15px 0;
    font-size: 16px;
    color: #374151;
}

.legend-items {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.legend-badge {
    width: 40px;
    height: 20px;
    border-radius: 4px;
    display: inline-block;
}

/* 연차 상세 모달 */
.modal-small {
    max-width: 500px;
}

.leave-detail-item {
    padding: 12px 0;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.leave-detail-item:last-child {
    border-bottom: none;
}

.leave-detail-item strong {
    min-width: 120px;
    color: #6b7280;
    font-weight: 600;
}

.badge {
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

.badge-full {
    background: #dbeafe;
    color: #1e40af;
}

.badge-half {
    background: #e0e7ff;
    color: #4338ca;
}

.badge-quarter {
    background: #fce7f3;
    color: #9f1239;
}

.badge-birthday_half {
    background: #f3e8ff;
    color: #6b21a8;
}

.badge-happy_quarter {
    background: #fef3c7;
    color: #92400e;
}

.badge-refresh {
    background: #d1fae5;
    color: #065f46;
}

.badge-unpaid_full,
.badge-unpaid_half,
.badge-unpaid_quarter {
    background: #f3f4f6;
    color: #4b5563;
}

.badge-family_event {
    background: #fee2e2;
    color: #991b1b;
}

.badge-hourly {
    background: #e0f2fe;
    color: #075985;
}

.status-badge {
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

.status-pending {
    background: #fef3c7;
    color: #92400e;
}

.status-approved {
    background: #d1fae5;
    color: #065f46;
}

.status-rejected {
    background: #fee2e2;
    color: #991b1b;
}

.status-cancel_requested {
    background: #fef3c7;
    color: #92400e;
}

.status-cancelled {
    background: #f3f4f6;
    color: #4b5563;
}

/* 반응형 디자인 */
@media (max-width: 1200px) {
    .calendar-grid {
        gap: 1px;
    }
    
    .calendar-day {
        min-height: 100px;
    }
    
    .leave-item {
        font-size: 11px;
        padding: 3px 6px;
    }
}

@media (max-width: 768px) {
    .calendar-title {
        font-size: 18px;
        min-width: 140px;
    }
    
    .calendar-navigation {
        flex-direction: column;
    }
    
    .calendar-day {
        min-height: 80px;
        padding: 6px;
    }
    
    .date-number {
        font-size: 14px;
    }
    
    .leave-item {
        font-size: 10px;
        padding: 2px 4px;
    }
    
    .calendar-stats {
        grid-template-columns: 1fr;
    }
    
    .legend-items {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .calendar-day-header {
        padding: 8px 4px;
        font-size: 12px;
    }
    
    .calendar-day {
        min-height: 60px;
        padding: 4px;
    }
    
    .date-number {
        font-size: 12px;
        margin-bottom: 4px;
    }
    
    .leave-container {
        gap: 2px;
    }
    
    .leave-item {
        font-size: 9px;
        padding: 2px 3px;
    }
}
