/**
 * 一日女友 · 发布弹窗（Figma 2.1 发布视频）
 * 中间表单区是深灰，不是粉红底
 */
#publish-video-modal,
#publish-post-modal,
.dg-publish-overlay {
  background: rgba(8, 8, 10, 0.72) !important;
  backdrop-filter: blur(10px) !important;
}

#publish-video-modal {
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
  overflow: auto;
}

#publish-video-modal .dg-pv-panel,
.dg-publish-panel {
  /* Figma 225:27863 弹层面板 1030×1042 */
  width: min(1030px, 54vw);
  max-height: min(1042px, calc(100vh - 80px));
  overflow: auto;
  margin: auto;
  padding: 40px 48px 36px;
  box-sizing: border-box;
  background: #212224 !important;
  border: 1px solid #414141 !important;
  border-radius: 12px !important;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.55) !important;
  position: relative;
}

#publish-video-modal .dg-pv-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
  position: relative;
  min-height: 34px;
  padding-right: 40px;
}

#publish-video-modal .dg-pv-title {
  margin: 0;
  color: #fff;
  font-size: 28px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

/* 不用 SVG：原 pv-close.svg 几乎全透明导致看不见 */
#publish-video-modal .dg-pv-close {
  position: absolute;
  top: 0;
  right: 0;
  width: 30px;
  height: 30px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  opacity: 0.9;
  display: block !important;
  z-index: 5;
  color: #fff;
}
#publish-video-modal .dg-pv-close:hover { opacity: 1; }
#publish-video-modal .dg-pv-close::before,
#publish-video-modal .dg-pv-close::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 16px;
  height: 2px;
  background: #fff;
  border-radius: 1px;
}
#publish-video-modal .dg-pv-close::before {
  transform: translate(-50%, -50%) rotate(45deg);
}
#publish-video-modal .dg-pv-close::after {
  transform: translate(-50%, -50%) rotate(-45deg);
}
#publish-video-modal .dg-pv-close img {
  display: none !important;
}

#publish-video-modal .dg-pv-field {
  margin-bottom: 20px;
}

#publish-video-modal .dg-pv-label {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 12px;
  color: #fff;
  font-size: 16px;
  font-weight: 500;
  line-height: 1.1;
}

#publish-video-modal .dg-pv-hint {
  color: #ff1290;
  font-size: 14px;
  font-weight: 500;
}

#publish-video-modal .dg-pv-tag-row {
  display: flex;
  align-items: center;
  gap: 24px;
  width: 100%;
}
#publish-video-modal .dg-pv-tag-row .dg-pv-input,
#publish-video-modal .dg-pv-tag-row input {
  flex: 1;
  min-width: 0;
  width: auto;
}
#publish-video-modal .dg-pv-add {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  width: 88px;
  height: 46px;
  padding: 0 12px;
  border: 0;
  border-radius: 6px;
  background: #ff1290;
  color: #fff;
  font-size: 16px;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
}
#publish-video-modal .dg-pv-add img {
  width: 18px;
  height: 18px;
  display: block;
}
#publish-video-modal .dg-pv-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 16px;
  min-height: 30px;
}
#publish-video-modal .dg-pv-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 30px;
  padding: 0 10px 0 14px;
  border-radius: 10px;
  background: #232429;
  border: 1px solid #35363c;
  color: #fff;
  font-size: 14px;
  font-weight: 500;
}
#publish-video-modal .dg-pv-tag button {
  width: 14px;
  height: 14px;
  padding: 0;
  border: 0;
  background: transparent;
  color: rgba(255, 255, 255, 0.75);
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
}
#publish-video-modal .dg-pv-err {
  display: none;
  margin-top: 6px;
  font-size: 12px;
  color: #f7806b;
}
#publish-video-modal .dg-pv-err.show {
  display: block;
}

#publish-video-modal .dg-pv-input,
#publish-video-modal .dg-pv-select,
#publish-video-modal input.dg-pv-input,
#publish-video-modal select.dg-pv-select,
#publish-video-modal input,
#publish-video-modal select,
#publish-video-modal textarea,
.dg-publish-panel input,
.dg-publish-panel select,
.dg-publish-panel textarea {
  width: 100%;
  height: 60px;
  padding: 0 18px;
  box-sizing: border-box;
  background: #27282d !important;
  border: 1px solid #35363c !important;
  border-radius: 8px !important;
  color: #fff !important;
  font-size: 16px;
  font-family: inherit;
  outline: none;
}
#publish-video-modal .dg-pv-input::placeholder,
#publish-video-modal input::placeholder {
  color: #c8cacf;
}

