/* 단일 페이지 레이아웃 스타일 - 수정본 */  

/* 기본 설정 */
:root {
    --primary-color: #0d6efd;
    --secondary-color: #6c757d;
    --light-color: #f8f9fa;
    --dark-color: #212529;
    --border-color: #dee2e6;
    --success-color: #198754;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
    --border-radius: 0.375rem;
    --transition-speed: 0.3s;
}

body {
    font-family: 'Noto Sans KR', sans-serif;
    background-color: #f5f5f5;
    color: var(--dark-color); 
    overflow-x: hidden;
}

/* 단일 페이지 레이아웃 - 강제 수평 배치 */
.single-page-layout {
    display: flex;
    flex-direction: row !important; /* 강제 수평 배치 */
    gap: 20px;
    min-height: 600px;
    width: 100%;
}

/* 섹션 스타일 - 명확한 너비 지정 */
.schedule-section {
    flex: 1;
    width: 48% !important;
    min-width: 48%;
    padding: 0 15px;
    transition: width var(--transition-speed) ease;
}

.papers-section {
    flex: 1;
    width: 48% !important;
    min-width: 48%;
    padding: 0 15px;
    transition: width var(--transition-speed) ease;
}

/* 구분선 */
.divider {
    width: 1px;
    min-width: 1px;
    background-color: #dee2e6;
    margin: 0 10px;
}

/* 섹션 제목 */
.section-title {
    font-size: 1.5rem;
    font-weight: 500;
    color: #212529;
    padding-bottom: 10px;
    border-bottom: 2px solid #0d6efd;
    margin-bottom: 20px;
}

/* 카드 스타일 */
.card {
    border: none;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    margin-bottom: 20px;
}

.card-header {
    padding: 0.75rem 1rem;
    font-weight: 500;
}

.session-info-card {
    transition: transform 0.2s, box-shadow 0.2s;
}

.session-info-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.1) !important;
}

/* 테이블 스타일 */
.table {
    margin-bottom: 0;
}

.table th {
    font-weight: 500;
    color: var(--dark-color);
}

.schedule-table-container {
    max-height: 750px;
    overflow-y: auto;
}

/* 빈 일정 플레이스홀더 */
.empty-schedule-placeholder {
    background-color: rgba(13, 110, 253, 0.03);
}

.empty-slot-text { 
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
    color: var(--secondary-color);
}

/* 논문 카드 스타일 */
.paper-card {
    position: relative;
    cursor: move; /* Fallback for older browsers */
    cursor: -webkit-grab;
    cursor: default;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    background-color: white;
    margin-bottom: 8px;
    -webkit-user-select: none;
    user-select: none;
    touch-action: none;
    -webkit-tap-highlight-color: transparent;
    will-change: transform;
	padding: 0;  
}

.paper-card .card-body {
    padding: 1rem;
    width: 100%;
    padding-left: 32px;  /* handle 폭(24px) + 여유(8px) */
}

.paper-card .card-title {
    font-size: 1rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
    line-height: 1.4;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}
.paper-card a {
  user-select: auto !important;
  touch-action: manipulation !important;
  pointer-events: auto !important;
  cursor: pointer !important;
}


