/* ---------------------------------------------------------------------------
 * Form_Help.xfdl 변환본 — 도움말 모달 (큰 다영역) + reference fragment 스타일.
 *
 * 원본 시각: 654×530 모달. ImageViewer 아이콘 + 제목 + "도움말" 빨강 라벨 + TextArea 본문
 * + "사용자 댓글" 라벨 + Grid + 페이지 번호 1~10 + 입력 + Enter 아이콘 + 등록 버튼.
 *
 * 변환은 시각 패턴 보존하되 페이지 번호 1~10 하드코딩 → prev/next + "N / M" 단순화.
 * 댓글 그리드 row-span colspan 레이아웃 → 카드 리스트 단순화.
 * --------------------------------------------------------------------------- */

#help-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9000;
  background: rgba(0, 0, 0, 0.45);
  align-items: center;
  justify-content: center;
  font-family: 'Pretendard', 'Malgun Gothic', sans-serif;
}
#help-modal.is-open {
  display: flex;
}

#help-modal .layer-wrap {
  width: 654px;
  max-width: calc(100vw - 32px);
  max-height: calc(100vh - 32px);
  background: #ffffff;
  border-radius: 6px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.25);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

#help-modal .layer-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 20px;
  background: #2c4368;
  color: #ffffff;
  flex-shrink: 0;
}
#help-modal .help-icon {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.16);
  border-radius: 50%;
  font-size: 20px;
}
#help-modal .help-title-wrap {
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  gap: 12px;
}
#help-modal .layer-title {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
}
#help-modal .help-badge {
  font-size: 11px;
  padding: 2px 8px;
  background: #d12020;
  color: #ffffff;
  border-radius: 3px;
  letter-spacing: 1px;
  font-weight: 600;
}
#help-modal .layer-close {
  width: 24px;
  height: 24px;
  border: 0;
  background: transparent;
  color: #ffffff;
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
  border-radius: 3px;
}
#help-modal .layer-close:hover {
  background: rgba(255, 255, 255, 0.18);
}

#help-modal .layer-content {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 16px 20px;
}

#help-modal .help-body {
  background: #fafbfc;
  border: 1px solid #eef0f3;
  border-radius: 4px;
  padding: 16px;
  font-size: 13px;
  line-height: 1.7;
  color: #1f2a44;
  white-space: pre-wrap;
  min-height: 120px;
  margin-bottom: 20px;
}
#help-modal .help-body.is-loading {
  color: #888;
  font-style: italic;
}

#help-modal .comments-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}
#help-modal .comments-header h4 {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  color: #d12020;
}
#help-modal .comments-paging-info {
  font-size: 11px;
  color: #6d7280;
}

#help-modal .comments-list {
  list-style: none;
  margin: 0 0 12px 0;
  padding: 0;
  border: 1px solid #eef0f3;
  border-radius: 4px;
  max-height: 200px;
  overflow-y: auto;
}
#help-modal .comments-list li {
  padding: 10px 14px;
  border-bottom: 1px solid #eef0f3;
  font-size: 13px;
  line-height: 1.55;
}
#help-modal .comments-list li:last-child { border-bottom: 0; }
#help-modal .comments-list .reply-text {
  color: #1f2a44;
  margin-bottom: 4px;
}
#help-modal .comments-list .reply-meta {
  font-size: 11px;
  color: #888;
}
#help-modal .comments-list .reply-meta .name { color: #4f6b96; font-weight: 600; }
#help-modal .comments-list .empty {
  padding: 24px;
  text-align: center;
  color: #888;
  font-size: 12px;
  font-style: italic;
}

#help-modal .comments-paging {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 4px 0 12px 0;
}
#help-modal .comments-paging button {
  width: 28px;
  height: 24px;
  border: 1px solid #d0d4dc;
  background: #ffffff;
  border-radius: 3px;
  cursor: pointer;
  font-size: 11px;
  color: #1f2a44;
}
#help-modal .comments-paging button:hover:not(:disabled) {
  background: #eceefa;
  border-color: #4f6b96;
}
#help-modal .comments-paging button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
#help-modal .comments-paging .page-current {
  padding: 0 8px;
  font-size: 11px;
  color: #6d7280;
}

#help-modal .comment-input-row {
  display: flex;
  gap: 8px;
  padding: 12px 20px;
  background: #fafbfc;
  border-top: 1px solid #eef0f3;
  flex-shrink: 0;
}
#help-modal .comment-input {
  flex: 1 1 auto;
  height: 30px;
  padding: 4px 8px;
  border: 1px solid #d0d4dc;
  border-radius: 4px;
  font-family: inherit;
  font-size: 13px;
  outline: none;
}
#help-modal .comment-input:focus { border-color: #4f6b96; }
#help-modal .comment-submit {
  height: 30px;
  padding: 0 16px;
  border: 0;
  border-radius: 4px;
  font-family: inherit;
  font-size: 13px;
  cursor: pointer;
  background: #2c4368;
  color: #ffffff;
}
#help-modal .comment-submit:hover { background: #1f2a44; }
#help-modal .comment-submit:disabled { background: #8b95a8; cursor: not-allowed; }

/* form-help reference fragment 스타일 — 다른 reference 와 동일 톤 */
.form-help-fragment {
  padding: 24px;
  font-family: 'Pretendard', 'Malgun Gothic', sans-serif;
  color: #1f2a44;
}
.form-help-fragment h3 {
  margin: 0 0 12px 0;
  font-size: 16px;
  color: #2c4368;
}
.form-help-fragment p.lead {
  margin: 0 0 20px 0;
  font-size: 13px;
  color: #555;
  line-height: 1.7;
}
.form-help-mapping {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  margin-bottom: 24px;
}
.form-help-mapping th,
.form-help-mapping td {
  border: 1px solid #d0d4dc;
  padding: 8px 12px;
  vertical-align: top;
}
.form-help-mapping thead th {
  background: #eceefa;
  color: #1f2a44;
  font-weight: 600;
}
.form-help-mapping td code {
  background: #f5f6f8;
  padding: 1px 5px;
  border-radius: 2px;
  font-family: 'Menlo', 'Consolas', monospace;
  font-size: 12px;
  color: #2c4368;
}
.form-help-fragment .demo-box {
  background: #fbfbfc;
  border: 1px dashed #b8c0cf;
  border-radius: 4px;
  padding: 12px 16px;
  font-size: 13px;
  line-height: 1.7;
  color: #1f2a44;
}
.form-help-fragment .demo-box strong { color: #2c4368; }
.form-help-fragment pre {
  background: #1f2a44;
  color: #eceefa;
  padding: 12px 16px;
  border-radius: 4px;
  font-family: 'Menlo', 'Consolas', monospace;
  font-size: 12px;
  line-height: 1.5;
  overflow-x: auto;
}
.form-help-fragment .demo-launch {
  display: inline-block;
  margin-top: 8px;
  padding: 6px 14px;
  background: #2c4368;
  color: #ffffff;
  border: 0;
  border-radius: 4px;
  font-family: inherit;
  font-size: 13px;
  cursor: pointer;
}
.form-help-fragment .demo-launch:hover { background: #1f2a44; }
