/* 주간 스케줄 반응형 개선 CSS */

/* 기존 스타일 오버라이드 */
.schedule-week-wrapper {
    position: relative;
    overflow: hidden;
    width: 100%;
    max-width: 100%;
    background: #f8f9fa;
    border-radius: 8px;
    padding: 10px 0;
    margin: 0 auto;
}

.schedule-week {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 10px 40px !important; /* 좌우 패딩 추가로 스크롤 버튼 공간 확보 */
    cursor: grab;
    user-select: none;
    scrollbar-width: none;
    -ms-overflow-style: none;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch; /* iOS 스크롤 개선 */
}

.schedule-week::-webkit-scrollbar {
    display: none;
}

/* 날짜 아이템 반응형 */
.day-item {
    flex: 0 0 auto !important;
    width: clamp(120px, 15vw, 150px) !important; /* 반응형 너비 */
    min-width: unset !important;
    background: white;
    border-radius: 8px;
    padding: 12px;
    transition: all 0.3s ease;
    border: 2px solid #e9ecef;
    position: relative;
    cursor: pointer;
}

.day-item:hover {
    background: #f8f9fa;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.day-item.today {
    background: #e3f2fd;
    border-color: #2196f3;
    box-shadow: 0 2px 8px rgba(33, 150, 243, 0.3);
}

/* 스크롤 버튼 개선 */
.scroll-button {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.95);
    border: 1px solid #ddd;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 3;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    font-size: 18px;
    color: #666;
}

.scroll-button:hover {
    background: white;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    color: #333;
}

.scroll-button.left {
    left: 5px;
}

.scroll-button.right {
    right: 5px;
}

/* 페이드 효과 */
.schedule-week-wrapper::before,
.schedule-week-wrapper::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    width: 40px;
    pointer-events: none;
    z-index: 2;
}

.schedule-week-wrapper::before {
    left: 0;
    background: linear-gradient(to right, rgba(248,249,250,1), rgba(248,249,250,0));
}

.schedule-week-wrapper::after {
    right: 0;
    background: linear-gradient(to left, rgba(248,249,250,1), rgba(248,249,250,0));
}

/* 날짜 정보 크기 조정 */
.day-date {
    font-size: 22px !important;
}

.day-schedules {
    min-height: 100px;
    max-height: 150px;
    overflow-y: auto;
    padding: 5px;
}

.day-schedules::-webkit-scrollbar {
    width: 3px;
}

.schedule-item-mini {
    font-size: 11px;
    padding: 6px 8px;
}

.schedule-item-mini .schedule-user {
    font-size: 11px;
}

.schedule-item-mini .schedule-content {
    font-size: 10px;
}

/* 태블릿 반응형 */
@media (max-width: 768px) {
    .schedule-week {
        padding: 10px 35px !important;
    }
    
    .day-item {
        width: clamp(100px, 25vw, 120px) !important;
    }
    
    .day-date {
        font-size: 18px !important;
    }
    
    .day-schedules {
        min-height: 80px;
        max-height: 120px;
    }
    
    .scroll-button {
        width: 30px;
        height: 30px;
        font-size: 14px;
    }
    
    .schedule-week-wrapper::before,
    .schedule-week-wrapper::after {
        width: 30px;
    }
}

/* 모바일 반응형 */
@media (max-width: 480px) {
    .day-item {
        width: clamp(90px, 30vw, 110px) !important;
        padding: 8px;
    }
    
    .day-name {
        font-size: 12px;
    }
    
    .day-date {
        font-size: 16px !important;
    }
    
    .day-month {
        font-size: 10px;
    }
    
    .day-schedules {
        min-height: 70px;
        max-height: 100px;
    }
    
    .schedule-item-mini {
        font-size: 10px;
        padding: 4px 6px;
    }
    
    .schedule-item-mini .schedule-user {
        font-size: 10px;
    }
    
    .schedule-item-mini .schedule-content {
        font-size: 9px;
    }
}

/* 터치 디바이스 최적화 */
@media (hover: none) and (pointer: coarse) {
    .day-item:active {
        transform: scale(0.98);
    }
    
    .scroll-button {
        width: 40px;
        height: 40px;
    }
}

/* 메인 콘텐츠 영역 overflow 수정 */
.main-content {
    overflow-x: hidden !important;
    max-width: 100% !important;
}

/* 대시보드 섹션 최대 너비 제한 */
.dashboard-section {
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}