/* Dragging state */
.dragging {
    opacity: 0.9;
    background-color: #f8f9fa;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

/* Remove hover effects on mobile */
@media (hover: none) {
    .paper-card:hover,
    .paper-card:active {
        transform: none;
        box-shadow: none;
    }
    
    .paper-card::after {
        display: none;
    }
}

/* Mobile specific styles */
@media (max-width: 767.98px) {
    .paper-card {
        margin-bottom: 4px;
        border: 1px solid #dee2e6;
    }
    
    .paper-card.dragging {
        opacity: 0.9;
    }
    
    .schedule-table-container {
        -webkit-overflow-scrolling: touch;
    }
    
    .task-list {
        padding: 8px;
        min-height: 50px;
    }
}

/* Task list container */
.task-list {
    list-style: none;
    padding: 10px;  
    margin: 0;
    min-height: 50px;
    margin-bottom: 50px;
    max-height: 80vh;
  	overflow-y: auto;
  
         /* ✅ 스크롤 제스처 허용  touch-action: auto !important;*/
         /* ✅ IE 대응 -ms-touch-action: auto !important; */
    -webkit-user-select: auto !important;

	/* ✅ 모바일 스크롤 최적화 */
	-webkit-overflow-scrolling: touch;    /* iOS 자연 스크롤 */
	overscroll-behavior: contain;
	
	/* ✅ 스크롤바 항상 보이게 유도 (일부 브라우저) */
	scrollbar-gutter: stable both-edges;    
	
	touch-action: pan-y; /* 세로 스크롤만 허용 */
    -ms-touch-action: pan-y;
}
.task-list::-webkit-scrollbar {
  width: 30px;  /* 스크롤바 폭 조절 (기본: 6~8px) */
}

.task-list::-webkit-scrollbar-thumb {
  background-color: rgba(100, 100, 100, 0.6);  /* 색상 */
  border-radius: 8px;
  border: 4px solid transparent;              /* 안쪽 간격처럼 보이게 */
  background-clip: content-box;
}

.task-list::-webkit-scrollbar-track {
  background-color: rgba(240, 240, 240, 0.3);
}

.slot-list {
    list-style: none;
    padding: 10px;  
    margin: 0;
    min-height: 50px;
    margin-bottom: 50px;
    max-height: 80vh;
  	overflow-y: auto;
  
         /* ✅ 스크롤 제스처 허용  touch-action: auto !important;*/
         /* ✅ IE 대응 -ms-touch-action: auto !important; */
    -webkit-user-select: auto !important;

	/* ✅ 모바일 스크롤 최적화 */
	-webkit-overflow-scrolling: touch;    /* iOS 자연 스크롤 */
	overscroll-behavior: contain;
	
	/* ✅ 스크롤바 항상 보이게 유도 (일부 브라우저) */
	scrollbar-gutter: stable both-edges;    
	
	touch-action: pan-y; /* 세로 스크롤만 허용 */
    -ms-touch-action: pan-y;
}
.slot-list::-webkit-scrollbar {
  width: 30px;  /* 스크롤바 폭 조절 (기본: 6~8px) */
}

.slot-list::-webkit-scrollbar-thumb {
  background-color: rgba(100, 100, 100, 0.6);  /* 색상 */
  border-radius: 8px;
  border: 4px solid transparent;              /* 안쪽 간격처럼 보이게 */
  background-clip: content-box;
}

.slot-list::-webkit-scrollbar-track {
  background-color: rgba(240, 240, 240, 0.3);  
}

/* Remove all transitions and animations for better performance */
.paper-card,
.paper-card:hover,
.paper-card.dragging,
.drag-handle,
.drag-handle:hover {
    transition: none;
    transform: none;
    animation: none;
}

/* Optimize touch scrolling */
.schedule-table-container,
.paper-list-container {
  max-height: 80vh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}  

.scrollable-paper-list {
  max-height: 75vh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  box-shadow: inset 0 -20px 20px -20px rgba(0, 0, 0, 0.08); /* 아래 흐림 */

  padding-right: 10px; /* 내부 콘텐츠가 스크롤바에 겹치지 않게 */
  scrollbar-width: auto; /* Firefox 대응 */
  margin-bottom: 20px; 
}

.scrollable-paper-list::-webkit-scrollbar {
  width: 25px;  
}

.scrollable-paper-list::-webkit-scrollbar-thumb {
  background-color: rgba(0, 0, 0, 0.3);
  border-radius: 8px;
  border: 4px solid rgba(0, 0, 0, 0); /* 배경과 분리되게 */
  background-clip: padding-box;
}

.scrollable-paper-list::-webkit-scrollbar-track {
  background-color: rgba(0, 0, 0, 0.05);
}


/* Remove unnecessary visual effects */
.drop-zone-active,
.drag-over {
    background-color: transparent;
    border: none;
}

/* 드래그 핸들 */
.drag-handle {
    position: absolute;
    top: 0.5rem;
    left: 0.5rem;
    width: 28px;
    height: 28px;
    border-radius: 0%;
    background-color: rgba(13, 110, 253, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: grab;
    transition: background-color 0.2s;
    z-index: 5;
}

.drag-handle:hover {
    background-color: rgba(13, 110, 253, 0.2);
}

.drag-handle i {
    color: var(--primary-color);
}
*/

/* 드래그 앤 드롭 스타일 */
.draggable {
    cursor: default;
}

/* 드래그 방향 표시 - 우→좌 */
.paper-card::after {
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    position: absolute;  
    left: 10px;
    bottom: 10px;
    color: rgba(13, 110, 253, 0.3);
    font-size: 1.2rem;
    opacity: 0;
    transition: opacity 0.2s, transform 0.2s;
    pointer-events: none;
}

.paper-card:hover::after {
    opacity: 1;
    transform: translateX(-5px);
}

/* 토스트 메시지 */
.toast {
    border: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.toast-header {
    border-bottom: none;
}

/* 태블릿 도움말 오버레이 - 수정 */
.tablet-help-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
}

.tablet-help-overlay.show {
    opacity: 1;
    pointer-events: auto;
}

.tablet-help-content {
    background-color: white;
    border-radius: 12px;
    max-width: 90%;
    max-height: 80%;
    overflow-y: auto;
    padding: 24px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.tablet-help-item {
    display: flex;
    margin-bottom: 20px;
    align-items: center;
}

.tablet-help-icon {
    font-size: 2rem;
    margin-right: 16px;
    color: var(--primary-color);
    width: 60px;
    text-align: center;
}

.tablet-help-text {
    flex: 1;
}

.tablet-help-text h4 {
    margin-bottom: 8px;
}

/* 반응형 디자인 - 수정 */
@media (max-width: 991.98px) {
    /* 태블릿 레이아웃 - 수평 유지 */
    .single-page-layout {
        flex-direction: row !important;
    }
    
    .schedule-section, .papers-section {
        padding: 0 10px;
    }
    
    /* 드래그 핸들 크기 증가 */
    .drag-handle {
        width: 36px;
        height: 36px;
    }
}

/* 모바일에서만 수직 레이아웃 적용 */
@media (max-width: 767.98px) {
    /* 모바일 레이아웃 - 수직 배치로 변경 */
    .single-page-layout {
        flex-direction: column !important;
    }
    
    .schedule-section, .papers-section {
        width: 100% !important;
        padding: 0;
    }
    
    /* 구분선 수평으로 변경 */
    .divider {
        width: 100%;
        height: 1px;
        margin: 20px 0;
    }
    
    /* 드래그 방향 힌트 수정 */
    .paper-card::after {
        left: auto;
        right: 10px;
    }
    
    .paper-card:hover::after {
        transform: translateY(-5px);
    }
}

/* 태블릿 터치 최적화 */
@media (hover: none) and (pointer: coarse) {
    /* 터치 디바이스에서 드래그 힌트 항상 표시 */
    .paper-card::after {
        opacity: 0.7;
        left: 15px;
        bottom: 15px;
        font-size: 1.4rem;
    }
    
    /* 터치 타겟 크기 증가 */
    .drag-handle {
        width: 44px;
        height: 44px;
    }
    
    /* 드롭 영역 시각적 표시 강화 */
    .empty-slot-text {
        padding: 20px;
        font-size: 1.1rem;
    }
    
    .empty-slot-text i {
        font-size: 2.5rem;
        margin-bottom: 15px;
    }
}
#quickTimeInput {
  display: none;
  position: fixed;
  top: 30%;
  left: 50%;
  transform: translate(-50%, -30%);
  background: #fff;
  padding: 1.5rem 2rem;
  border: 1px solid #ccc;
  border-radius: 12px;
  z-index: 9999;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
  width: 320px;
  font-family: 'Segoe UI', sans-serif;
}
#quickTimeInput h4 {
  text-align: center;
  margin-bottom: 1rem;
  color: #333;
}

#quickTimeInput .form-row {
  display: flex;
  flex-direction: column;
  margin-bottom: 1rem;
}

#quickTimeInput label {
  margin-bottom: 0.3rem;
  font-weight: 600;
  color: #555;
}

#quickTimeInput input[type="time"] {
  padding: 0.5rem;
  font-size: 1rem;
  border: 1px solid #ccc;
  border-radius: 6px;
}

#quickTimeInput .button-row {
  display: flex;
  justify-content: space-between;
  margin-top: 1rem;
}

#quickTimeInput button {
  padding: 0.5rem 1rem;
  font-size: 1rem;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.3s;
}

#quickTimeApply {
  background-color: #007bff;
  color: white;
}

#quickTimeApply:hover {
  background-color: #0056b3;
}

#quickTimeCancel {
  background-color: #dee2e6;
  color: #333;
}

#quickTimeCancel:hover {
  background-color: #c6cbd0;
}

.drag-handle {
  position: absolute;
  top: 0;
  left: 0;
  width: 24px;         /* 원하는 handle 폭 */
  height: 100%;        /* 카드 전체 높이 */
  cursor: grab;
  /* 시각적 표시: hover 시 배경색 살짝 줘도 좋습니다 */
  /* background-color: rgba(0,0,0,0.05); */
  z-index: 1;
}
