/* Slicead 门户 · 公告板块（右下角浮动入口 + 面板）
   样式独立于 admin.css / Tailwind，以 .sa- 前缀避免冲突。
   深色玻璃拟态风格，与门户深色页面保持一致，同时保证浅色页面上可读。 */

#slicead-announce-root {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 2147483000;
  font-family: "Manrope", "Inter", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
}

/* ---- 浮动按钮 ---- */
.sa-fab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 18px 0 14px;
  height: 46px;
  border: 1px solid rgba(105, 156, 255, 0.55);
  border-radius: 999px;
  background: rgba(24, 36, 70, 0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  color: #dfe4ff;
  cursor: pointer;
  user-select: none;
  transition: transform 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}
.sa-fab:hover {
  background: rgba(38, 55, 100, 0.9);
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.42);
}
.sa-fab:active {
  transform: translateY(0);
}
.sa-fab svg {
  flex: 0 0 auto;
  color: #699cff;
}
.sa-fab-label {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.3px;
  white-space: nowrap;
}
.sa-fab-dot {
  position: absolute;
  top: -2px;
  right: -2px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #ff5c6c;
  border: 2px solid rgba(7, 13, 31, 0.9);
  display: none;
}
.sa-fab.has-items .sa-fab-dot {
  display: block;
}

/* ---- 公告面板 ---- */
.sa-panel {
  position: fixed;
  right: 20px;
  bottom: 78px;
  width: min(420px, calc(100vw - 40px));
  max-height: min(560px, calc(100vh - 110px));
  display: none;
  flex-direction: column;
  overflow: hidden;
  border-radius: 18px;
  background: rgba(15, 24, 50, 0.96);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(105, 156, 255, 0.35);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.5);
  color: #dfe4ff;
}
.sa-panel.open {
  display: flex;
}
.sa-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px 10px;
  border-bottom: 1px solid rgba(105, 156, 255, 0.2);
}
.sa-panel-title {
  font-size: 16px;
  font-weight: 800;
  color: #dfe4ff;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.sa-panel-title svg {
  color: #699cff;
}
.sa-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #9eaad3;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}
.sa-close:hover {
  background: rgba(105, 156, 255, 0.18);
  color: #dfe4ff;
}
.sa-list {
  overflow-y: auto;
  padding: 6px 16px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  scrollbar-width: thin;
  scrollbar-color: rgba(105, 156, 255, 0.5) transparent;
}
.sa-item {
  border: 1px solid rgba(105, 156, 255, 0.16);
  background: rgba(24, 36, 70, 0.45);
  border-radius: 14px;
  padding: 12px 14px;
}
.sa-item-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 6px;
}
.sa-item-head-right {
  display: inline-flex;
  align-items: baseline;
  flex: 0 0 auto;
  gap: 8px;
  white-space: nowrap;
}
.sa-item-title {
  font-size: 15px;
  font-weight: 800;
  color: #ffffff;
  line-height: 1.35;
}
.sa-item-meta {
  flex: 0 0 auto;
  font-size: 12px;
  color: #9eaad3;
  white-space: nowrap;
}
.sa-version-badge {
  display: inline-block;
  margin-left: 8px;
  padding: 1px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  color: #001e4a;
  background: #8fb3ff;
  vertical-align: 1px;
}
.sa-content {
  margin: 0;
  padding: 0;
  font-family: inherit;
  font-size: 13.5px;
  line-height: 1.65;
  color: #c3cbe8;
  white-space: pre-wrap;
  word-break: break-word;
  overflow-wrap: anywhere;
}
.sa-empty {
  padding: 30px 16px;
  text-align: center;
  color: #9eaad3;
  font-size: 14px;
}

/* 面板打开时，把浮动按钮收进面板右侧，避免重叠遮挡 */
.sa-panel.open + .sa-fab {
  display: none;
}

@media (prefers-reduced-motion: reduce) {
  .sa-fab {
    transition: none;
  }
}
