@charset "UTF-8";

/*
    시스템 관리 > Q&A (bit/system/qna)
    - 모달 프레임(mskin) 은 modal_skin.css 공통. 여기서는 목록 칩 + 상세 박스만 정의한다.
*/

/* ── 목록 : 제목 말줄임 ─────────────────────────── */
#system_qna .sq-td-title {
    max-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
#system_qna .sq-file-icon { width: 16px; height: 16px; vertical-align: middle; }

/* ── 칩(유형 / 답변상태) ───────────────────────── */
#system_qna .chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.4;
    color: #495057;
    background: #f1f3f5;
    white-space: nowrap;
}
#system_qna .chip i {
    width: 6px; height: 6px; border-radius: 50%;
    background: #adb5bd; flex: none;
}
#system_qna .chip.question_add     { background: #e6f4ea; color: #1b7a37; }
#system_qna .chip.question_add i    { background: #28a745; }
#system_qna .chip.question_update  { background: #fff8e1; color: #9a7400; }
#system_qna .chip.question_update i { background: #ffc107; }
#system_qna .chip.question_delete  { background: #fce8ea; color: #b02a37; }
#system_qna .chip.question_delete i { background: #dc3545; }
#system_qna .chip.question         { background: #e7f1ff; color: #0a58ca; }
#system_qna .chip.question i        { background: #007bff; }
#system_qna .chip.question_other   { background: #f1f3f5; color: #495057; }
#system_qna .chip.question_other i  { background: #6c757d; }
#system_qna .chip.success          { background: #e6f4ea; color: #1b7a37; }
#system_qna .chip.success i         { background: #28a745; }
#system_qna .chip.warning          { background: #fdecec; color: #c0392b; }
#system_qna .chip.warning i         { background: #e74c3c; }

/* ── 상세 모달 프레임 : 너비 + 본문 스크롤 체인 (system/hist 방식) ── */
#system_qna_detailModal .modal-dialog {
    width: 760px;
    max-width: calc(100vw - 32px);
    max-height: 85vh;
}
/* 상속된 .modal-content padding(20px) 제거 → 질문/답변 박스가 모달 가장자리에서 14px 만 떨어지게 */
#system_qna_detailModal .modal-content { padding: 0; }
/* 바깥 카드는 테두리 없이 flush — 테두리는 안쪽 질문/답변 박스가 담당. flex column 은 스크롤용. */
#system_qna_detailModal .modal__card {
    margin: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    display: flex;
    flex-direction: column;
}
/* 카드 → section_content(SimpleBar) 로 남은 높이를 넘겨 내부에서만 스크롤되게 */
#system_qna_detailModal .section_content {
    flex: 1 1 auto;
    min-height: 0;
}

/* ── 푸터 : 버튼 네모(사각) + 우측 정렬 ── */
#system_qna_detailModal .modal-footer { justify-content: flex-end; }
#system_qna_detailModal .modal-footer__actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-left: auto;
}
#system_qna_detailModal .modal-footer .btn,
#system_qna_detailModal .modal-footer .btn.round--btn {
    border-radius: 4px;
}

/* ── 상세 모달 본문 ───────────────────────────── */
#system_qna_detailModal .sq-detail-body { padding: 14px; }

#system_qna_detailModal .sq-box {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 14px;
}
#system_qna_detailModal .sq-box:last-child { margin-bottom: 0; }
#system_qna_detailModal .sq-box--q    { border-left: 5px solid #f59e0b; }
#system_qna_detailModal .sq-box--a    { border-left: 5px solid #2563eb; background: #fafcff; }
#system_qna_detailModal .sq-box--edit { border-left: 5px solid #2563eb; }

/* 제목 */
#system_qna_detailModal .sq-title {
    margin-bottom: 10px;
    font-size: 20px;
    font-weight: 700;
    color: #b26a00;
    word-break: break-word;
}
#system_qna_detailModal .sq-title--a { color: #2563eb; font-size: 18px; }

/* 메타 */
#system_qna_detailModal .sq-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 10px;
    margin-bottom: 14px;
}
#system_qna_detailModal .sq-meta span {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    border-radius: 999px;
    font-size: 12.5px;
    font-weight: 600;
    background: #fff;
    color: #6b7280;
    border: 1px solid #e5e7eb;
}
#system_qna_detailModal .sq-meta span em {
    margin-left: 4px;
    font-style: normal;
    font-weight: 700;
    color: #374151;
}

