@charset "utf-8";

/* ==========================================================================
   CCSC Schedule Board Skin CSS (Category-Driven & Centered)
   ========================================================================== */

.schedule_container,
.schedule_write_wrap,
.schedule_view_wrap {
    width: 100%;
    max-width: 1240px;
    margin: 0 auto;
    padding: 30px 16px 80px;
    font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: #333333;
    box-sizing: border-box;
}

.schedule_container *,
.schedule_write_wrap *,
.schedule_view_wrap * {
    box-sizing: border-box;
}

/* 1. 상단 월 이동 및 타이틀 */
.content-calendar-tab {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin: 10px 0 32px;
    text-align: center;
}

.content-calendar-tab #title_calendar {
    font-size: 32px;
    font-weight: 800;
    color: #1e293b;
    letter-spacing: -0.5px;
    min-width: 240px;
}

.content-calendar-tab .btn-prev-month,
.content-calendar-tab .btn-next-month {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background-color: #ffffff;
    color: #475569;
    font-size: 26px;
    line-height: 1;
    text-decoration: none;
    transition: all 0.2s ease;
    border: 1px solid #cbd5e1;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04);
}

.content-calendar-tab .btn-prev-month:hover,
.content-calendar-tab .btn-next-month:hover {
    background-color: #0284c7;
    color: #ffffff;
    border-color: #0284c7;
    box-shadow: 0 4px 8px rgba(2, 132, 199, 0.25);
    transform: translateY(-1px);
}

.content-calendar-tab .blind {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
}

/* 2. 컨트롤 바 (카테고리 셀렉트박스 & 뷰 토글 & 글쓰기) */
.schedule-ctrl-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 24px;
    padding-bottom: 18px;
    border-bottom: 1px solid #e2e8f0;
}

.schedule-ctrl-bar .ctrl-left {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.schedule-ctrl-bar .skinSelectBox {
    height: 44px;
    padding: 0 40px 0 16px;
    font-size: 15px;
    font-weight: 600;
    color: #1e293b;
    background: #ffffff url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E") no-repeat right 14px center;
    background-size: 16px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.schedule-ctrl-bar .skinSelectBox:focus {
    border-color: #0284c7;
    box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.15);
}

.view-type-toggle {
    display: inline-flex;
    background-color: #f1f5f9;
    padding: 4px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.view-type-toggle .btn-view-toggle {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 16px;
    font-size: 14px;
    font-weight: 600;
    color: #64748b;
    text-decoration: none;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.view-type-toggle .btn-view-toggle.active {
    background-color: #ffffff;
    color: #0f172a;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.schedule-ctrl-bar .ctrl-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

.btn-schedule-write {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 44px;
    padding: 0 20px;
    background-color: #0284c7;
    color: #ffffff !important;
    font-size: 14px;
    font-weight: 700;
    border-radius: 8px;
    text-decoration: none;
    transition: background-color 0.2s ease, box-shadow 0.2s ease, transform 0.15s ease;
}

.btn-schedule-write:hover {
    background-color: #0369a1;
    box-shadow: 0 4px 10px rgba(2, 132, 199, 0.3);
    transform: translateY(-1px);
}

.btn-schedule-admin {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background-color: #ffffff;
    border: 1px solid #cbd5e1;
    color: #64748b;
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.2s ease;
}

.btn-schedule-admin:hover {
    background-color: #f8fafc;
    color: #0f172a;
    border-color: #94a3b8;
}

/* 3. 범례 (Legend Bar) */
.calendar-legend {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 18px;
    margin-bottom: 20px;
}

.calendar-legend .legend-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    color: #475569;
    font-weight: 600;
}

.legend-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    font-size: 0;
    line-height: 0;
    flex-shrink: 0;
}

.badge-custom-cat {
    display: inline-block;
    padding: 4px 10px;
    font-size: 12px;
    font-weight: 700;
    border-radius: 6px;
    line-height: 1.2;
}

/* 4. 달력 테이블 뷰 */
.calendar-table-wrap {
    width: 100%;
    overflow-x: auto;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 12px -2px rgba(0, 0, 0, 0.05);
    background-color: #ffffff;
}

.calendar-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
}

.calendar-table caption {
    display: none;
}

.calendar-table thead th {
    height: 52px;
    background-color: #f8fafc;
    border-bottom: 2px solid #e2e8f0;
    border-right: 1px solid #e2e8f0;
    font-size: 16px;
    font-weight: 700;
    color: #334155;
    text-align: center;
    vertical-align: middle;
}

.calendar-table thead th:last-child {
    border-right: none;
}

.calendar-table thead th.th-sun {
    color: #ef4444;
}

.calendar-table thead th.th-sat {
    color: #2563eb;
}

.calendar-table tbody td {
    height: 135px;
    min-height: 135px;
    vertical-align: top;
    border-bottom: 1px solid #e2e8f0;
    border-right: 1px solid #e2e8f0;
    padding: 8px 10px;
    position: relative;
    background-color: #ffffff;
    transition: background-color 0.15s ease;
}

.calendar-table tbody td:last-child {
    border-right: none;
}

.calendar-table tbody td.empty {
    background-color: #fcfcfc;
}

.calendar-table tbody td.col-sun .day-number {
    color: #ef4444;
}

.calendar-table tbody td.col-sat .day-number {
    color: #2563eb;
}

.calendar-table tbody td.today {
    background-color: #f0fdf4;
}

.calendar-table tbody td.today .day-number {
    font-weight: 800;
    color: #16a34a;
}

.calendar-table tbody td .cell-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 6px;
}

