@charset "utf-8";
/**
 * KBoard FAQ 게시판 스킨 (자유아카데미)
 * 디자인 기준: assignments 스킨 톤 그대로 차용
 *   - 페이지 배경 #eee, 카드 #fff + #e5e5e5 보더
 *   - 텍스트: #333 / #555 / #999
 *   - 포인트: #C9A86A (금색) / 액션: var(--color-teal)
 *   - 목록은 아코디언(토글): 질문=제목, 답변=내용
 */

/* ================================================================
   페이지 배경
   ================================================================ */
body:has(#kboard-faq-list),
body:has(#kboard-faq-document),
body:has(#kboard-faq-editor) {
    background-color: #eee;
}

#kboard-faq-list,
#kboard-faq-document,
#kboard-faq-editor {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px 100px;
    color: #333;
    font-family: 'Pretendard', 'Noto Sans KR', -apple-system, sans-serif;
    box-sizing: border-box;
}

/* ================================================================
   페이지 타이틀 + 총 개수
   ================================================================ */
#kboard-faq-list .faq-header {
    margin-bottom: 30px;
    border-bottom: 2px solid #e5e5e5;
    padding-bottom: 20px;
}
#kboard-faq-list .faq-title {
    font-size: 28px;
    font-weight: 700;
    margin: 0 0 8px;
    color: #333;
}
#kboard-faq-list .faq-count {
    font-size: 14px;
    color: #666;
    margin: 0;
}
#kboard-faq-list .faq-count strong {
    color: #e74c3c;
}

/* ================================================================
   필터 영역
   ================================================================ */
#kboard-faq-list .faq-filters {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 30px;
}
#kboard-faq-list .faq-filter-form {
    display: flex;
    justify-content: flex-end;
}
#kboard-faq-list .faq-filter-group {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
}
#kboard-faq-list .faq-filter-select,
#kboard-faq-list .faq-filter-input {
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 14px;
    background: #fff;
    color: #333;
    cursor: pointer;
    box-sizing: border-box;
}
#kboard-faq-list .faq-filter-input {
    min-width: 200px;
    cursor: text;
}
#kboard-faq-list .faq-filter-select:focus,
#kboard-faq-list .faq-filter-input:focus {
    outline: none;
    border-color: #888;
}
#kboard-faq-list .faq-filter-button {
    padding: 10px 20px;
    background: #333;
    color: #fff;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
}
#kboard-faq-list .faq-filter-button:hover {
    background: #1a1a1a;
}
#kboard-faq-list .faq-filter-reset {
    padding: 10px 20px;
    background: #fff;
    color: #555;
    border: 1px solid #d5d5d5;
    border-radius: 5px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
}
#kboard-faq-list .faq-filter-reset:hover {
    background: #f7f7f7;
    border-color: #bbb;
    color: #222;
}

@media (max-width: 768px) {
    #kboard-faq-list .faq-filter-form { justify-content: stretch; }
    #kboard-faq-list .faq-filter-group { width: 100%; }
    #kboard-faq-list .faq-filter-input { flex: 1; min-width: 0; }
}

/* ================================================================
   카테고리
   ================================================================ */
.kboard-faq-list-category,
.kboard-faq-list-category-tree {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 30px;
}
.kboard-faq-list-category a,
.kboard-faq-list-category-tree a {
    display: inline-block;
    padding: 6px 14px;
    margin: 4px 6px 4px 0;
    border-radius: 20px;
    background: #fff;
    color: #555;
    border: 1px solid #ddd;
    text-decoration: none !important;
    font-size: 13px;
    transition: all .2s;
}
.kboard-faq-list-category a:hover,
.kboard-faq-list-category-tree a:hover {
    background: #f2f2f2;
    border-color: #bbb;
    color: #333;
}
.kboard-faq-list-category a.active,
.kboard-faq-list-category-tree a.active {
    background: #333;
    color: #fff;
    border-color: #333;
}

/* ================================================================
   FAQ 아코디언 리스트
   ================================================================ */
#kboard-faq-list .kboard-faq-accordion {
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 30px;
}

#kboard-faq-list .faq-item {
    border-bottom: 1px solid #f0f0f0;
}
#kboard-faq-list .faq-item:last-child {
    border-bottom: none;
}