#publish-video-modal .dg-pv-select-wrap {
  position: relative;
}
#publish-video-modal .dg-pv-select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 44px;
  cursor: pointer;
}
#publish-video-modal .dg-pv-select-wrap::after {
  content: "";
  position: absolute;
  right: 18px;
  top: 50%;
  width: 16px;
  height: 9px;
  transform: translateY(-50%);
  background: url("/static/img/figma/pv-chevron.svg") center / contain no-repeat;
  pointer-events: none;
  opacity: 0.9;
}

/* 上传视频 · Figma 225:48287 · ~300×122，非通栏 */
#publish-video-modal #pv-upload-label,
#publish-video-modal .dg-pv-upload {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-sizing: border-box;
  width: 300px;
  max-width: 100%;
  min-height: 122px;
  padding: 32px 16px;
  background: #27282d !important;
  border: 2px dashed #7f8189 !important;
  border-radius: 8px !important;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
#publish-video-modal #pv-upload-label:hover,
#publish-video-modal .dg-pv-upload:hover {
  border-color: #a0a2aa !important;
  background: #2c2d33 !important;
}
#publish-video-modal .dg-pv-upload-ico {
  width: 28px;
  height: 28px;
  display: block;
  opacity: 0.9;
}
#publish-video-modal #pv-file-name,
#publish-video-modal .dg-pv-upload-text {
  color: #909399 !important;
  font-size: 14px;
  line-height: 22px;
  letter-spacing: -0.01px;
}
#publish-video-modal #pv-file-name.is-selected {
  color: #fff !important;
}

#publish-video-modal #pv-progress-wrap {
  margin-top: 12px;
}
#publish-video-modal .dg-pv-progress-track {
  height: 6px;
  border-radius: 6px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.08);
}
#publish-video-modal #pv-progress-bar {
  height: 100%;
  width: 0;
  border-radius: 6px;
  background: linear-gradient(90deg, #ff43a7, #ef2df9);
  transition: width 0.3s;
}
#publish-video-modal #pv-progress-text {
  margin-top: 6px;
  text-align: center;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.45);
}

/* 封面：80×80 单槽位（仅 1 张） */
#publish-video-modal #pv-cover-panel,
#publish-video-modal .dg-pv-cover {
  margin-bottom: 20px;
  padding: 0;
  background: transparent !important;
  border: 0 !important;
}
#publish-video-modal .dg-pv-cover-slot {
  position: relative;
  width: 80px;
  height: 80px;
}
/* 封面：80×80 单槽位 · Figma 225:48274 */
#publish-video-modal .dg-pv-cover-box {
  width: 80px;
  height: 80px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #27282d;
  border: 1px dashed #646464;
  border-radius: 6px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}
#publish-video-modal .dg-pv-cover-box[hidden] {
  display: none !important;
}
#publish-video-modal .dg-pv-cover-box img.dg-pv-plus {
  width: 28px;
  height: 28px;
  display: block;
}
#publish-video-modal #pv-cover-preview-wrap {
  position: relative;
  width: 80px;
  height: 80px;
  margin: 0;
}
#publish-video-modal #pv-cover-preview-wrap[hidden] {
  display: none !important;
}
#publish-video-modal #pv-cover-preview {
  width: 80px;
  height: 80px;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid #35363c;
  display: block;
}
#publish-video-modal .dg-pv-cover-x {
  position: absolute;
  top: -8px;
  right: -8px;
  width: 22px;
  height: 22px;
  border: 0;
  border-radius: 50%;
  background: #414141;
  color: #fff;
  cursor: pointer;
  font-size: 14px;
  line-height: 22px;
  padding: 0;
}
#publish-video-modal #pv-video-preview {
  display: none;
  width: 100%;
  max-height: 220px;
  margin: 12px 0;
  background: #111;
  border-radius: 8px;
  object-fit: contain;
}
#publish-video-modal #pv-frame-tools {
  display: none;
  margin-top: 8px;
}
#publish-video-modal #pv-frame-tools .dg-pv-frame-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
}
#publish-video-modal #pv-time-label,
#publish-video-modal #pv-cover-status {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.45);
}
#publish-video-modal #pv-cover-btn {
  padding: 7px 12px;
  border-radius: 8px;
  border: 1px solid #35363c;
  background: #27282d;
  color: #fff;
  font-size: 12px;
  font-family: inherit;
  cursor: pointer;
}

