/* ---------------------------------------------------------------------------
 * QNA00001_P01.xfdl 변환본 — Q&A 게시글 모달 (720x).
 * Modal #A 46 + *Rule of Two 추출 8번째* (INSERT/SELECT 통합 + 권한 분기).
 * --------------------------------------------------------------------------- */

#qna-post-modal {
  display: none;
  position: fixed; inset: 0; z-index: 9100;
  background: rgba(0, 0, 0, 0.45);
  align-items: center; justify-content: center;
  font-family: 'Pretendard', 'Malgun Gothic', sans-serif;
}
#qna-post-modal.is-open { display: flex; }
#qna-post-modal .layer-wrap {
  width: 720px; background: #ffffff; border-radius: 6px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.25);
  display: flex; flex-direction: column; overflow: hidden;
}
#qna-post-modal .layer-header {
  display: flex; align-items: center; padding: 12px 16px;
  border-bottom: 2px solid #2c4368; background: #2c4368; color: #ffffff;
}
#qna-post-modal .layer-title { flex: 1; font-size: 14px; font-weight: 600; margin: 0; }
#qna-post-modal .layer-close {
  background: transparent; border: 0; color: #ffffff; font-size: 20px; cursor: pointer; line-height: 1;
}
#qna-post-modal .layer-content {
  padding: 14px 16px;
}
#qna-post-modal .section-title {
  font-size: 13px; color: #2c4368; font-weight: 600;
  margin: 0 0 8px 0; padding-bottom: 4px; border-bottom: 1px solid #d8e3f0;
}
#qna-post-modal .form-grid {
  display: grid;
  grid-template-columns: 80px 1fr 80px 1fr;
  gap: 6px 10px;
  font-size: 12px;
  margin-bottom: 8px;
}
#qna-post-modal .form-grid label { color: #344b6e; font-weight: 600; align-self: center; }
#qna-post-modal .form-grid input,
#qna-post-modal .form-grid select {
  padding: 4px 6px; font-size: 12px;
  border: 1px solid #c8d3e0; border-radius: 3px;
}
#qna-post-modal .form-grid .full-row {
  grid-column: 1 / -1;
  display: grid; grid-template-columns: 80px 1fr; gap: 6px 10px; align-items: start;
}
#qna-post-modal textarea {
  width: 100%; min-height: 120px; padding: 6px 8px;
  border: 1px solid #c8d3e0; border-radius: 3px;
  font-family: inherit; font-size: 12px; line-height: 1.4;
  resize: vertical;
}
#qna-post-modal .answer-section {
  margin-top: 12px; padding-top: 8px; border-top: 1px solid #d8e3f0;
}
#qna-post-modal .answer-section textarea { min-height: 100px; }
#qna-post-modal .answer-section textarea:disabled { background: #f0f3f7; }
#qna-post-modal .button-row {
  display: flex; justify-content: flex-end; gap: 4px; margin-top: 8px;
}
#qna-post-modal .button-row .btn {
  min-width: 60px; padding: 4px 10px; border-radius: 3px;
  font-size: 12px; cursor: pointer;
  border: 1px solid #c8d3e0; background: #ffffff; color: #344b6e;
}
#qna-post-modal .button-row .btn.primary { background: #2c4368; color: #ffffff; border-color: #2c4368; }
#qna-post-modal .button-row .btn:disabled { opacity: 0.4; cursor: not-allowed; }