/* 질문(제목) — 토글 버튼 */
#kboard-faq-list .faq-question {
    display: flex;
    align-items: center;
    gap: 14px;
    width: 100%;
    padding: 20px 24px;
    background: #fff;
    border: none;
    text-align: left;
    cursor: pointer;
    transition: background .15s;
    box-sizing: border-box;
}
#kboard-faq-list .faq-question:hover {
    background: #fafafa;
}
#kboard-faq-list .faq-item.is-open .faq-question {
    background: #fafafa;
}

/* Q / A 마커 공통 — 동일 크기/여백, 무채색 미니멀 */
#kboard-faq-list .faq-q-mark,
#kboard-faq-list .faq-a-mark {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    font-size: 14px;
    font-weight: 700;
    line-height: 28px;
    text-align: center;
}
#kboard-faq-list .faq-q-mark {
    background: #333;
    color: #fff;
}
#kboard-faq-list .faq-a-mark {
    background: #f0f0f0;
    color: #555;
}

/* 질문 텍스트 */
#kboard-faq-list .faq-q-text {
    flex: 1;
    min-width: 0;
    font-size: 16px;
    font-weight: 600;
    color: #333;
    line-height: 1.5;
    word-break: keep-all;
    overflow-wrap: anywhere;
}
#kboard-faq-list .faq-q-text img {
    vertical-align: middle;
    margin-right: 4px;
}

/* 화살표 아이콘 */
#kboard-faq-list .faq-arrow {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    color: #bbb;
    transition: transform .25s ease;
}
#kboard-faq-list .faq-item.is-open .faq-arrow {
    transform: rotate(180deg);
    color: #888;
}

/* 답변(내용) — 토글 패널. 질문과 동일한 좌우 여백 */
#kboard-faq-list .faq-answer {
    display: none;
    padding: 0 24px 24px;
    background: #fafafa;
}
#kboard-faq-list .faq-item.is-open .faq-answer {
    display: block;
}
#kboard-faq-list .faq-answer-inner {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding-top: 4px;
}
#kboard-faq-list .faq-a-body {
    flex: 1;
    min-width: 0;
    color: #444;
    font-size: 15px;
    line-height: 1.8;
    padding-top: 2px;
    word-break: keep-all;
    overflow-wrap: anywhere;
}
#kboard-faq-list .faq-a-body img {
    max-width: 100%;
    height: auto;
    border-radius: 6px;
}
#kboard-faq-list .faq-a-body p { margin: 0 0 14px; }
#kboard-faq-list .faq-a-body p:last-child { margin-bottom: 0; }

/* 비밀글 안내 */
#kboard-faq-list .faq-secret-note {
    color: #999;
    font-size: 14px;
    font-style: italic;
}

/* 관리자 컨트롤 (수정/삭제) — 펼친 답변 하단 */
#kboard-faq-list .faq-admin-control {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px dashed #e5e5e5;
}

/* 공지 배지 — 무채색 톤 */
#kboard-faq-list .faq-item.kboard-notice .faq-q-text::before {
    content: '공지';
    display: inline-block;
    margin-right: 6px;
    padding: 2px 7px;
    background: #f0f0f0;
    color: #555;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 700;
    vertical-align: middle;
}

/* 빈 목록 */
#kboard-faq-list .faq-empty {
    padding: 60px 24px;
    text-align: center;
    color: #999;
    font-size: 15px;
}

@media (max-width: 600px) {
    #kboard-faq-list .faq-question { padding: 16px; gap: 10px; }
    #kboard-faq-list .faq-q-text { font-size: 15px; }
    #kboard-faq-list .faq-answer { padding: 0 16px 18px 16px; }
    #kboard-faq-list .faq-a-mark { margin-left: 0; }
}

/* ================================================================
   페이지네이션
   ================================================================ */
.kboard-pagination { margin: 30px 0 20px; }
.kboard-pagination-pages {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    padding: 0;
    list-style: none;
}
.kboard-pagination-pages li { list-style: none; }
.kboard-pagination-pages li a,
.kboard-pagination-pages li span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 4px 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    background: #ffffffe0;
    color: #333333db;
    text-decoration: none;
    font-size: 14px;
    transition: all .3s;
}
.kboard-pagination-pages li a:hover,
.kboard-pagination-pages li.active a,
.kboard-pagination-pages li span.active {
    background: #343436;
    color: #fff;
    border-color: #343436;
    font-weight: 600;
}

/* ================================================================
   버튼 — 미니멀 톤
   ================================================================ */
