/* 遮罩 */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: 1000;
  align-items: center;
  justify-content: center;
}
.modal-overlay.is-open {
  display: flex;
  opacity: 1;
  visibility: visible;
}

/* 彈窗本體 */
.reply-modal {
  background: #fff;
  border-radius: 12px;
  width: 90%;
  max-width: 520px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.15);
  overflow: hidden;
}
.reply-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid #f0f0f0;
}
.reply-modal-title {
  font-size: 18px;
  font-weight: 600;
  margin: 0;
  color: #333;
}
.reply-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;
}
.reply-modal-close:hover {
  color: #333;
  background: #f5f5f5;
}
.reply-modal-body {
  padding: 24px;
}
.form-label {
  display: block;
  font-size: 14px;
  color: #333;
  margin-bottom: 8px;
  font-weight: 500;
}
.reply-textarea {
  width: 100%;
  min-height: 120px;
  padding: 12px;
  border: 1px solid #d9d9d9;
  border-radius: 6px;
  font-size: 14px;
  font-family: inherit;
  resize: vertical;
  margin-bottom: 20px;
}
.reply-textarea:focus {
  outline: none;
  border-color: #1890ff;
  box-shadow: 0 0 0 2px rgba(24, 144, 255, 0.2);
}
.reply-textarea::placeholder {
  color: #bfbfbf;
}

/* 圖片上傳區 */
.upload-label {
  display: block;
  font-size: 14px;
  color: #333;
  margin-bottom: 8px;
  font-weight: 500;
}
.upload-zone {
  border: 2px dashed #d9d9d9;
  border-radius: 8px;
  /* padding: 12px; */
  text-align: left;
  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; */
}
.upload-zone:hover {
  border-color: #1890ff;
  background: #fafafa;
}
.upload-zone.has-files {
  justify-content: flex-start;
}
.upload-zone .add-icon {
  font-size: 36px;
  color: #bfbfbf;
  line-height: 1;
}
.upload-zone:hover .add-icon {
  color: #1890ff;
}
.upload-hint {
  font-size: 12px;
  color: #999;
  margin: 0;
}
.upload-input {
  display: none;
}
.preview-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.preview-item {
  position: relative;
  width: 72px;
  height: 72px;
  border-radius: 6px;
  overflow: hidden;
  flex-shrink: 0;
}
.preview-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.preview-item .remove-btn {
  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;
}
.preview-item .remove-btn:hover {
  background: rgba(0, 0, 0, 0.7);
}
.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;
}
.upload-placeholder .add-icon {
  font-size: 24px;
  color: #bfbfbf;
}

.reply-modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  padding: 16px 24px;
  border-top: 1px solid #f0f0f0;
  background: #fafafa;
}
.btn {
  padding: 8px 20px;
  border-radius: 6px;
  font-size: 14px;
  cursor: pointer;
  font-family: inherit;
}
.btn-cancel {
  background: #fff;
  border: 1px solid #d9d9d9;
  color: #666;
}
.btn-cancel:hover {
  color: #1890ff;
  border-color: #1890ff;
}
.btn-submit {
  background: #1890ff;
  border: none;
  color: #fff;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.btn-submit:hover {
  background: #40a9ff;
}
.btn-submit:disabled {
  background: #d9d9d9;
  cursor: not-allowed;
}
.btn-submit svg {
  width: 16px;
  height: 16px;
}
.error-msg {
  font-size: 12px;
  color: #ff4d4f;
  margin-top: 4px;
}
.uploading {
  opacity: 0.7;
  pointer-events: none;
}