.calendar-table tbody td .day-number {
    font-size: 15px;
    font-weight: 700;
    color: #1e293b;
    display: inline-block;
}

.today-badge {
    display: inline-block;
    padding: 1px 7px;
    background-color: #16a34a;
    color: #ffffff;
    font-size: 11px;
    font-weight: 700;
    border-radius: 10px;
}

.calendar-table tbody td.admin-clickable {
    cursor: pointer;
}

.calendar-table tbody td.admin-clickable:hover {
    background-color: #f8fafc;
}

.btn-add-day-event {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border-radius: 4px;
    background-color: #f1f5f9;
    color: #64748b;
    font-size: 10px;
    line-height: 1;
    text-decoration: none;
    transition: all 0.2s ease;
    border: 1px solid #cbd5e1;
}

.btn-add-day-event:hover {
    background-color: #0284c7;
    color: #ffffff;
    border-color: #0284c7;
}

.events-wrapper {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.event-chip {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 7px;
    background-color: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 5px;
    text-decoration: none;
    color: #1e293b;
    transition: all 0.15s ease;
    overflow: hidden;
}

.event-chip:hover {
    background-color: #eff6ff;
    border-color: #93c5fd;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.event-chip .legend-dot {
    width: 8px;
    height: 8px;
}

.event-chip .event-title {
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.3;
}

.more-badge {
    display: inline-block;
    font-size: 11px;
    color: #0284c7;
    font-weight: 700;
    text-decoration: none;
    padding: 2px 4px;
    margin-top: 2px;
}

.more-badge:hover {
    text-decoration: underline;
}

/* 5. 목록 뷰 (List View) */
.schedule-list-ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.schedule-list-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 26px;
    background-color: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.03);
}

.schedule-list-item:hover {
    border-color: #0284c7;
    box-shadow: 0 8px 16px -2px rgba(2, 132, 199, 0.1);
    transform: translateY(-2px);
}

.list-item-left {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 110px;
}

.list-item-main {
    flex: 1;
    padding: 0 24px;
}

.list-item-main .list-subject {
    display: block;
    font-size: 18px;
    font-weight: 700;
    color: #1e293b;
    text-decoration: none;
    margin-bottom: 8px;
    transition: color 0.15s ease;
}

.list-item-main .list-subject:hover {
    color: #0284c7;
}

.list-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 18px;
    font-size: 13.5px;
    color: #64748b;
}

.list-meta span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.list-item-btn .btn-detail-view {
    display: inline-flex;
    align-items: center;
    padding: 9px 18px;
    font-size: 13.5px;
    font-weight: 700;
    color: #0284c7;
    background-color: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 6px;
    text-decoration: none;
    transition: all 0.2s ease;
}

.list-item-btn .btn-detail-view:hover {
    background-color: #0284c7;
    color: #ffffff;
}

.no-schedule {
    text-align: center;
    padding: 70px 20px;
    background-color: #f8fafc;
    border-radius: 12px;
    border: 1px dashed #cbd5e1;
    color: #94a3b8;
}

.no-schedule i {
    font-size: 44px;
    margin-bottom: 14px;
    color: #cbd5e1;
}

.no-schedule p {
    font-size: 16px;
    margin: 0;
    font-weight: 500;
}