a.kboard-faq-button-small,
input.kboard-faq-button-small,
button.kboard-faq-button-small {
    display: inline-block;
    padding: 9px 18px;
    background: #fff !important;
    color: #444 !important;
    border: 1px solid #d5d5d5 !important;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none !important;
    cursor: pointer;
    transition: all .15s;
    line-height: 1.4;
    height: auto;
    text-shadow: none;
    box-shadow: none;
    box-sizing: border-box;
}
a.kboard-faq-button-small:hover,
input.kboard-faq-button-small:hover,
button.kboard-faq-button-small:hover {
    background: #f7f7f7 !important;
    border-color: #bbb !important;
    color: #222 !important;
    opacity: 1;
}
/* 삭제 버튼 — 위험 톤 */
a.kboard-faq-button-small.faq-btn-delete:hover {
    background: #fff5f5 !important;
    border-color: #fca5a5 !important;
    color: #d64a4e !important;
}

/* 'FAQ 등록' 버튼 — 강조 (미니멀 다크) */
.kboard-control {
    text-align: right;
    margin: 20px 0 0;
}
.kboard-control a.kboard-faq-button-small {
    background: #2e2e2e !important;
    color: #fff !important;
    border-color: #2e2e2e !important;
    padding: 11px 26px;
    font-weight: 600;
}
.kboard-control a.kboard-faq-button-small:hover {
    background: #1a1a1a !important;
    border-color: #1a1a1a !important;
    color: #fff !important;
}

/* ================================================================
   본문 보기 (document.php) — 단독 페이지로 열릴 때 사용
   ================================================================ */
#kboard-faq-document {
    max-width: 900px;
}
#kboard-faq-document .kboard-document-wrap {
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 10px;
    padding: 32px;
    margin-bottom: 20px;
}
#kboard-faq-document .kboard-title h1 {
    font-size: 24px;
    font-weight: 700;
    color: #333;
    margin: 0;
    line-height: 1.4;
}
#kboard-faq-document .kboard-title h1::before {
    content: 'Q';
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    margin-right: 10px;
    border-radius: 50%;
    background: #C9A86A;
    color: #fff;
    font-size: 16px;
    vertical-align: middle;
}
#kboard-faq-document .kboard-detail {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 16px;
    margin-top: 16px;
    padding: 14px 0;
    border-top: 1px solid #f0f0f0;
    border-bottom: 1px solid #f0f0f0;
}
#kboard-faq-document .kboard-detail .detail-attr {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 13px;
}
#kboard-faq-document .kboard-detail .detail-name { color: #999; }
#kboard-faq-document .kboard-detail .detail-value { color: #555; font-weight: 500; }
#kboard-faq-document .kboard-detail .detail-category1 .detail-name,
#kboard-faq-document .kboard-detail .detail-category2 .detail-name,
#kboard-faq-document .kboard-detail [class*="detail-tree-category"] .detail-name {
    display: inline-block;
    padding: 3px 10px;
    background: rgba(201,168,106,.1);
    color: #C9A86A;
    border-radius: 12px;
    font-weight: 600;
}
#kboard-faq-document .kboard-content { margin-top: 24px; }
#kboard-faq-document .kboard-content .content-view {
    color: #333;
    line-height: 1.8;
    font-size: 15px;
    min-height: 60px;
}
#kboard-faq-document .kboard-content .content-view img {
    max-width: 100%;
    height: auto;
    border-radius: 6px;
}
#kboard-faq-document .kboard-content .content-view p { margin: 0 0 16px; }

#kboard-faq-document .kboard-attach {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #f0f0f0;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
#kboard-faq-document .kboard-button-download {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: #f8f9fa;
    border: 1px solid #e5e5e5;
    border-radius: 6px;
    color: #555;
    font-size: 13px;
    cursor: pointer;
    transition: all .15s;
}
#kboard-faq-document .kboard-button-download:hover {
    background: rgba(201,168,106,.08);
    border-color: #C9A86A;
    color: #C9A86A;
}

#kboard-faq-document .kboard-comments-area {
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 10px;
    padding: 28px 32px;
    margin-bottom: 20px;
}
#kboard-faq-document .kboard-comments-area textarea {
    width: 100%;
    min-height: 90px;
    padding: 12px 14px;
    border: 1px solid #ddd;
    border-radius: 6px;
    background: #fff;
    color: #333;
    font-size: 14px;
    box-sizing: border-box;
    resize: vertical;
    font-family: inherit;
}
#kboard-faq-document .kboard-comments-area textarea:focus {
    outline: none;
    border-color: #C9A86A;
}

