/* qna.css — 고객문의 게시판 스타일 */

/* ── 공통 안내 ────────────────────────────── */
.c-qna-notice {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  padding: var(--space-3);
  margin: var(--space-2) var(--space-3) 0;
  background: var(--muted);
  border-radius: 10px;
  font-size: 13px;
  color: var(--sub);
  line-height: 1.5;
}
.c-qna-notice .material-symbols-outlined { font-size: 18px; flex-shrink: 0; margin-top: 1px; }
.c-qna-notice b { color: var(--text); }

/* ── 검색 결과 ────────────────────────────── */
.c-qna-search-result {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-2) var(--space-3);
  font-size: 13px;
  color: var(--sub);
}
.c-qna-search-clear {
  font-size: 13px;
  color: var(--accent);
  font-weight: 500;
}

/* ── 빈 상태 ──────────────────────────────── */
.c-qna-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px var(--space-3);
  text-align: center;
  color: var(--sub);
}
.c-qna-empty .material-symbols-outlined { font-size: 48px; margin-bottom: 12px; opacity: 0.3; }
.c-qna-empty p { margin: 0 0 20px; font-size: 14px; line-height: 1.5; }

/* ── 건수 표시 ────────────────────────────── */
.c-qna-mycount {
  padding: var(--space-2) var(--space-3);
  font-size: 13px;
  color: var(--sub);
}
.c-qna-mycount b { color: var(--text); }

/* ── 목록 ─────────────────────────────────── */
.c-qna-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.c-qna-list > li { border-bottom: 1px solid var(--line); }

.c-qna-item {
  display: block;
  padding: var(--space-3);
  text-decoration: none;
  color: inherit;
  -webkit-tap-highlight-color: transparent;
}
.c-qna-item:active { background: var(--muted); }