#publish-video-modal #pv-msg {
  min-height: 18px;
  margin: 8px 0 16px;
  font-size: 13px;
  color: #f7806b;
}

#publish-video-modal .dg-pv-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 12px;
}

#publish-video-modal #pv-submit-btn,
.dg-publish-panel .dg-publish-submit {
  width: 203px;
  height: 57px;
  padding: 0 24px;
  border: 0;
  border-radius: 12px !important;
  background: linear-gradient(104deg, #ff43a7 0%, #ef2df9 95%) !important;
  color: #fff;
  font-size: 22px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
}
#publish-video-modal #pv-submit-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

/* ── 发布动态弹窗 Figma 225:42127 · 1020×931 ── */
#publish-post-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9000;
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
  overflow: auto;
}

#publish-post-modal .dg-pp-panel {
  width: min(1020px, 53vw);
  max-height: min(931px, calc(100vh - 80px));
  overflow: auto;
  margin: auto;
  padding: 40px 48px 36px;
  box-sizing: border-box;
  background: #212224 !important;
  border: 1px solid #414141 !important;
  border-radius: 12px !important;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.55) !important;
  position: relative;
}

#publish-post-modal .dg-pv-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
  position: relative;
  min-height: 34px;
  padding-right: 40px;
}

#publish-post-modal .dg-pv-title {
  margin: 0;
  color: #fff;
  font-size: 28px;
  font-weight: 700;
  line-height: 1.2;
}

#publish-post-modal .dg-pv-close {
  position: absolute;
  top: 0;
  right: 0;
  width: 30px;
  height: 30px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  opacity: 0.9;
}
#publish-post-modal .dg-pv-close::before,
#publish-post-modal .dg-pv-close::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 16px;
  height: 2px;
  background: #fff;
  border-radius: 1px;
}
#publish-post-modal .dg-pv-close::before {
  transform: translate(-50%, -50%) rotate(45deg);
}
#publish-post-modal .dg-pv-close::after {
  transform: translate(-50%, -50%) rotate(-45deg);
}

#publish-post-modal .dg-pv-field {
  margin-bottom: 20px;
}

#publish-post-modal .dg-pv-label {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 12px;
  color: #fff;
  font-size: 16px;
  font-weight: 500;
}

#publish-post-modal .dg-pv-hint {
  color: #ff1290;
  font-size: 14px;
  font-weight: 500;
}

#publish-post-modal .dg-pp-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px 48px;
  margin-bottom: 20px;
}

#publish-post-modal .dg-pp-grid .dg-pv-field {
  margin-bottom: 0;
}

#publish-post-modal .dg-pv-input,
#publish-post-modal .dg-pv-select,
#publish-post-modal .dg-pp-textarea {
  width: 100%;
  box-sizing: border-box;
  background: #27282d !important;
  border: 1px solid #35363c !important;
  border-radius: 8px !important;
  color: #fff !important;
  font-size: 16px;
  font-family: inherit;
  outline: none;
}

#publish-post-modal .dg-pv-input,
#publish-post-modal .dg-pv-select {
  height: 60px;
  padding: 0 18px;
}

#publish-post-modal .dg-pp-textarea {
  min-height: 114px;
  padding: 18px;
  resize: vertical;
  line-height: 1.5;
}

#publish-post-modal .dg-pv-input::placeholder,
#publish-post-modal .dg-pp-textarea::placeholder {
  color: #c8cacf;
}

#publish-post-modal .dg-pv-select-wrap {
  position: relative;
}
#publish-post-modal .dg-pv-select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 44px;
  cursor: pointer;
}
#publish-post-modal .dg-pv-select-wrap::after {
  content: "";
  position: absolute;
  right: 18px;
  top: 50%;
  width: 16px;
  height: 9px;
  transform: translateY(-50%);
  background: url("/static/img/figma/pv-chevron.svg") center / contain no-repeat;
  pointer-events: none;
  opacity: 0.9;
}