/* 6. 모달 팝업 */
.schedule-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(3px);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.schedule-modal-content {
    background-color: #ffffff;
    border-radius: 16px;
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    animation: modalPop 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalPop {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(10px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid #f1f5f9;
}

.modal-header h4 {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    color: #1e293b;
}

.modal-close-btn {
    background: none;
    border: none;
    font-size: 26px;
    color: #94a3b8;
    cursor: pointer;
    line-height: 1;
    padding: 0;
    transition: color 0.15s ease;
}

.modal-close-btn:hover {
    color: #0f172a;
}

.modal-body {
    padding: 24px;
}

.modal-info-col {
    width: 100%;
}

.modal-badges {
    display: flex;
    gap: 6px;
    margin-bottom: 10px;
}

.modal-title {
    margin: 0 0 16px 0;
    font-size: 20px;
    font-weight: 800;
    color: #0f172a;
    line-height: 1.4;
}

.modal-dl {
    margin: 0;
    display: grid;
    grid-template-columns: 80px 1fr;
    gap: 10px 12px;
    font-size: 14px;
}

.modal-dl dt {
    font-weight: 700;
    color: #64748b;
}

.modal-dl dd {
    margin: 0;
    color: #1e293b;
}

.modal-content-text {
    line-height: 1.6;
    max-height: 160px;
    overflow-y: auto;
    background-color: #f8fafc;
    padding: 10px;
    border-radius: 6px;
    border: 1px solid #f1f5f9;
}

.modal-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    padding: 16px 24px;
    background-color: #f8fafc;
    border-top: 1px solid #f1f5f9;
    border-radius: 0 0 16px 16px;
}

.btn-modal-primary {
    padding: 9px 18px;
    background-color: #0284c7;
    color: #ffffff;
    font-size: 14px;
    font-weight: 700;
    border-radius: 6px;
    text-decoration: none;
    transition: background-color 0.15s ease;
}

.btn-modal-primary:hover {
    background-color: #0369a1;
}

.btn-modal-secondary {
    padding: 9px 18px;
    background-color: #ffffff;
    border: 1px solid #cbd5e1;
    color: #475569;
    font-size: 14px;
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.btn-modal-secondary:hover {
    background-color: #f1f5f9;
    color: #0f172a;
}

/* 7. 작성 페이지 (write.skin.php) 스타일 */
.schedule_write_wrap {
    background: #ffffff;
    border-radius: 12px;
    padding: 30px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.02);
}

.schedule_form_title {
    font-size: 24px;
    font-weight: 800;
    color: #0f172a;
    margin-bottom: 24px;
    padding-bottom: 14px;
    border-bottom: 2px solid #0284c7;
}

.schedule_input_box {
    background-color: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 24px;
    margin-bottom: 24px;
}

.schedule_input_box .box_subtitle {
    margin: 0 0 18px 0;
    font-size: 16px;
    font-weight: 700;
    color: #0284c7;
    display: flex;
    align-items: center;
    gap: 8px;
}

.form_row_grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 14px;
}

.form_col {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.frm_label {
    font-size: 14px;
    font-weight: 700;
    color: #334155;
}

.frm_label .req {
    color: #ef4444;
}

.frm_input, .frm_select {
    width: 100%;
    height: 44px;
    padding: 0 14px;
    font-size: 14px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    background-color: #ffffff;
    outline: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.frm_input:focus, .frm_select:focus {
    border-color: #0284c7;
    box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.15);
}

.write_div {
    margin-bottom: 18px;
}

/* 8. 상세 보기 (view.skin.php) 스타일 */
.schedule_view_wrap {
    background: #ffffff;
    border-radius: 12px;
    padding: 30px;
    border: 1px solid #e2e8f0;
}

.schedule_view_header {
    margin-bottom: 24px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e2e8f0;
}

.header_badge_box {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
}

.schedule_view_header #bo_v_title {
    font-size: 26px;
    font-weight: 800;
    color: #0f172a;
    line-height: 1.4;
    margin: 0;
}

.schedule_meta_card {
    background-color: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 20px 24px;
    margin-bottom: 24px;
}

.schedule_meta_grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 14px 20px;
    margin: 0;
}

.meta_row dt {
    font-size: 13px;
    font-weight: 700;
    color: #64748b;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.meta_row dd {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
    color: #1e293b;
}

.schedule_link_box {
    display: flex;
    align-items: center;
    gap: 10px;
    background-color: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 8px;
    padding: 12px 18px;
    margin-bottom: 24px;
    font-size: 14px;
}

.schedule_link_box a {
    color: #0284c7;
    text-decoration: none;
    word-break: break-all;
}

.schedule_link_box a:hover {
    text-decoration: underline;
}

.schedule_text_wrap {
    font-size: 15px;
    line-height: 1.8;
    color: #334155;
    min-height: 150px;
    margin-bottom: 30px;
}

/* 9. 반응형 미디어 쿼리 */
@media (max-width: 768px) {
    .schedule_container,
    .schedule_write_wrap,
    .schedule_view_wrap {
        padding: 20px 12px 50px;
    }

    .content-calendar-tab #title_calendar {
        font-size: 22px;
        min-width: 170px;
    }

    .content-calendar-tab .btn-prev-month,
    .content-calendar-tab .btn-next-month {
        width: 36px;
        height: 36px;
        font-size: 20px;
    }

    .schedule-ctrl-bar {
        flex-direction: column;
        align-items: stretch;
    }

    .schedule-ctrl-bar .ctrl-left,
    .schedule-ctrl-bar .ctrl-right {
        justify-content: space-between;
        width: 100%;
    }

    .schedule-ctrl-bar .skinSelectBox {
        width: 100%;
    }

    .calendar-table tbody td {
        height: 90px;
        min-height: 90px;
        padding: 4px;
    }

    .calendar-table tbody td .day-number {
        font-size: 12px;
    }

    .event-chip .event-title {
        font-size: 11px;
    }

    .form_row_grid {
        grid-template-columns: 1fr;
    }

    .schedule_list-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .list-item-main {
        padding: 0;
    }

    .list-item-btn {
        width: 100%;
    }

    .list-item-btn .btn-detail-view {
        width: 100%;
        justify-content: center;
    }
}