.c-qna-item__top {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 6px;
}
.c-qna-item__cate {
  font-size: 12px;
  color: var(--sub);
}
.c-qna-item__subject {
  display: block;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.45;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.c-qna-item__meta {
  display: flex;
  gap: 8px;
  margin-top: 6px;
  font-size: 12px;
  color: #999;
}

/* ── 상태 뱃지 ────────────────────────────── */
.c-qna-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.5;
  flex-shrink: 0;
}
.c-qna-badge.is-done    { background: #e8f5e9; color: #2e7d32; }
.c-qna-badge.is-wait    { background: #fff3e0; color: #e65100; }
.c-qna-badge.is-private { background: #f3e5f5; color: #7b1fa2; }

/* ── 상세 페이지 ──────────────────────────── */
.c-qna-view {
  margin: var(--space-3) 0 0;
}
.c-qna-view__header {
  padding: 0 var(--space-3) var(--space-3);
  border-bottom: 1px solid var(--line);
}
.c-qna-view__badges {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 8px;
}
.c-qna-view__cate {
  font-size: 12px;
  color: var(--sub);
}
.c-qna-view__subject {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.45;
  color: var(--text);
}
.c-qna-view__icon {
  flex-shrink: 0;
  font-size: 20px;
  color: var(--accent);
  margin-top: 1px;
}
.c-qna-view__meta {
  display: flex;
  gap: 8px;
  margin-top: 8px;
  font-size: 12px;
  color: #999;
}
.c-qna-view__body {
  padding: var(--space-4) var(--space-3);
  font-size: 14px;
  line-height: 1.7;
  color: var(--text);
  word-break: break-word;
}

/* ── 답변 ─────────────────────────────────── */
.c-qna-answer {
  margin: 0;
  background: var(--muted);
  border-top: 1px solid var(--line);
}
.c-qna-answer__header {
  padding: var(--space-3) var(--space-3) 0;
}
.c-qna-answer__subject {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.45;
  color: var(--text);
}
.c-qna-answer__icon {
  flex-shrink: 0;
  font-size: 20px;
  color: #2e7d32;
  margin-top: 1px;
}

.c-qna-no-answer {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 40px var(--space-3);
  text-align: center;
  color: var(--sub);
  background: var(--muted);
  border-top: 1px solid var(--line);
}
.c-qna-no-answer .material-symbols-outlined { font-size: 36px; margin-bottom: 8px; opacity: 0.4; }
.c-qna-no-answer p { margin: 0; font-size: 13px; line-height: 1.6; }

/* ── 하단 버튼 ────────────────────────────── */
.c-qna-actions {
  display: flex;
  gap: 10px;
  padding: var(--space-4) var(--space-3);
}
.c-qna-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 44px;
  padding: 0 20px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  border: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.c-qna-btn.is-outline {
  flex: 1;
  background: #fff;
  color: var(--text);
  border: 1px solid var(--line);
}
.c-qna-btn.is-primary {
  flex: 1;
  background: var(--text);
  color: #fff;
}
.c-qna-btn.is-primary:disabled {
  opacity: 0.4;
  pointer-events: none;
}
.c-qna-btn.is-full { width: 100%; }

/* ── FAB (글쓰기 버튼) ────────────────────── */
.c-fab {
  position: fixed;
  right: var(--space-3);
  bottom: calc(var(--bottomnav-h) + env(safe-area-inset-bottom) + 16px);
  z-index: var(--z-sticky);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 16px;
  background: var(--text);
  color: #fff;
  box-shadow: var(--shadow);
  -webkit-tap-highlight-color: transparent;
  text-decoration: none;
}
.c-fab .material-symbols-outlined { font-size: 24px; }

/* ── 글쓰기 폼 ───────────────────────────── */
.c-qna-form {
  padding: var(--space-3);
}
.c-field {
  margin-bottom: var(--space-4);
}
.c-field__label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
}
.c-field__input {
  display: block;
  width: 100%;
  height: 44px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  font-size: 14px;
  color: var(--text);
  background: #fff;
  outline: none;
  -webkit-appearance: none;
}
.c-field__input:focus { border-color: var(--text); }
.c-field__input[readonly] { background: var(--muted); color: var(--sub); }

.c-field__textarea {
  display: block;
  width: 100%;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  font-size: 14px;
  color: var(--text);
  background: #fff;
  outline: none;
  resize: vertical;
  line-height: 1.6;
  -webkit-appearance: none;
}
.c-field__textarea:focus { border-color: var(--text); }

/* 카테고리 칩 */
.c-field__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.c-chip {
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.c-chip input { position: absolute; opacity: 0; pointer-events: none; }
.c-chip__label {
  display: inline-flex;
  align-items: center;
  height: 34px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 17px;
  font-size: 13px;
  color: var(--sub);
  background: #fff;
  transition: all 0.15s;
}
.c-chip input:checked + .c-chip__label {
  border-color: var(--text);
  color: #fff;
  background: var(--text);
}

/* 공개여부 라디오 */
.c-field__radios {
  display: flex;
  gap: 16px;
}
.c-radio {
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  font-size: 14px;
  color: var(--text);
  -webkit-tap-highlight-color: transparent;
}
.c-radio input[type="radio"] {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: var(--text);
}

.c-qna-form__actions {
  padding: var(--space-3) 0 var(--space-5);
}

/* ── 페이지네이션 ─────────────────────────── */
.c-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: var(--space-4) var(--space-3) var(--space-5);
}
.c-pagination__current {
  font-size: 13px;
  color: var(--sub);
}
.c-pagination__btn {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  background: var(--muted);
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}
.c-pagination__btn:active { opacity: 0.7; }
.c-pagination__btn .material-symbols-outlined { font-size: 18px; }

/* ── 첨부파일 표시 (상세 페이지) ──────────── */
.c-qna-attach {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 20px;
  padding: 10px 12px;
  background: var(--muted);
  border-radius: 8px;
  font-size: 13px;
}
.c-qna-attach .material-symbols-outlined { font-size: 18px; color: var(--sub); flex-shrink: 0; }
.c-qna-attach a { color: var(--text); text-decoration: underline; word-break: break-all; }

/* ── 파일 입력 (글쓰기 폼) ────────────────── */
.c-field__file {
  display: block;
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  font-size: 13px;
  color: var(--sub);
  background: #fff;
}
.c-field__hint {
  font-weight: 400;
  color: var(--sub);
}
.c-field__help {
  margin: 6px 0 0;
  font-size: 12px;
  color: #999;
  line-height: 1.4;
}

/* ── 검색 바 (목록 페이지 내 간이 검색) ─── */
.c-qna-searchbar {
  display: flex;
  gap: 8px;
  padding: var(--space-2) var(--space-3);
}
.c-qna-searchbar select {
  height: 38px;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 13px;
  color: var(--text);
  background: #fff;
  -webkit-appearance: none;
  outline: none;
}
.c-qna-searchbar__input {
  flex: 1;
  height: 38px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 13px;
  color: var(--text);
  outline: none;
}
.c-qna-searchbar__btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 8px;
  background: var(--text);
  color: #fff;
  flex-shrink: 0;
}
.c-qna-searchbar__btn .material-symbols-outlined { font-size: 20px; }