#publish-post-modal .dg-pp-counter {
  text-align: right;
  margin-top: 8px;
  font-size: 16px;
  color: #c8cacf;
}

#publish-post-modal .dg-pp-topic-row {
  display: flex;
  gap: 12px;
  align-items: center;
}
#publish-post-modal .dg-pp-topic-row .dg-pv-input {
  flex: 1;
  max-width: 460px;
}
#publish-post-modal .dg-pp-add-btn {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 88px;
  height: 46px;
  padding: 0 12px;
  border: 0;
  border-radius: 6px;
  background: #ff1290;
  color: #fff;
  font-size: 16px;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
}

#publish-post-modal .dg-pp-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0;
  min-height: 0;
}
#publish-post-modal .dg-pp-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 30px;
  padding: 0 10px 0 14px;
  border-radius: 10px;
  background: #232429;
  border: 1px solid #35363c;
  color: #fff;
  font-size: 14px;
}
#publish-post-modal .dg-pp-chip button {
  border: 0;
  background: transparent;
  color: rgba(255, 255, 255, 0.75);
  cursor: pointer;
  padding: 0;
  font-size: 14px;
}

#publish-post-modal .dg-pp-photos {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 12px;
}
#publish-post-modal .dg-pp-photo {
  position: relative;
  width: 80px;
  height: 80px;
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid #35363c;
  background: #27282d;
}
#publish-post-modal .dg-pp-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
#publish-post-modal .dg-pp-photo button {
  position: absolute;
  top: -6px;
  right: -6px;
  width: 20px;
  height: 20px;
  border: 0;
  border-radius: 50%;
  background: #414141;
  color: #fff;
  cursor: pointer;
  font-size: 12px;
  line-height: 20px;
  padding: 0;
}
#publish-post-modal .dg-pp-photo-add {
  width: 80px;
  height: 80px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #27282d;
  border: 1px dashed #7f7ffe;
  border-radius: 6px;
  cursor: pointer;
}
#publish-post-modal .dg-pp-photo-add img {
  width: 28px;
  height: 28px;
}

#publish-post-modal #pp-msg {
  min-height: 18px;
  margin: 8px 0 16px;
  font-size: 13px;
  color: #f7806b;
}

#publish-post-modal .dg-pv-actions {
  display: flex;
  justify-content: flex-end;
}

#publish-post-modal #pp-submit-btn {
  width: 203px;
  height: 57px;
  padding: 0 24px;
  border: 0;
  border-radius: 12px !important;
  background: linear-gradient(104deg, #ff43a7 0%, #ef2df9 95%) !important;
  color: #fff;
  font-size: 22px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
}
#publish-post-modal #pp-submit-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

@media (max-width: 900px) {
  #publish-post-modal {
    padding: 16px 12px;
  }
  #publish-post-modal .dg-pp-panel {
    width: calc(100vw - 24px);
    max-height: calc(100vh - 32px);
    padding: 24px 16px 20px;
  }
  #publish-post-modal .dg-pp-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  #publish-post-modal .dg-pv-title {
    font-size: 22px;
  }
  #publish-post-modal #pp-submit-btn {
    width: 100%;
    height: 48px;
    font-size: 16px;
  }
  #publish-post-modal .dg-pv-actions {
    justify-content: stretch;
  }
}

@media (max-width: 900px) {
  #publish-video-modal {
    padding: 16px 12px;
  }
  #publish-video-modal .dg-pv-panel,
  .dg-publish-panel {
    width: calc(100vw - 24px);
    max-height: calc(100vh - 32px);
    padding: 24px 16px 20px;
  }
  #publish-video-modal .dg-pv-title {
    font-size: 22px;
  }
  #publish-video-modal .dg-pv-input,
  #publish-video-modal .dg-pv-select,
  #publish-video-modal input,
  #publish-video-modal select {
    height: 48px;
    font-size: 14px;
  }
  #publish-video-modal #pv-upload-label,
  #publish-video-modal .dg-pv-upload {
    width: 100%;
    min-height: 122px;
    padding: 24px 16px;
  }
  #publish-video-modal #pv-submit-btn {
    width: 100%;
    height: 48px;
    font-size: 16px;
  }
  #publish-video-modal .dg-pv-actions {
    justify-content: stretch;
  }
}
