﻿/* 공통 버튼 및 페이지네이션 */
.board-theme .board-pages > span.prev,
.board-theme .board-pages > span.next {
    cursor: pointer;
    color: #666;
    padding: 10px;
}

/* =========================================
   1. Board List (목록 페이지)
   ========================================= */
.board-theme .theme-list {
    font-family: 'Noto Sans KR', 돋움, Dotum, sans-serif;
    overflow: hidden;
    width: 100%;
}

.board-theme .theme-list .list-categories { margin-bottom: 12px; }
.board-theme .theme-list .list-categories .category-group { vertical-align: top; }
.board-theme .theme-list .list-categories .category-group:hover button { background-color: #e6e6e6; border-color: #adadad; }
.board-theme .theme-list .list-categories .category-group .category-btn { margin-bottom: 2px; }
.board-theme .theme-list .list-categories .category-group .addon-btn { padding-left: 5px; padding-right: 5px; }
.board-theme .theme-list .list-categories .category-group ul { min-width: 100%; padding: 0; margin: 0; border-radius: 0; }
.board-theme .theme-list .list-categories .category-group ul li:last-child { border-bottom: 0; }
.board-theme .theme-list .list-categories .category-group ul li a { cursor: pointer; font-size: 12px; padding: 6px 12px; }
.board-theme .theme-list .list-categories .category-group ul li.selected a { background: #eee; }

.board-theme .theme-list table { border-top: 2px solid #333; }
.board-theme .theme-list table th,
.board-theme .theme-list table td { font-size: 15px; text-align: center; padding: 14px; border-bottom: 1px solid #eaeaea; }
.board-theme .theme-list table th { background: #fcfcfc; min-width: 70px; font-weight: 600; }
.board-theme .theme-list table th.document-title { width: 50%; }
.board-theme .theme-list table td.document-title { text-align: left; }
.board-theme .theme-list table tr.notice td.document-no,
.board-theme .theme-list table tr.notice td.document-title { font-weight: 600; background: #f9fbff; }
.board-theme .theme-list table tr td.document-added_file { padding-top: 5px; padding-bottom: 5px; }
.board-theme .theme-list table tr td.document-added_file .file-ico { display: inline-block; width: 30px; height: 30px; background: #333; margin-top: 5px; }
.board-theme .theme-list table th input,
.board-theme .theme-list table td input { margin: 0; }
.board-theme .theme-list table tbody td.document-title a { color: #333; text-align: left; text-decoration: none; }
.board-theme .theme-list table tbody td.document-title a:hover { text-decoration: underline; color: #1a5298; }
.board-theme .theme-list table tbody td.document-title a.comment-count { color: #ff6b6b; margin-left: 6px; font-weight: 600; }
.board-theme .theme-list table tbody td.document-title span.reserved { background: #444; color: #fff; padding: 2px 4px; margin-left: 6px; border-radius: 3px; font-size: 12px; }

.board-theme .theme-list .no-document { text-align: center; padding: 40px 0; color: #999; }

.board-theme.list .board-pages { padding: 30px 0; text-align: center; max-width: 1040px; margin: 0 auto; }
.board-theme.list .board-pages > span { padding: 0 5px; }
.board-theme.list .board-pages > span.page { margin-bottom: 5px; cursor: pointer; font-size: 14px; border-radius: 4px; padding: 6px 12px; }
.board-theme.list .board-pages > span.page:hover { background: #f0f0f0; }


/* =========================================
   2. Board Detail (상세보기 페이지)
   ========================================= */
.board-theme .theme-detail .detail-top { background: #fbfbfb; padding: 20px; border-top: 2px solid #333; border-bottom: 1px solid #eaeaea; display: inline-block; width: 100%; }
.board-theme .theme-detail .detail-top .document-title { float: left; color: #222; overflow: hidden; font-weight: 600; font-size: 1.2rem; }
.board-theme .theme-detail .detail-top .document-title .category { margin-right: 5px; color: #1a5298; }
.board-theme .theme-detail .detail-top .document-regdate { float: right; color: #777; font-size: 0.95rem; }
.board-theme .theme-detail .detail-upper { padding: 12px 20px; border-bottom: 1px solid #eaeaea; display: inline-block; width: 100%; background: #fff; color: #555; font-size: 0.95rem; }
.board-theme .theme-detail .detail-upper .document-writer { float: left; }
.board-theme .theme-detail .detail-upper .document-readed_count { float: right; }
.board-theme .detail-content { padding: 30px 20px; background-color: #fff; word-break: break-all; font-size: 16px; line-height: 1.6; color: #333; }


/* =========================================
   3. Board Write / Form (신청폼 디자인)
   ========================================= */
.board-theme .theme-write {
    padding: 30px;
    background: #ffffff; /* 깔끔한 흰색 배경 */
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05); /* 세련된 그림자 효과 */
    border: 1px solid #eaeaea;
}

.board-theme .theme-write .document-title {
    margin-bottom: 20px;
}

.board-theme .theme-write .document-extended_keys {
    margin-top: 15px;
}

/* 입력 폼 테이블 세련되게 변경 */
.board-theme .theme-write .document-extended_keys table {
    width: 100%;
    border-collapse: collapse;
    border-top: 2px solid #333; /* 상단 포인트 라인 */
    border-left: none;
    border-right: none;
}

.board-theme .theme-write .document-extended_keys table tr {
    border-bottom: 1px solid #eaeaea;
}

/* 항목명 (TH) 디자인 */
.board-theme .theme-write .document-extended_keys table tr th {
    background: #f8f9fa; /* 은은한 회색 배경 */
    color: #333;
    font-size: 1rem !important;
    font-weight: 600;
    padding: 18px 15px;
    text-align: left; /* 좌측 정렬이 더 모던함 */
    width: 15%;
    vertical-align: middle;
    border: none;
}

/* 입력칸 (TD) 디자인 */
.board-theme .theme-write .document-extended_keys table tr td {
    padding: 12px 15px;
    vertical-align: middle;
    border: none;
}

/* 텍스트 입력창 공통 세팅 */
.form-control {
    font-size: 0.95rem;
    height: 42px; /* 터치하기 편한 높이 */
    padding: 10px 15px;
    border: 1px solid #ced4da;
    border-radius: 4px; /* 살짝 둥근 모서리 */
    box-shadow: none;
    transition: border-color 0.2s, box-shadow 0.2s;
    width: 100%;
    color: #333;
}

.form-control:focus {
    border-color: #1a5298;
    outline: none;
    box-shadow: 0 0 0 3px rgba(26, 82, 152, 0.1); /* 포커스 시 세련된 링 효과 */
}

.board-theme .theme-write .document-extended_keys table tr td textarea.form-control {
    height: auto;
    min-height: 120px;
    resize: vertical;
    line-height: 1.5;
}

/* 체크박스 / 라디오 버튼 정렬 */
.pt1[data-type="checkbox"], 
.pt1[data-type="radio"] {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: center;
}

.checkbox-inline, .radio-inline {
    margin: 0;
    font-size: 0.95rem;
    color: #444;
    cursor: pointer;
}

.checkbox-inline input, .radio-inline input {
    margin-right: 6px;
    cursor: pointer;
}


/* =========================================
   4. Responsive (반응형 미디어쿼리)
   ========================================= */

/* (1) 해상도 1499px 이하 (큰 데스크탑 ~ 노트북) */
@media (max-width: 1499px) {
    .board-theme .theme-write {
        padding: 25px;
    }
}

/* (2) 해상도 1199px 이하 (태블릿 가로 ~ 일반 노트북) */
@media (max-width: 1199px) {
    .board-theme .theme-write .document-extended_keys table tr th {
        width: 18%; /* 공간 확보를 위해 타이틀 너비 조정 */
    }
}

/* (3) 해상도 992px 이하 (일반 태블릿) */
@media (max-width: 992px) {
    .board-theme .theme-write {
        padding: 20px;
    }
    .board-theme .theme-write .document-extended_keys table tr th {
        width: 25%;
    }
}

/* (4) 해상도 767px 이하 (모바일 스마트폰) - ★가장 극적인 변화 구간 */
@media (max-width: 767px) {
    /* 기존 리스트 숨김 처리 유지 */
    .board-theme .theme-list table thead,
    .board-theme .theme-list table td { display: none; }
    .board-theme .theme-list table td.document-category,
    .board-theme .theme-list table td.document-title { display: table-cell; }
    .board-theme .theme-detail .detail-top .document-title { width: 100%; }
    
    /* 폼 테이블을 세로 정렬(Stack) 구조로 변경하여 쾌적한 모바일 뷰 제공 */
    .board-theme .theme-write .document-extended_keys table,
    .board-theme .theme-write .document-extended_keys table tbody,
    .board-theme .theme-write .document-extended_keys table tr,
    .board-theme .theme-write .document-extended_keys table th,
    .board-theme .theme-write .document-extended_keys table td {
        display: block;
        width: 100% !important;
    }
    
    .board-theme .theme-write .document-extended_keys table tr {
        padding: 10px 0;
    }
    
    .board-theme .theme-write .document-extended_keys table tr th {
        background: transparent;
        padding: 10px 15px 5px 15px;
        font-size: 1rem;
        border: none;
    }
    
    .board-theme .theme-write .document-extended_keys table tr td {
        padding: 0 15px 10px 15px;
    }

    /* 모바일에서 버튼 영역 여백 확보 */
    .board-actions-left, .board-actions-right {
        float: none;
        display: block;
        text-align: center;
        margin-bottom: 10px;
    }
    
    .btn-group {
        display: flex;
        justify-content: center;
        gap: 10px;
    }
}