/* Q&A 작성 모달 — 상품 검색 포함 (상세·마이페이지 공통) */

.qna-write-modal {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  box-sizing: border-box;
}

.qna-write-modal[hidden] {
  display: none !important;
}

.qna-write-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
}

.qna-write-modal__dialog {
  position: relative;
  width: 100%;
  max-width: 520px;
  max-height: min(92vh, 720px);
  overflow-y: auto;
  background: #fff;
  border-radius: 8px;
  padding: 28px 24px 24px;
  box-sizing: border-box;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
}

.qna-write-modal__title {
  font-size: 18px;
  font-weight: 700;
  margin: 0 0 20px;
  color: #111;
}

.qna-write-modal__field {
  margin-bottom: 14px;
}

.qna-write-modal__label {
  display: block;
  font-size: 14px;
  color: #555;
  margin-bottom: 6px;
}

.qna-write-modal__req {
  color: #e44;
}

.qna-write-modal__input,
.qna-write-modal__textarea {
  width: 100%;
  border: 1px solid #ddd;
  border-radius: 5px;
  font-size: 14px;
  box-sizing: border-box;
}

.qna-write-modal__input {
  height: 40px;
  padding: 0 12px;
}

.qna-write-modal__textarea {
  padding: 10px 12px;
  resize: vertical;
  line-height: 1.5;
}

.qna-write-modal__picked {
  font-size: 13px;
  color: #333;
  padding: 10px 12px;
  background: #f6f6f6;
  border: 1px solid #e8e8e8;
  border-radius: 5px;
  margin-bottom: 8px;
  line-height: 1.45;
}

.qna-write-modal__search-wrap {
  position: relative;
}

.qna-write-modal__search {
  padding-right: 40px;
}

.qna-write-modal__search-icon {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: #888;
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: center;
}

.qna-write-modal__results {
  list-style: none;
  margin: 4px 0 0;
  padding: 0;
  max-height: 220px;
  overflow-y: auto;
  border: 1px solid #ddd;
  border-radius: 5px;
  background: #fff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

.qna-write-modal__results[hidden] {
  display: none !important;
}

.qna-write-modal__result-item {
  padding: 10px 12px;
  font-size: 13px;
  color: #222;
  cursor: pointer;
  line-height: 1.45;
  border-bottom: 1px solid #f0f0f0;
}

.qna-write-modal__result-item:last-child {
  border-bottom: none;
}

.qna-write-modal__result-item:hover,
.qna-write-modal__result-item:focus {
  background: #f0f0f0;
  outline: none;
}

.qna-write-modal__row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 4px;
}

.qna-write-modal__check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: #555;
  cursor: pointer;
  margin: 0;
}

.qna-write-modal__check input {
  width: 16px;
  height: 16px;
  margin: 0;
}

.qna-write-modal__actions {
  display: flex;
  gap: 10px;
  margin-left: auto;
}

.qna-write-modal__btn {
  padding: 8px 20px;
  border-radius: 5px;
  font-size: 14px;
  cursor: pointer;
  border: none;
}

.qna-write-modal__btn--ghost {
  border: 1px solid #ddd;
  background: #fff;
  color: #111;
}

.qna-write-modal__btn--primary {
  background: #333;
  color: #fff;
}
