/* 文章管理系统：下拉列表、分组说明、管理员小按钮、编辑器放大、草稿配色 */
[data-bgg-channel] {
  list-style: none;
  margin: 0;
  padding: 0;
}

/* 下拉宽度按最长标题自适应，不再固定 320px */
.desktop-nav .bgg-art-submenu .blz-nav-submenu .el-menu--popup {
  min-width: 0 !important;
  width: -webkit-max-content;
  width: -moz-max-content;
  width: max-content;
  max-width: 520px;
  padding: 4px 0 6px;
}

[data-bgg-channel] .bgg-art-item,
.bgg-art-submenu .nav-group-title,
.bgg-art-submenu .bgg-art-new {
  white-space: nowrap;
}

[data-bgg-channel] .bgg-art-item {
  position: relative;
  padding-right: 10px !important;
}

/* 管理员模式下给行尾按钮留出位置 */
.bgg-art-submenu-tools [data-bgg-channel] .bgg-art-item {
  padding-right: 96px !important;
}

[data-bgg-channel] .bgg-art-item .title {
  min-width: 0;
}

[data-bgg-channel] .bgg-art-item .main-title {
  display: inline-block;
  max-width: 400px;
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: middle;
}

/* 草稿：颜色压暗，接近背景 */
[data-bgg-channel] .bgg-art-item.is-draft .main-title {
  color: #6b5a3a !important;
}
[data-bgg-channel] .bgg-art-item.is-draft img {
  opacity: .55;
}

/* 行内小按钮 改 / ✋ / 删 / 隐 */
.bgg-art-tools {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  line-height: 1;
}

.bgg-art-mini {
  color: #d4a53a;
  text-decoration: underline;
  cursor: pointer;
  padding: 3px 1px;
  white-space: nowrap;
  opacity: .9;
}
.bgg-art-mini:hover { color: #f8b700; opacity: 1; }
.bgg-art-drag { cursor: grab; text-decoration: none; }
.bgg-art-drag:active { cursor: grabbing; }

.bgg-art-item.is-dragging { opacity: .5; }

/* 分组说明文字 + 改 */
.bgg-art-submenu .nav-group-title {
  position: relative;
}

.bgg-g-edit {
  margin-left: 8px;
  color: #d4a53a;
  font-size: 12px;
  text-decoration: underline;
  cursor: pointer;
  vertical-align: middle;
}
.bgg-g-edit:hover { color: #f8b700; }

.bgg-g-input {
  width: 190px;
  height: 24px;
  padding: 0 6px;
  margin-right: 6px;
  border: 1px solid rgba(248, 183, 0, .6);
  border-radius: 4px;
  background: rgba(0, 0, 0, .45);
  color: #f3e7c9;
  font-size: 13px;
  outline: none;
  vertical-align: middle;
}

.bgg-g-ok,
.bgg-g-no {
  display: inline-block;
  width: 20px;
  height: 20px;
  margin-right: 4px;
  border-radius: 50%;
  font-size: 13px;
  line-height: 20px;
  text-align: center;
  cursor: pointer;
  vertical-align: middle;
}
.bgg-g-ok { color: #4fbf52; }
.bgg-g-ok:hover { background: rgba(79, 191, 82, .18); }
.bgg-g-no { color: #e0524a; }
.bgg-g-no:hover { background: rgba(224, 82, 74, .18); }

/* 固定第一条（小站布告） */
[data-bgg-channel] .bgg-art-item.is-pinned .main-title::after {
  content: "置顶";
  margin-left: 8px;
  padding: 0 4px;
  font-size: 10px;
  color: #f8b700;
  border: 1px solid rgba(248, 183, 0, .5);
  border-radius: 3px;
  vertical-align: 1px;
}

/* 新增文章入口 */
[data-bgg-channel] .bgg-art-new {
  display: flex;
  align-items: center;
  color: #f8b700 !important;
  border-top: 1px dashed rgba(212, 165, 58, .35) !important;
}
[data-bgg-channel] .bgg-art-new .bgg-art-plus {
  display: inline-block;
  width: 26px;
  margin-right: 14px;
  text-align: center;
  font-size: 16px;
}

/* 编辑器放大：连羊皮纸外壳一起放大，内容不越出边框 */
@media screen and (min-width: 961px) {
  #bgg-modal .version-selection-pop.is-editor {
    width: 1160px;
    height: 830px;
    max-height: 94vh;
  }
  #bgg-modal .bgg-modal-body.is-editor {
    width: calc(100% - 48px) !important;
    max-width: calc(100% - 48px) !important;
    height: calc(100% - 150px) !important;
    max-height: none !important;
    margin-top: 6px;
  }
}

@media screen and (max-width: 960px) {
  #bgg-modal .bgg-modal-body.is-editor {
    width: calc(100% - 24px) !important;
    max-width: calc(100% - 24px) !important;
    height: calc(100% - 130px) !important;
    max-height: none !important;
  }
}


/* 读取中：贴着背景漩涡的暗纹，低调转动 */
.bgg-vortex-loading {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 210px;
  height: 210px;
  margin: -105px 0 0 -105px;
  z-index: 9;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity .3s ease;
}
.bgg-vortex-loading.show { opacity: .78; visibility: visible; }

.bgg-vortex {
  width: 100%;
  height: 100%;
  background: url(../img/loading-vortex.png?v=3) center / contain no-repeat;
  animation: bggVortexStep 9s steps(28, end) infinite;
  will-change: transform;
  transform-origin: 50% 50%;
}
@keyframes bggVortexStep {
  to { transform: rotate(-360deg); }
}

.bgg-vortex-tip {
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  margin-top: 2px;
  text-align: center;
  font-size: 13px;
  letter-spacing: .14em;
  color: rgba(236, 220, 190, .84);
  text-shadow: 0 1px 4px rgba(0, 0, 0, .45);
  animation: bggTipPulse 2.4s steps(2, end) infinite;
}
@keyframes bggTipPulse {
  0% { opacity: .7; }
  100% { opacity: 1; }
}

/* 下拉首行文字后的读取小圆圈 */
.bgg-g-spin {
  display: inline-block;
  width: 11px;
  height: 11px;
  margin-left: 7px;
  vertical-align: -1px;
  border-radius: 50%;
  border: 1px solid rgba(248, 183, 0, .28);
  border-top-color: #f8b700;
  animation: bggSpin .8s linear infinite;
}
@keyframes bggSpin { to { transform: rotate(360deg); } }

/* 漩涡层按背景图漩涡圆心定位（PC / 手机两套）
   PC 背景 popup-bg-pc.jpg 是 1000×660，实测漩涡圆（螺旋眼）在 (507, 347)；
   手机背景 popup-bg-mobile.jpg 是 692×926，实测在 (344, 459)。
   面板背景用 100% 100% 拉伸，两套尺寸都等比，所以用百分比即可精确落在同一个圆心，
   配合图片自身“图形圆心=图片圆心”，旋转时不会绕偏。 */
@media (min-width: 961px) {
  .bgg-vortex-loading { left: 50.7%; top: 52.6%; }
}
@media (max-width: 960px) {
  .bgg-vortex-loading { left: 49.71%; top: 49.57%; }
}