/* 본문 */
#system_qna_detailModal .sq-content {
    font-size: 15px;
    line-height: 1.8;
    color: #1f2937;
    white-space: pre-wrap;
    word-break: break-word;
    min-height: 40px;
}

/* 첨부파일(조회) */
#system_qna_detailModal .sq-files {
    margin-top: 16px;
    padding: 14px 16px;
    border-radius: 8px;
    background: #f9fafb;
    border: 1px dashed #e5e7eb;
}
#system_qna_detailModal .sq-files .file-label {
    font-size: 13px; font-weight: 600; color: #374151; margin-bottom: 8px;
}
#system_qna_detailModal .sq-files .file-item {
    display: flex; align-items: center; gap: 10px;
    padding: 9px 12px;
    background: #fff;
    border: 1px solid #eef1f5;
    border-radius: 6px;
    margin-bottom: 6px;
}
#system_qna_detailModal .sq-files .file-item:last-child { margin-bottom: 0; }
#system_qna_detailModal .sq-files .file-name { flex: 1; font-size: 14px; color: #111827; }
#system_qna_detailModal .sq-files .file-size { font-size: 12px; color: #9ca3af; }
/* .btn-download 모양은 bit.css 의 다운로드 버튼 공통 규칙에서 처리(아이콘 포함) */

/* ── 답변 편집 폼 ─────────────────────────────── */
#system_qna_detailModal .modal-section { margin-bottom: 14px; }
#system_qna_detailModal .modal-section:last-child { margin-bottom: 0; }
#system_qna_detailModal .section-title {
    margin: 0 0 10px 0;
    padding-bottom: 6px;
    border-bottom: 1px solid #e5e7eb;
}
#system_qna_detailModal .form-group.ti-top { display: flex; flex-direction: column; gap: 6px; }
#system_qna_detailModal .form-ti.required::after { content: '*'; color: #e54e57; margin-left: 4px; }
#system_qna_detailModal textarea.form-control {
    width: 100%;
    min-height: 180px;
    padding: 10px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
    line-height: 1.6;
    resize: vertical;
}
#system_qna_detailModal textarea.form-control:focus { outline: none; border-color: #047bb6; }

/* 기존 파일 */
#system_qna_detailModal .existing-file-item {
    display: flex; align-items: center; gap: 10px;
    padding: 8px 12px; background: #f9fafb;
    border: 1px solid #e5e7eb; border-radius: 6px; margin-bottom: 6px;
}
#system_qna_detailModal .existing-file-item:last-child { margin-bottom: 0; }
#system_qna_detailModal .existing-file-item .file-name { flex: 1; font-size: 13px; color: #374151; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#system_qna_detailModal .existing-file-item .file-size { font-size: 12px; color: #9ca3af; }

/* 파일 업로드 영역 */
#system_qna_detailModal .file-upload-area {
    border: 2px dashed #d1d5db;
    border-radius: 6px;
    padding: 22px 15px;
    text-align: center;
    cursor: pointer;
    background: #fafbfc;
    transition: all .2s;
}
#system_qna_detailModal .file-upload-area:hover,
#system_qna_detailModal .file-upload-area.dragover { border-color: #047bb6; background: #f0f7ff; }
#system_qna_detailModal .file-upload-inner { display: flex; flex-direction: column; align-items: center; gap: 4px; }
#system_qna_detailModal .upload-text { margin: 0; font-size: 14px; font-weight: 500; color: #374151; }
#system_qna_detailModal .upload-hint { margin: 0; font-size: 12px; color: #9ca3af; }

/* 새 파일 */
#system_qna_detailModal .new-files { margin-top: 10px; }
#system_qna_detailModal .new-file-item {
    display: flex; align-items: center; gap: 10px;
    padding: 8px 12px; background: #ecfdf5;
    border: 1px solid #a7f3d0; border-radius: 6px; margin-bottom: 6px;
}
#system_qna_detailModal .new-file-item:last-child { margin-bottom: 0; }
#system_qna_detailModal .new-file-item .file-name { flex: 1; font-size: 13px; color: #065f46; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#system_qna_detailModal .new-file-item .file-size { font-size: 12px; color: #059669; }

/* 파일 삭제 버튼(공통) */
#system_qna_detailModal .btn-remove {
    width: 22px; height: 22px; border: none;
    background: #ef4444; color: #fff; border-radius: 50%;
    cursor: pointer; font-size: 12px;
    display: flex; align-items: center; justify-content: center; flex: none;
}
#system_qna_detailModal .btn-remove:hover { background: #dc2626; }
