/* feedback.css — 语音治理专项 T3：反馈/客服入口 + 表单 + toast 样式
   主色 F18D24（与全站语音引导主色一致）；从简、轻量、不依赖任何 UI 框架。 */

/* ── 右上角常驻浮动按钮 ── */
.fb-fab {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 9990;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border: none;
  border-radius: 22px;
  background: #F18D24;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(241, 141, 36, .35);
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
  /* P9：图标与文字禁止重叠/换行 */
  white-space: nowrap;
  flex-wrap: nowrap;
}
.fb-fab:hover {
  background: #e07f17;
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(241, 141, 36, .45);
}
.fb-fab:active { transform: translateY(0); }
.fb-fab__icon { font-size: 16px; line-height: 1; flex: 0 0 auto; }
.fb-fab__text { flex: 0 0 auto; }
.fb-fab:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }

/* ── 居中表单遮罩 ── */
.fb-modal {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: none;            /* 由 JS 切换为 flex 打开 */
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, .45);
  padding: 16px;
}
.fb-modal[style*="flex"] { display: flex; }

/* ── 表单卡片 ── */
.fb-card {
  width: 100%;
  max-width: 420px;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, .25);
  overflow: hidden;
  animation: fb-pop .18s ease;
}
@keyframes fb-pop {
  from { transform: scale(.96); opacity: 0; }
  to   { transform: scale(1); opacity: 1; }
}
.fb-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid #f0f0f0;
}
.fb-card__title { font-size: 16px; font-weight: 700; color: #333; }
.fb-card__close {
  border: none;
  background: transparent;
  font-size: 16px;
  color: #999;
  cursor: pointer;
  line-height: 1;
  padding: 4px;
}
.fb-card__close:hover { color: #333; }

.fb-card__body { padding: 16px 18px; }
.fb-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #555;
  margin-bottom: 6px;
}
.fb-textarea {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid #e2e2e2;
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 14px;
  line-height: 1.5;
  color: #333;
  resize: vertical;
  outline: none;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.fb-textarea:focus {
  border-color: #F18D24;
  box-shadow: 0 0 0 3px rgba(241, 141, 36, .15);
}

/* 自动附带信息（用户不可改） */
.fb-auto {
  margin-top: 12px;
  background: #faf7f2;
  border: 1px solid #f0e6d8;
  border-radius: 8px;
  padding: 8px 10px;
}
.fb-auto__row { display: flex; gap: 8px; font-size: 12px; padding: 2px 0; }
.fb-auto__key {
  flex: 0 0 48px;
  color: #b08654;
  font-weight: 600;
}
.fb-auto__val {
  flex: 1;
  color: #8a8a8a;
  word-break: break-all;
}
.fb-auto__val--mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 11px;
  max-height: 56px;
  overflow: auto;
}
/* P9：排查信息收敛为可展开的调试区，避免干扰普通用户 */
.fb-auto__debug {
  margin-top: 4px;
  padding: 4px 2px 2px;
}
.fb-auto__debug summary {
  font-size: 12px;
  color: #b08654;
  cursor: pointer;
  user-select: none;
}

/* 底部按钮 */
.fb-card__foot {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 12px 18px 16px;
}
.fb-btn {
  border: none;
  border-radius: 8px;
  padding: 9px 18px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s ease, opacity .15s ease;
}
.fb-btn--ghost {
  background: #f2f2f2;
  color: #555;
}
.fb-btn--ghost:hover { background: #e8e8e8; }
.fb-btn--primary {
  background: #F18D24;
  color: #fff;
}
.fb-btn--primary:hover { background: #e07f17; }
.fb-btn--primary:disabled { opacity: .6; cursor: default; }
.fb-btn:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }

/* ── toast（提交结果提示）── */
.fb-toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%) translateY(8px);
  background: rgba(33, 33, 33, .92);
  color: #fff;
  padding: 10px 18px;
  border-radius: 8px;
  font-size: 14px;
  z-index: 10001;
  box-shadow: 0 2px 10px rgba(0, 0, 0, .3);
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease, transform .2s ease;
  max-width: 88vw;
  text-align: center;
}
.fb-toast--show { opacity: 1; transform: translateX(-50%) translateY(0); }
.fb-toast--error { background: #d93025; }

/* 移动端：浮动按钮文字可隐藏，仅留图标 */
@media (max-width: 480px) {
  .fb-fab__text { display: none; }
  .fb-fab { padding: 10px; border-radius: 50%; }
}
