/* ============================================================
   AIRR · 右侧反馈栏（全站公共组件）
   配色对齐 index.html :root 设计令牌（此处独立硬编码，
   因静态页不含这些 CSS 变量）
   ============================================================ */

.fbb-root {
  --fbb-bg:       #14141d;
  --fbb-surface:  #1e1e2a;
  --fbb-border:   rgba(255, 255, 255, 0.10);
  --fbb-border2:  rgba(255, 255, 255, 0.18);
  --fbb-text:     #f0eef8;
  --fbb-text2:    #9896b0;
  --fbb-text3:    #5e5c78;
  --fbb-accent:   #7c6af7;
  --fbb-accent2:  #a594ff;
  --fbb-glow:     rgba(124, 106, 247, 0.25);
  --fbb-danger:   #e85555;
  --fbb-safe:     #4ecb8d;
  font-family: 'Noto Sans SC', 'Sora', -apple-system, 'Segoe UI', sans-serif;
  font-size: 14px;
  line-height: 1.6;
  color: var(--fbb-text);
}

/* ---------- 展开卡片：右缘悬浮、从 12vh 起固定高 74vh（撑满中部，内部文本框自滚，卡片不裁切收起把手） ---------- */
/* z-index 策略：高于站内常规层（≤1000），低于支付弹层（1200） */
.fbb-card {
  position: fixed;
  right: 14px;
  top: 12vh;
  z-index: 1100;
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 320px;
  height: 74vh;
  padding: 16px;
  background: rgba(20, 20, 29, 0.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--fbb-border);
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.45), 0 0 24px var(--fbb-glow);
  transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.28s;
}
.fbb-root.fbb-collapsed .fbb-card {
  transform: translateX(calc(100% + 24px));
  opacity: 0;
  pointer-events: none;
}

/* ---------- 卡片左缘收起把手 ---------- */
.fbb-handle {
  position: absolute;
  left: -22px;
  top: 50%;
  transform: translateY(-50%);
  width: 22px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(20, 20, 29, 0.92);
  border: 1px solid var(--fbb-border);
  border-right: none;
  border-radius: 10px 0 0 10px;
  color: var(--fbb-text2);
  cursor: pointer;
  font-size: 14px;
  user-select: none;
}
.fbb-handle:hover { color: var(--fbb-accent2); border-color: var(--fbb-border2); }

/* ---------- 收起后的右缘小标签 ---------- */
.fbb-tab {
  position: fixed;
  right: 0;
  top: 42vh;
  z-index: 1100;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 12px 7px;
  background: rgba(20, 20, 29, 0.92);
  border: 1px solid var(--fbb-border);
  border-right: none;
  border-radius: 12px 0 0 12px;
  color: var(--fbb-text2);
  cursor: pointer;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.4);
  transition: color 0.2s, transform 0.28s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.28s;
}
.fbb-tab:hover { color: var(--fbb-accent2); }
.fbb-tab .fbb-tab-text {
  writing-mode: vertical-rl;
  font-size: 12px;
  letter-spacing: 3px;
}
.fbb-root:not(.fbb-collapsed) .fbb-tab {
  transform: translateX(110%);
  opacity: 0;
  pointer-events: none;
}

/* ---------- 卡片内部 ---------- */
.fbb-btn {
  display: block;
  width: 100%;
  padding: 9px 12px;
  border-radius: 10px;
  font-size: 14px;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s;
  text-align: center;
}
.fbb-btn-plan {
  background: transparent;
  border: 1px solid var(--fbb-border2);
  color: var(--fbb-text);
}
.fbb-btn-plan:hover { border-color: var(--fbb-accent); color: var(--fbb-accent2); }
.fbb-btn-send {
  background: var(--fbb-accent);
  border: 1px solid transparent;
  color: #fff;
  font-weight: 500;
}
.fbb-btn-send:hover { background: var(--fbb-accent2); box-shadow: 0 0 18px var(--fbb-glow); }
.fbb-btn-send:disabled { opacity: 0.55; cursor: not-allowed; box-shadow: none; }

.fbb-textarea {
  flex: 1;
  width: 100%;
  min-height: 0;
  padding: 10px 12px;
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid var(--fbb-border);
  border-radius: 10px;
  color: var(--fbb-text);
  font-family: inherit;
  font-size: 13px;
  line-height: 1.6;
  resize: none;
  overflow-y: auto;
}
.fbb-textarea::placeholder { color: var(--fbb-text3); }
.fbb-textarea:focus { outline: none; border-color: var(--fbb-accent); }
.fbb-textarea::-webkit-scrollbar { width: 6px; }
.fbb-textarea::-webkit-scrollbar-thumb { background: var(--fbb-border2); border-radius: 3px; }

