/* 建议反馈：右下角悬浮按钮与弹窗。配色来自 site.css 的变量。 */

/* 悬浮按钮：右下角小尺寸。z-index 50 低于「添加到桌面」条（60）和各页弹层（80 / 1000），不抢它们的位置。 */
.cnm-fb-fab {
  position: fixed;
  right: calc(12px + env(safe-area-inset-right, 0px));
  bottom: calc(12px + env(safe-area-inset-bottom, 0px));
  z-index: 50;
  min-height: 36px;
  padding: 0 12px;
  font-size: 0.85rem;
  line-height: 1;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.16);
  /* 亮橙配色：在浅色页面上醒目，吸引点击反馈 */
  background: #ff6a1a;
  border-color: transparent;
  color: #fff;
  font-weight: 700;
  box-shadow: 0 6px 18px rgba(255, 106, 26, 0.45);
}
.cnm-fb-fab:hover { background: #ff7d38; }
/* 「添加到桌面」提示条（pwa.css，贴底全宽）出现时，把按钮抬到它上面 */
body:has(.pwa-bar) .cnm-fb-fab { bottom: calc(156px + env(safe-area-inset-bottom, 0px)); }
.cnm-fb-fab:focus-visible,
.cnm-fb-box button:focus-visible,
.cnm-fb-box textarea:focus-visible,
.cnm-fb-box input:focus-visible { outline: 2px solid var(--focus, #0f6e62); outline-offset: 2px; }

.cnm-fb-mask {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(15, 23, 32, 0.45);
}
.cnm-fb-box {
  width: 100%;
  max-width: 420px;
  max-height: 100%;
  overflow: auto;
  padding: 20px 20px calc(18px + env(safe-area-inset-bottom, 0px));
  background: var(--bg-elev, #fff);
  color: var(--text, #17191f);
  border: 1px solid var(--line, #e3e6ed);
  border-radius: var(--radius, 14px);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.25);
  font-family: var(--font, sans-serif);
}
.cnm-fb-box h2 { margin: 0 0 6px; font-size: 1.15rem; }
.cnm-fb-box p { margin: 6px 0; font-size: 0.9rem; line-height: 1.55; color: var(--muted, #5c6370); }
.cnm-fb-qline { overflow-wrap: anywhere; font-weight: 700; color: var(--text, #17191f) !important; }
.cnm-fb-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0; }
.cnm-fb-chip { min-height: 36px; padding: 0 14px; font-size: 0.9rem; }
.cnm-fb-chip.on { background: var(--brand, #0f6e62); border-color: var(--brand, #0f6e62); color: var(--on-brand, #fff); }
.cnm-fb-chip.on:hover { background: var(--brand, #0f6e62); }
.cnm-fb-chip:disabled { opacity: 0.5; cursor: default; }
.cnm-fb-chip.on:disabled { opacity: 1; }
.cnm-fb-area { display: block; width: 100%; box-sizing: border-box; min-height: 120px; resize: vertical; }
.cnm-fb-count { display: block; margin-top: 4px; text-align: right; font-size: 0.8rem; color: var(--muted, #5c6370); }
.cnm-fb-field { display: block; margin: 8px 0 4px; font-size: 0.88rem; font-weight: 650; }
.cnm-fb-box input[type="text"] { width: 100%; box-sizing: border-box; }
.cnm-fb-msg { min-height: 1.2em; margin: 8px 0 0 !important; font-size: 0.86rem !important; color: var(--bad, #b91c1c) !important; }
.cnm-fb-done { font-size: 0.95rem !important; }
.cnm-fb-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.cnm-fb-row button { flex: 1 1 auto; }
.cnm-fb-primary { background: var(--brand, #0f6e62); border-color: transparent; color: var(--on-brand, #fff); }
.cnm-fb-primary:hover { background: var(--brand, #0f6e62); filter: brightness(1.06); }
.cnm-fb-box button:disabled { opacity: 0.55; cursor: default; }

@media print { .cnm-fb-fab, .cnm-fb-mask { display: none !important; } }
