/* ==========================================
   시간표 페이지 전용 스타일
   ========================================== */

/* 접수중/진행중/직전강좌 구분 버튼 (lecture_intro.asp와 동일 톤) */
.timetable-filter-buttons {
    margin: 0 0 15px 0;
    text-align: center;
}
.timetable-filter-btn {
    display: inline-block;
    padding: 10px 20px;
    margin: 0 5px;
    border: 2px solid #ddd;
    background: #fff;
    color: #333;
    font-size: 14px;
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.3s;
}
.timetable-filter-btn:hover {
    background: #e9e9e9;
    border-color: #999;
    color: #333;
}
.timetable-filter-btn.active {
    background: #17479e;
    color: #fff;
    border-color: #17479e;
    font-weight: bold;
}
.timetable-filter-btn.active:hover {
    background: #0d3a7a;
    border-color: #0d3a7a;
    color: #fff;
}

/* 시간표 날짜 범위 제목 스타일 (cont.asp h2와 동일) */
.timetable-period-title {
    font-size: 18px !important;
    font-weight: bold !important;
    color: #17479e !important;
    margin: 30px 0 10px 0 !important;
    padding-bottom: 0 !important;
    border-bottom: none !important;
    display: block !important;
    width: fit-content !important;
    text-align: left !important;
}

/* 시간표 공유 버튼 스타일은 contents.css에서 로드됨 */

/* 시간표 안내 문구 */
.timetable-info-message {
    font-size: 16px;
    color: #d9534f;
    margin: 15px 0 25px 0;
    padding: 12px 20px;
    background-color: #fff5f5;
    border-left: 5px solid #d9534f;
    border-radius: 4px;
    font-weight: 600;
    letter-spacing: -0.02em;
    line-height: 1.6;
    box-shadow: 0 2px 8px rgba(217, 83, 79, 0.15);
    transition: opacity 1s ease, max-height 1s ease, margin 1s ease, padding 1s ease;
    overflow: hidden;
}

.timetable-info-message.hide {
    opacity: 0;
    max-height: 0;
    margin: 0;
    padding: 0;
}

/* 관리자 액션 영역 스타일 */
.admin-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

/* 관리자 액션 버튼 스타일 (다른 페이지와 통일) */
.admin-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: filter 0.2s ease, opacity 0.2s ease;
}

.admin-btn i {
    font-size: 14px;
}

.admin-btn--primary {
    background: #6f4c3e;
    color: #fff;
}

.admin-btn--primary:hover,
.admin-btn--primary:focus {
    filter: brightness(0.95);
}

.admin-btn--danger {
    background: #8f2f24;
    color: #fff;
}

.admin-btn--danger:hover,
.admin-btn--danger:focus {
    filter: brightness(0.95);
}

.admin-btn--muted {
    background: #b9a58f;
    color: #fff;
    cursor: not-allowed;
}

.admin-btn--muted:hover,
.admin-btn--muted:focus {
    filter: none;
}

.admin-btn--static {
    cursor: default;
    background: #cfc4b6;
    color: #5b4638;
}

.admin-btn--static:hover,
.admin-btn--static:focus {
    filter: none;
}

/* 인쇄/저장 버튼 스타일 (다른 페이지와 통일) */
.print-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 18px;
    border-radius: 6px;
    background: #17479e;
    color: #fff;
    text-decoration: none;
    font-size: 14px;
    border: none;
    transition: filter 0.2s ease;
    cursor: pointer;
}

.print-btn:hover,
.print-btn:focus {
    filter: brightness(0.9);
}

.print-btn--disabled {
    background: #d7dbe4;
    color: #666;
    border: none;
    cursor: not-allowed;
}