/* ---------- 邮箱区（默认隐藏，第一次点发送后展开） ---------- */
.fbb-email-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  pointer-events: none;
  transition: max-height 0.28s ease, opacity 0.28s ease;
}
.fbb-root.fbb-email-open .fbb-email-section {
  max-height: 140px;
  opacity: 1;
  pointer-events: auto;
}
.fbb-email-label {
  font-size: 12px;
  line-height: 1.5;
  color: var(--fbb-text2);
}
.fbb-email {
  width: 100%;
  padding: 8px 12px;
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid var(--fbb-border);
  border-radius: 10px;
  color: var(--fbb-text);
  font-family: inherit;
  font-size: 13px;
}
.fbb-email::placeholder { color: var(--fbb-text3); }
.fbb-email:focus { outline: none; border-color: var(--fbb-accent); }
@keyframes fbb-email-pulse {
  0%, 100% { border-color: var(--fbb-border); box-shadow: none; }
  50% { border-color: var(--fbb-accent); box-shadow: 0 0 12px var(--fbb-glow); }
}
.fbb-email.fbb-pulse {
  animation: fbb-email-pulse 1.2s ease-in-out 2;
}
.fbb-skip-email {
  align-self: center;
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  font-size: 12px;
  color: var(--fbb-text3);
  cursor: pointer;
  text-decoration: underline;
}
.fbb-skip-email:hover { color: var(--fbb-accent2); }
.fbb-skip-email:disabled { opacity: 0.5; cursor: not-allowed; }
.fbb-skip-email[hidden] { display: none; }

.fbb-send-hint {
  margin: 0;
  font-size: 11px;
  line-height: 1.55;
  color: var(--fbb-text3);
  text-align: center;
}

.fbb-status {
  min-height: 0;
  font-size: 12px;
  color: var(--fbb-text3);
  text-align: center;
}
.fbb-status.fbb-ok { color: var(--fbb-safe); }
.fbb-status.fbb-err { color: var(--fbb-danger); }
.fbb-status-main { line-height: 1.55; }
.fbb-status-dismiss {
  margin-top: 6px;
  font-size: 11px;
  line-height: 1.45;
  color: var(--fbb-text3);
}
.fbb-status.fbb-ok .fbb-status-dismiss { color: rgba(78, 203, 141, 0.72); }
.fbb-status-link {
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  font-size: 12px;
  color: var(--fbb-accent2);
  cursor: pointer;
  text-decoration: underline;
  white-space: nowrap;
}
.fbb-status-link:hover { color: var(--fbb-accent); }

/* ---------- 迭代计划弹层 ---------- */
.fbb-modal-mask {
  position: fixed;
  inset: 0;
  z-index: 1150;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(5, 5, 10, 0.72);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
.fbb-modal {
  width: min(560px, 100%);
  max-height: 78vh;
  display: flex;
  flex-direction: column;
  background: var(--fbb-bg);
  border: 1px solid var(--fbb-border2);
  border-radius: 18px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.6);
  overflow: hidden;
}
.fbb-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--fbb-border);
}
.fbb-modal-head h3 { margin: 0; font-size: 16px; font-weight: 600; }
.fbb-modal-close {
  background: none;
  border: none;
  color: var(--fbb-text2);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  padding: 4px 8px;
}
.fbb-modal-close:hover { color: var(--fbb-text); }
.fbb-modal-body {
  padding: 16px 20px 22px;
  overflow-y: auto;
}
.fbb-modal-body::-webkit-scrollbar { width: 6px; }
.fbb-modal-body::-webkit-scrollbar-thumb { background: var(--fbb-border2); border-radius: 3px; }
.fbb-plan-intro { color: var(--fbb-text2); font-size: 13px; margin: 0 0 16px; }
.fbb-plan-item {
  position: relative;
  padding: 0 0 16px 18px;
  border-left: 2px solid var(--fbb-border);
}
.fbb-plan-item:last-child { padding-bottom: 4px; }
.fbb-plan-item::before {
  content: '';
  position: absolute;
  left: -5px;
  top: 7px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--fbb-accent);
}
.fbb-plan-item.fbb-upcoming { border-left-style: dashed; }
.fbb-plan-item.fbb-upcoming::before { background: var(--fbb-text3); }
.fbb-plan-stage { font-size: 12px; color: var(--fbb-accent2); letter-spacing: 1px; }
.fbb-plan-title { font-size: 14px; font-weight: 600; margin: 2px 0; }
.fbb-plan-desc { font-size: 13px; color: var(--fbb-text2); margin: 0; }
.fbb-plan-section-label {
  margin: 18px 0 12px;
  font-size: 12px;
  color: var(--fbb-text3);
  letter-spacing: 2px;
}

/* ---------- 窄屏适配 ---------- */
@media (max-width: 720px) {
  .fbb-card {
    right: 10px;
    top: auto;
    bottom: 16px;
    width: min(300px, calc(100vw - 52px));
    height: auto;
    max-height: 64vh;
  }
  .fbb-handle { height: 48px; }
  .fbb-tab { top: auto; bottom: 22vh; }
  .fbb-textarea { min-height: 140px; max-height: 36vh; }
}

@media print {
  .fbb-root { display: none !important; }
}
