/**
 * net-retry.css — 网络抖动时的「页面内淡色小字」
 *
 * 用户 2026-10-21：「网络问题不要跳出弹出错误」。
 * 所以这里只有一种样式：**不遮挡内容、不红、不闪、不弹**的一行小字 + 一个文字按钮。
 * 真正的重试逻辑在 /assets/js/net-retry.js（DSNetRetry.showHint / clearHint）。
 *
 * ⚠️ 不要给 .net-hint 直接写 display —— 它由 JS 用 el.hidden 控制显隐；
 *    只在 :not([hidden]) 上写 display，hidden 才能真的藏住（.dsh-tools/check-hidden-css.mjs 查这个）。
 */

.net-hint {
  box-sizing: border-box;
  align-items: center;
  gap: 6px;
  margin: 8px 12px;
  padding: 7px 10px;
  border-radius: 8px;
  background: rgba(127, 135, 150, 0.10);
  color: var(--muted, #6b7484);
  font-size: 12px;
  line-height: 1.5;
  text-align: left;
  word-break: break-word;
}

.net-hint:not([hidden]) {
  display: flex;
}

.net-hint-icon {
  flex: 0 0 auto;
  opacity: 0.85;
  font-size: 13px;
}

.net-hint-text {
  flex: 1 1 auto;
  min-width: 0;
}

/* 文字按钮：看起来像链接，不像"错误弹窗的按钮" */
.net-hint-retry {
  flex: 0 0 auto;
  margin: 0;
  padding: 2px 4px;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
  opacity: 0.95;
}

.net-hint-retry:disabled {
  opacity: 0.55;
  cursor: default;
}

.net-hint-retry:focus-visible {
  outline: 2px solid var(--brand, #3a56e0);
  outline-offset: 2px;
  border-radius: 4px;
}

/* 没有宿主时（比如整页级失败）：底部一条很小的浮动提示，不挡内容、只占一行 */
.net-hint.is-floating {
  position: fixed;
  left: 50%;
  bottom: 14px;
  z-index: 900;
  margin: 0;
  max-width: min(92vw, 420px);
  transform: translateX(-50%);
  background: rgba(24, 28, 38, 0.78);
  color: #fff;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.18);
  backdrop-filter: blur(4px);
}

/* AI 回答气泡里那行「网络断了」：淡色、靠左、不抢眼 */
.net-hint.net-hint-inline {
  margin: 6px 0 0;
  padding: 0;
  background: transparent;
  color: var(--muted, #7a8599);
  font-size: 12px;
}

/* 深色模式：仍然是"淡"，不是红 */
[data-theme="dark"] .net-hint {
  background: rgba(255, 255, 255, 0.07);
  color: var(--muted, #9aa4b8);
}

[data-theme="dark"] .net-hint.net-hint-inline {
  background: transparent;
}

[data-theme="dark"] .net-hint.is-floating {
  background: rgba(12, 15, 22, 0.86);
  color: #e8ecf6;
}

@media (max-width: 420px) {
  .net-hint {
    margin: 6px 8px;
    font-size: 12px;
  }
  .net-hint.is-floating {
    max-width: 94vw;
    bottom: 10px;
  }
}