#kboard-faq-document .kboard-document-navi {
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 20px;
}
#kboard-faq-document .kboard-document-navi > div { border-bottom: 1px solid #f0f0f0; }
#kboard-faq-document .kboard-document-navi > div:last-child { border-bottom: none; }
#kboard-faq-document .kboard-document-navi a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 24px;
    color: #555;
    text-decoration: none;
    font-size: 14px;
    transition: background .15s;
}
#kboard-faq-document .kboard-document-navi a:hover { background: #fafbfc; color: #C9A86A; }
#kboard-faq-document .kboard-document-navi .navi-arrow { color: #bbb; font-weight: 700; flex-shrink: 0; }
#kboard-faq-document .kboard-document-navi .navi-document-title {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
#kboard-faq-document .kboard-next-document a { justify-content: flex-end; }

#kboard-faq-document .kboard-control {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    margin-top: 20px;
    flex-wrap: wrap;
}
#kboard-faq-document .kboard-control .left,
#kboard-faq-document .kboard-control .right {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

/* ================================================================
   글 작성/편집 폼 (editor.php)
   ================================================================ */
#kboard-faq-editor {
    max-width: 1000px;
}
#kboard-faq-editor .kboard-form {
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    padding: 30px;
}
#kboard-faq-editor h3,
#kboard-faq-editor .kboard-editor-title {
    font-size: 22px;
    font-weight: 700;
    color: #333;
    margin: 0 0 20px;
}
#kboard-faq-editor .kboard-attr-row { margin-bottom: 20px; }
#kboard-faq-editor .kboard-attr-row .attr-name {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #555;
    margin-bottom: 8px;
}
#kboard-faq-editor .kboard-attr-row .attr-name .field-name { color: #333; }
#kboard-faq-editor .kboard-attr-row .attr-required-text { color: #e74c3c; margin-left: 4px; }
#kboard-faq-editor .kboard-attr-row .attr-value { width: 100%; }
#kboard-faq-editor .kboard-attr-row .description { margin-top: 6px; color: #999; font-size: 12px; }

#kboard-faq-editor input[type="text"],
#kboard-faq-editor input[type="password"],
#kboard-faq-editor input[type="email"],
#kboard-faq-editor input[type="number"],
#kboard-faq-editor input[type="url"],
#kboard-faq-editor input[type="file"],
#kboard-faq-editor select,
#kboard-faq-editor textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #ddd;
    border-radius: 5px;
    background: #fff;
    color: #333;
    font-size: 14px;
    box-sizing: border-box;
    font-family: inherit;
}
#kboard-faq-editor input[type="text"]:focus,
#kboard-faq-editor input[type="password"]:focus,
#kboard-faq-editor textarea:focus,
#kboard-faq-editor select:focus {
    outline: none;
    border-color: #C9A86A;
}

#kboard-faq-editor .attr-value-option {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-right: 16px;
    font-size: 13px;
    color: #555;
    cursor: pointer;
}
#kboard-faq-editor .attr-value-option input[type="checkbox"] { width: auto; margin: 0; }

#kboard-faq-editor .kboard-control {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid #f0f0f0;
    flex-wrap: wrap;
}
#kboard-faq-editor .kboard-control .left,
#kboard-faq-editor .kboard-control .right {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}
#kboard-faq-editor .kboard-control .right button.kboard-faq-button-small {
    background: #2e2e2e !important;
    color: #fff !important;
    border-color: #2e2e2e !important;
    padding: 11px 26px;
    font-weight: 600;
}
#kboard-faq-editor .kboard-control .right button.kboard-faq-button-small:hover {
    background: #1a1a1a !important;
    border-color: #1a1a1a !important;
}

/* 필수표시(*) 중복 제거 */
#kboard-faq-editor .required label:after,
#kboard-faq-document .required label:after,
#kboard-faq-list .required label:after {
    content: "" !important;
    display: none !important;
}
#kboard-faq-editor .attr-required-text { color: #e74c3c; margin-left: 2px; }

/* ================================================================
   confirm 페이지
   ================================================================ */
#kboard-faq-editor.confirm {
    max-width: 480px;
    margin: 60px auto;
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    padding: 30px;
    text-align: center;
}
#kboard-faq-editor.confirm input[type="password"] { margin: 10px 0; }

/* ================================================================
   "Powered by KBoard" 숨김
   ================================================================ */
.kboard-faq-poweredby,
.kboard-default-poweredby {
    display: none !important;
}