/* 인쇄 시 숨김 */
@media print {
    /* 헤더 제외 */
    #header_wrap,
    #header,
    #mobile_header,
    .header_in,

    /* 배너 제외 */
    #sub_visual,

    /* 서브 메뉴 제외 */
    #sub_menu,

    /* 서브 타이틀 제외 */
    #sub_tit,

    /* 공유 버튼 제외 */
    .timetable-share-section,

    /* 네비게이션 버튼 제외 */
    .timetable-nav-btn,

    /* 강좌 상세 패널 제외 */
    .lecture-detail-panel,

    /* 인쇄/저장 버튼 및 하단 액션 영역 제외 */
    .print-btn,
    .admin-actions,
    .timetable-action-area,

    /* 풋터 제외 */
    footer,
    #footer,

    /* 상단 이동 버튼 제외 */
    #top_btn,

    /* 기타 인쇄 제외 요소 */
    .no-print {
        display: none !important;
    }

    /* 강좌시간표 콘텐츠 영역 명시적 표시 */
    .scontents.borderLeft {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
        margin: 0 !important;
        padding: 0 !important;
        width: 100% !important;
    }

    /* 강좌시간표 타이틀 포함 */
    .scontents.borderLeft .eng {
        display: block !important;
        visibility: visible !important;
        font-size: 24px !important;
        font-weight: bold !important;
        color: #17479e !important;
        margin: 0 0 15px 0 !important;
        padding-bottom: 10px !important;
        border-bottom: 2px solid #17479e !important;
    }

    /* 기간(일자) 포함 */
    .timetable-period-title {
        display: block !important;
        visibility: visible !important;
        font-size: 18px !important;
        font-weight: bold !important;
        color: #333 !important;
        margin: 0 0 20px 0 !important;
        padding-bottom: 10px !important;
        border-bottom: 1px solid #ddd !important;
    }

    /* 강좌시간표 전체 포함 */
    .timetable_wrap {
        display: block !important;
        visibility: visible !important;
        page-break-inside: avoid;
        margin: 0 !important;
        padding: 0 !important;
        width: 100% !important;
    }

    .timetable-scroll-container {
        display: block !important;
        visibility: visible !important;
        overflow: visible !important;
    }

    .timetable-content {
        display: block !important;
        visibility: visible !important;
        page-break-inside: avoid;
        position: relative !important;
    }

    .lecture-box {
        display: block !important;
        visibility: visible !important;
        page-break-inside: avoid;
    }

    /* 인쇄 시 여백 조정 */
    body {
        margin: 0 !important;
        padding: 20px !important;
    }

    @page {
        margin: 15mm;
    }
}

/* 시간표 래퍼 */
.timetable_wrap {
    width: 100%;
    max-width: 820px;
    margin: 0 auto;
    overflow-x: visible;
    overflow-y: visible;
    padding: 0;
    padding-bottom: 20px;
}

/* 시간표 콘텐츠 영역 - 야간 없음/있음에 따른 높이 (ASP에서 클래스명으로 적용) */
.timetable-content-h760 { min-height: 760px; }
.timetable-content-h1340 { min-height: 1340px; }

/* 시간표 콘텐츠 영역 */
.scontents.borderLeft {
    overflow-x: visible;
    overflow-y: visible;
    padding-left: 0 !important;
}

/* 시간 표시 */
.timeTD {
    color: #6633cc;
    font-size: 12px;
    font-weight: bold;
    text-align: center;
    line-height: 100px;
}

.timeTD[style*="font-weight:normal"] {
    line-height: 100px !important;
    padding-top: 0 !important;
}

/* 요일 헤더 */
.dayweekTD {
    color: #ffffff;
    font-size: 14px;
    font-weight: 600;
    border: none;
    background: linear-gradient(135deg, #6b7c93 0%, #5a6c82 100%);
    padding: 8px 5px;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    letter-spacing: 0.5px;
}

/* 강좌 번호 표시 */
.lectnumTD {
    left: -15px;
    top: -45px;
    height: 80px;
    width: 100px;
    padding-top: 10px;
    position: absolute;
    overflow: none;
    font-family: Arial;
    color: #000000;
    font-size: 60px;
    font-weight: bold;
    opacity: 0.12;
    filter: Alpha(opacity=15);
    z-index: 9999;
}

.over {
    border: 1px solid #FF0000;
}

/* 단위 1회 시간이 짧을 경우 경우 font-size의 숫자를 줄이면 상자의 변형을 바로잡을 수 있음. - 이화춘 */

/* 강좌 박스 공통 스타일 */
.lecture-box {
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15) !important;
    border-radius: 2px !important;
    transition: box-shadow 0.2s ease !important;
}

.lecture-box:hover {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2) !important;
}

.lecture-box table {
    width: 100% !important;
    height: 100% !important;
}

.lecture-box .lectTD0,
.lecture-box .lectTD1,
.lecture-box .lectTD2,
.lecture-box .lectTD3,
.lecture-box .lectTD4,
.lecture-box .lectTD5,
.lecture-box .lectTD6,
.lecture-box .lectTD7,
.lecture-box .lectTD8,
.lecture-box .lectTD9,
.lecture-box .lectTD10,
.lecture-box .lectTD11,
.lecture-box .lectTD12,
.lecture-box .lectTD13,
.lecture-box .lectTD14,
.lecture-box .lectTD15,
.lecture-box .lectTD16,
.lecture-box .lectTD17,
.lecture-box .lectTD18,
.lecture-box .lectTD19,
.lecture-box .lectTD20,
.lecture-box .lectTD21,
.lecture-box .lectTD22,
.lecture-box .lectTD23,
.lecture-box .lectTD24,
.lecture-box .lectTD25,
.lecture-box .lectTD26,
.lecture-box .lectTD27,
.lecture-box .lectTD28,
.lecture-box .lectTD29 {
    padding: 2px !important;
    word-wrap: break-word !important;
    word-break: keep-all !important;
    white-space: normal !important;
    box-sizing: border-box !important;
}

