/* ---------- 參考頁面佈局（導航欄、菜單不變，中間區域為內容） ---------- */
.release-qa-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.release-qa-nav {
  height: 56px;
  background: #001529;
  color: #fff;
  display: flex;
  align-items: center;
  padding: 0 24px;
  font-size: 16px;
}

.release-qa-layout {
  display: flex;
  flex: 1;
}

.release-qa-menu {
  width: 220px;
  background: #fff;
  border-right: 1px solid #f0f0f0;
  padding: 16px 0;
}

.release-qa-main {
  flex: 1;
  padding: 24px;
}

.release-qa-main-inner {
  background: #fff;
  border-radius: 8px;
  padding: 24px;
}

.release-qa-open-btn {
  padding: 10px 20px;
  background: #1890ff;
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  cursor: pointer;
}

.release-qa-open-btn:hover {
  background: #40a9ff;
}

.release-qa-hint {
  margin: 16px 0 0;
  font-size: 13px;
  color: #999;
}

/* ---------- 彈窗遮罩 ---------- */
.release-qa-modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: 1000;
  align-items: center;
  justify-content: center;
}

.release-qa-modal-overlay.release-qa-is-open {
  display: flex;
}

/* ---------- 彈窗本體 ---------- */
.release-qa-modal {
  background: #fff;
  border-radius: 12px;
  width: 90%;
  max-width: 560px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.15);
  overflow: hidden;
}

.release-qa-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid #f0f0f0;
  flex-shrink: 0;
}

.release-qa-modal-title {
  font-size: 18px;
  font-weight: 600;
  margin: 0;
  color: #333;
}

.release-qa-modal-close {
  width: 32px;
  height: 32px;
  border: none;
  background: transparent;
  font-size: 20px;
  color: #999;
  cursor: pointer;
  line-height: 1;
  padding: 0;
  border-radius: 4px;
}

.release-qa-modal-close:hover {
  color: #333;
  background: #f5f5f5;
}

.release-qa-modal-body {
  padding: 24px;
  overflow-y: auto;
  flex: 1;
}

.release-qa-field {
  margin-bottom: 20px;
}

.release-qa-field:last-of-type {
  margin-bottom: 0;
}

.release-qa-label {
  display: block;
  font-size: 14px;
  color: #333;
  margin-bottom: 8px;
  font-weight: 500;
}

.release-qa-select {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid #d9d9d9;
  border-radius: 6px;
  font-size: 14px;
  font-family: inherit;
  background: #fff;
}

.release-qa-input {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid #d9d9d9;
  border-radius: 6px;
  font-size: 14px;
  font-family: inherit;
  background: #fff;
}

.release-qa-select:focus, .release-qa-input:focus {
  outline: none;
  border-color: #1890ff;
}

/* 標籤（可自定義） */
.release-qa-tag-wrap {
  border: 1px solid #d9d9d9;
  border-radius: 6px;
  padding: 8px 12px;
  min-height: 40px;
  background: #fff;
}

.release-qa-tag-wrap:focus-within {
  border-color: #1890ff;
  box-shadow: 0 0 0 2px rgba(24, 144, 255, 0.2);
}

.release-qa-tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 8px;
}

.release-qa-tag-list:empty {
  margin-bottom: 0;
}

.release-qa-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  background: #e6f7ff;
  border: 1px solid #91d5ff;
  border-radius: 4px;
  font-size: 13px;
  color: #1890ff;
}

.release-qa-tag-remove {
  width: 14px;
  height: 14px;
  border: none;
  background: transparent;
  color: #1890ff;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  padding: 0;
  border-radius: 2px;
}

.release-qa-tag-remove:hover {
  background: #91d5ff;
  color: #fff;
}

.release-qa-tag-input {
  width: 100%;
  border: none;
  outline: none;
  font-size: 14px;
  font-family: inherit;
}

.release-qa-tag-input::placeholder {
  color: #bfbfbf;
}

.release-qa-tag-input-wrap {
  min-height: 24px;
}

/* 內容描述 */
.release-qa-textarea {
  width: 100%;
  min-height: 120px;
  padding: 12px;
  border: 1px solid #d9d9d9;
  border-radius: 6px;
  font-size: 14px;
  font-family: inherit;
  resize: vertical;
}

.release-qa-textarea:focus {
  outline: none;
  border-color: #1890ff;
  box-shadow: 0 0 0 2px rgba(24, 144, 255, 0.2);
}

.release-qa-textarea::placeholder {
  color: #bfbfbf;
}

/* 圖片上傳區 */
.release-qa-upload-zone {
  border: 2px dashed #d9d9d9;
  border-radius: 8px;
  padding: 12px;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
  margin-bottom: 8px;
  width: fit-content;
  min-height: auto;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  flex-wrap: wrap;
  /* gap: 12px; */
}

.release-qa-upload-zone:hover {
  border-color: #1890ff;
  background: #fafafa;
}

.release-qa-upload-zone.release-qa-has-files {
  justify-content: flex-start;
}

.release-qa-upload-input {
  display: none !important;
}

.release-qa-preview-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.release-qa-preview-item {
  position: relative;
  width: 72px;
  height: 72px;
  border-radius: 6px;
  overflow: hidden;
  flex-shrink: 0;
}

.release-qa-preview-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.release-qa-preview-remove {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 20px;
  height: 20px;
  border: none;
  background: rgba(0, 0, 0, 0.5);
  color: #fff;
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
  border-radius: 4px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.release-qa-preview-remove:hover {
  background: rgba(0, 0, 0, 0.7);
}

.release-qa-upload-placeholder {
  width: 72px;
  height: 72px;
  /* border: 2px dashed #d9d9d9; */
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
}

.release-qa-upload-placeholder .release-qa-add-icon {
  font-size: 24px;
  color: #bfbfbf;
}

.release-qa-upload-zone:hover .release-qa-add-icon {
  color: #1890ff;
}

.release-qa-upload-hint {
  font-size: 12px;
  color: #999;
  margin: 0;
}

.release-qa-error {
  font-size: 12px;
  color: #ff4d4f;
  margin: 4px 0 0;
}

.release-qa-upload-zone.release-qa-uploading {
  opacity: 0.7;
  pointer-events: none;
}

/* 彈窗底部 */
.release-qa-modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  padding: 16px 24px;
  border-top: 1px solid #f0f0f0;
  background: #fafafa;
  flex-shrink: 0;
}

.release-qa-btn {
  padding: 8px 20px;
  border-radius: 6px;
  font-size: 14px;
  cursor: pointer;
  font-family: inherit;
}

.release-qa-btn-cancel {
  background: #fff;
  border: 1px solid #d9d9d9;
  color: #666;
}

.release-qa-btn-cancel:hover {
  color: #1890ff;
  border-color: #1890ff;
}

.release-qa-btn-submit {
  background: #1890ff;
  border: none;
  color: #fff;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.release-qa-btn-submit:hover {
  background: #40a9ff;
}

.release-qa-btn-submit:disabled {
  background: #d9d9d9;
  cursor: not-allowed;
}

.release-qa-btn-icon {
  width: 16px;
  height: 16px;
}