.lecture-box .lectTD0,
.lecture-box .lectTD1,
.lecture-box .lectTD2,
.lecture-box .lectTD3,
.lecture-box .lectTD4,
.lecture-box .lectTD5,
.lecture-box .lectTD6,
.lecture-box .lectTD7,
.lecture-box .lectTD8,
.lecture-box .lectTD9,
.lecture-box .lectTD10,
.lecture-box .lectTD11,
.lecture-box .lectTD12,
.lecture-box .lectTD13,
.lecture-box .lectTD14,
.lecture-box .lectTD15,
.lecture-box .lectTD16,
.lecture-box .lectTD17,
.lecture-box .lectTD18,
.lecture-box .lectTD19,
.lecture-box .lectTD20,
.lecture-box .lectTD21,
.lecture-box .lectTD22,
.lecture-box .lectTD23,
.lecture-box .lectTD24,
.lecture-box .lectTD25,
.lecture-box .lectTD26,
.lecture-box .lectTD27,
.lecture-box .lectTD28,
.lecture-box .lectTD29 {
    font-family: "맑은 고딕", "Malgun Gothic", sans-serif !important;
    color: #333 !important;
}

/* 강좌 박스 스타일 (1번~30번) */
.lectTD0 { color: #333; font-family: "맑은 고딕", "Malgun Gothic", sans-serif; font-size: 17px; font-weight: bold; line-height: 22px; border: 1px solid #e0e0e0; background-color: #ffffff; padding: 2px !important; }
.lectTD1 { color: #333; font-family: "맑은 고딕", "Malgun Gothic", sans-serif; font-size: 17px; font-weight: bold; line-height: 22px; border: 1px solid #e0e0e0; background-color: #fff5f0; padding: 2px !important; }
.lectTD2 { color: #333; font-family: "맑은 고딕", "Malgun Gothic", sans-serif; font-size: 17px; font-weight: bold; line-height: 22px; border: 1px solid #e0e0e0; background-color: #f0f8f0; padding: 2px !important; }
.lectTD3 { color: #333; font-family: "맑은 고딕", "Malgun Gothic", sans-serif; font-size: 17px; font-weight: bold; line-height: 22px; border: 1px solid #e0e0e0; background-color: #e8f4ff; padding: 2px !important; }
.lectTD4 { color: #333; font-family: "맑은 고딕", "Malgun Gothic", sans-serif; font-size: 17px; font-weight: bold; line-height: 22px; border: 1px solid #e0e0e0; background-color: #f0e8ff; padding: 2px !important; }
.lectTD5 { color: #333; font-family: "맑은 고딕", "Malgun Gothic", sans-serif; font-size: 17px; font-weight: bold; line-height: 22px; border: 1px solid #e0e0e0; background-color: #ffe8f5; padding: 2px !important; }
.lectTD6 { color: #333; font-family: "맑은 고딕", "Malgun Gothic", sans-serif; font-size: 17px; font-weight: bold; line-height: 22px; border: 1px solid #e0e0e0; background-color: #f5f0ff; padding: 2px !important; }
.lectTD7 { color: #333; font-family: "맑은 고딕", "Malgun Gothic", sans-serif; font-size: 17px; font-weight: bold; line-height: 22px; border: 1px solid #e0e0e0; background-color: #f5f5f5; padding: 2px !important; }
.lectTD8 { color: #333; font-family: "맑은 고딕", "Malgun Gothic", sans-serif; font-size: 17px; font-weight: bold; line-height: 22px; border: 1px solid #e0e0e0; background-color: #f5f5f5; padding: 2px !important; }
.lectTD9 { color: #333; font-family: "맑은 고딕", "Malgun Gothic", sans-serif; font-size: 17px; font-weight: bold; line-height: 22px; border: 1px solid #e0e0e0; background-color: #f5f5f5; padding: 2px !important; }
.lectTD10 { color: #17479e; font-family: "맑은 고딕", "Malgun Gothic", sans-serif; font-size: 17px; font-weight: bold; line-height: 22px; border: 1px solid #e0e0e0; background-color: #fff9e6; padding: 2px !important; }
.lectTD11 { color: #333; font-family: "맑은 고딕", "Malgun Gothic", sans-serif; font-size: 17px; font-weight: bold; line-height: 22px; border: 1px solid #e0e0e0; background-color: #ffffff; padding: 2px !important; }
.lectTD12 { color: #333; font-family: "맑은 고딕", "Malgun Gothic", sans-serif; font-size: 17px; font-weight: bold; line-height: 22px; border: 1px solid #e0e0e0; background-color: #fff5ff; padding: 2px !important; }
.lectTD13 { color: #333; font-family: "맑은 고딕", "Malgun Gothic", sans-serif; font-size: 17px; font-weight: bold; line-height: 22px; border: 1px solid #e0e0e0; background-color: #f0f8f0; padding: 2px !important; }
.lectTD14 { color: #333; font-family: "맑은 고딕", "Malgun Gothic", sans-serif; font-size: 17px; font-weight: bold; line-height: 22px; border: 1px solid #e0e0e0; background-color: #f0f8f0; padding: 2px !important; }
.lectTD15 { color: #333; font-family: "맑은 고딕", "Malgun Gothic", sans-serif; font-size: 17px; font-weight: bold; line-height: 22px; border: 1px solid #e0e0e0; background-color: #e8f4ff; padding: 2px !important; }
.lectTD16 { color: #333; font-family: "맑은 고딕", "Malgun Gothic", sans-serif; font-size: 17px; font-weight: bold; line-height: 22px; border: 1px solid #e0e0e0; background-color: #e8e0ff; padding: 2px !important; }
.lectTD17 { color: #333; font-family: "맑은 고딕", "Malgun Gothic", sans-serif; font-size: 17px; font-weight: bold; line-height: 22px; border: 1px solid #e0e0e0; background-color: #f5f5f5; padding: 2px !important; }
.lectTD18 { color: #333; font-family: "맑은 고딕", "Malgun Gothic", sans-serif; font-size: 17px; font-weight: bold; line-height: 22px; border: 1px solid #e0e0e0; background-color: #f5f0ff; padding: 2px !important; }
.lectTD19 { color: #333; font-family: "맑은 고딕", "Malgun Gothic", sans-serif; font-size: 17px; font-weight: bold; line-height: 22px; border: 1px solid #e0e0e0; background-color: #ffe8f5; padding: 2px !important; }
.lectTD20 { color: #333; font-family: "맑은 고딕", "Malgun Gothic", sans-serif; font-size: 17px; font-weight: bold; line-height: 30px; border: 1px solid #e0e0e0; background-color: #ffffff; padding: 2px !important; }
.lectTD21 { color: #333; font-family: "맑은 고딕", "Malgun Gothic", sans-serif; font-size: 17px; font-weight: bold; line-height: 30px; border: 1px solid #e0e0e0; background-color: #fff5f0; padding: 2px !important; }
.lectTD22 { color: #333; font-family: "맑은 고딕", "Malgun Gothic", sans-serif; font-size: 17px; font-weight: bold; line-height: 30px; border: 1px solid #e0e0e0; background-color: #f0f8f0; padding: 2px !important; }
.lectTD23 { color: #333; font-family: "맑은 고딕", "Malgun Gothic", sans-serif; font-size: 17px; font-weight: bold; line-height: 30px; border: 1px solid #e0e0e0; background-color: #e8f4ff; padding: 2px !important; }
.lectTD24 { color: #333; font-family: "맑은 고딕", "Malgun Gothic", sans-serif; font-size: 17px; font-weight: bold; line-height: 30px; border: 1px solid #e0e0e0; background-color: #e8e0ff; padding: 2px !important; }
.lectTD25 { color: #333; font-family: "맑은 고딕", "Malgun Gothic", sans-serif; font-size: 17px; font-weight: bold; line-height: 30px; border: 1px solid #e0e0e0; background-color: #f5f5f5; padding: 2px !important; }
.lectTD26 { color: #333; font-family: "맑은 고딕", "Malgun Gothic", sans-serif; font-size: 17px; font-weight: bold; line-height: 30px; border: 1px solid #e0e0e0; background-color: #f5f0ff; padding: 2px !important; }
.lectTD27 { color: #333; font-family: "맑은 고딕", "Malgun Gothic", sans-serif; font-size: 17px; font-weight: bold; line-height: 30px; border: 1px solid #e0e0e0; background-color: #ffe8f5; padding: 2px !important; }
.lectTD28 { color: #333; font-family: "맑은 고딕", "Malgun Gothic", sans-serif; font-size: 17px; font-weight: bold; line-height: 37px; border: 1px solid #e0e0e0; background-color: #fff5e6; padding: 2px !important; }
.lectTD29 { color: #333; font-family: "맑은 고딕", "Malgun Gothic", sans-serif; font-size: 17px; font-weight: bold; line-height: 37px; border: 1px solid #e0e0e0; background-color: #f0fff0; padding: 2px !important; }

.sTD {
    width: 100px;
    color: #FFFFFF;
    font-size: 14px;
    text-align: center;
    font-weight: bold;
    border-left: solid #000000 1pt;
    border-right: solid #000000 1pt;
    border-top: solid #000000 1pt;
    border-bottom: solid #000000 0pt;
    padding-top: 3px;
    background-color: #000000;
}

.unsTD {
    width: 100px;
    color: #000000;
    font-size: 12px;
    text-align: center;
    font-weight: normal;
    border-left: solid #eeeeee 1pt;
    border-right: solid #ffffff 1pt;
    border-top: solid #eeeeee 1pt;
    border-bottom: solid #000000 0pt;
    padding-top: 3px;
    background-color: #eeeeee;
}

.unsTD A:link {
    font-weight: normal;
    color: #828282;
}

.unsTD A:visited {
    font-weight: normal;
    color: #828282;
}

.unsTD A:hover {
    font-weight: bold;
    font-size: 14px;
    color: #ff3300;
}

.srightTD {
    width: 565px;
    color: #5769ce;
    font-size: 12px;
    text-align: left;
    font-weight: bold;
    border: solid #000000 0pt;
    padding-left: 20px;
    background-color: #ffffff;
}

.sbarTD {
    width: 765px;
    height: 5px;
    background-color: #000000;
}

/* ==========================================
   모바일 좌우 스크롤 기능
   ========================================== */

/* 스크롤 컨테이너 - PC에서는 기본 상태 유지 */
.timetable-scroll-container {
    position: relative;
    width: 100%;
    overflow: visible;
}

/* 네비게이션 버튼 - PC/태블릿에서는 완전히 숨김 */
.timetable-nav-btn {
    display: none;
}

/* PC 버전 (769px 이상) - 버튼 완전 비활성화 */
@media screen and (min-width: 769px) {
    .timetable-nav-btn {
        display: none !important;
        visibility: hidden !important;
        opacity: 0 !important;
        pointer-events: none !important;
    }

    .timetable-scroll-container {
        overflow: visible !important;
    }
}

/* 모바일 전용 스타일 (768px 이하) */
@media screen and (max-width: 768px) {
    /* 시간표 래퍼 조정 */
    .timetable_wrap {
        max-width: 100%;
        padding: 0 15px;
        position: relative;
    }

    /* 스크롤 컨테이너 - 모바일에서 좌우 스크롤 활성화 */
    .timetable-scroll-container {
        overflow-x: auto;
        overflow-y: visible;
        -webkit-overflow-scrolling: touch;
        scroll-behavior: smooth;
        padding-bottom: 10px;
        /* 스크롤바 숨기기 */
        scrollbar-width: none; /* Firefox */
        -ms-overflow-style: none; /* IE and Edge */
    }

    .timetable-scroll-container::-webkit-scrollbar {
        display: none; /* Chrome, Safari */
    }

    /* 시간표 컨텐츠 */
    .timetable-content {
        min-width: 820px;
    }

    /* 네비게이션 버튼 스타일 */
    .timetable-nav-btn {
        display: flex;
        align-items: center;
        justify-content: center;
        position: absolute;
        top: 50%;
        transform: translateY(-50%);
        width: 40px;
        height: 40px;
        background-color: rgba(23, 71, 158, 0.9);
        color: white;
        border: none;
        border-radius: 50%;
        font-size: 24px;
        font-weight: bold;
        cursor: pointer;
        z-index: 100;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
        transition: all 0.3s ease;
        opacity: 1;
    }

    .timetable-nav-btn:active {
        background-color: rgba(23, 71, 158, 1);
        transform: translateY(-50%) scale(0.95);
    }

    .timetable-nav-btn.hidden {
        opacity: 0;
        pointer-events: none;
    }

    .timetable-nav-prev {
        left: 5px;
    }

    .timetable-nav-next {
        right: 5px;
    }

    /* 시간표 제목은 스크롤되지 않도록 */
    .timetable-period-title {
        margin-bottom: 15px !important;
    }
}
