/* =========================================================
   ZDKHot 意见收集：右侧贴边入口 + 抽屉表单
   沿用 style.css 的设计变量，保持与主站一致的观感
   ========================================================= */

/* ---------------- 右侧贴边入口 ---------------- */

.fb-fab {
  position: fixed;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  z-index: 55;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  padding: 13px 8px;
  border: 1px solid var(--brand-line);
  border-right: 0;
  border-radius: 10px 0 0 10px;
  background: #fff;
  color: var(--brand-dark);
  font-size: 12.5px;
  letter-spacing: .06em;
  cursor: pointer;
  box-shadow: -2px 2px 12px rgba(16, 24, 40, .07);
  transition: background .15s, box-shadow .15s, padding-left .15s;
}
.fb-fab:hover {
  background: var(--brand-soft);
  padding-left: 12px;
  box-shadow: -3px 3px 16px rgba(16, 24, 40, .12);
}
.fb-fab svg { width: 17px; height: 17px; flex: none; }
/* 中文竖排：贴边标签只占很窄一条，不挡内容 */
.fb-fab span {
  writing-mode: vertical-rl;
  text-orientation: upright;
  line-height: 1.1;
}
/* 抽屉打开时入口让位，免得压在抽屉上面 */
.fb-fab.is-hidden { opacity: 0; pointer-events: none; }

/* ---------------- 遮罩 ---------------- */

.fb-mask {
  position: fixed;
  inset: 0;
  z-index: 70;
  background: rgba(16, 20, 28, .34);
  opacity: 0;
  visibility: hidden;
  transition: opacity .2s, visibility .2s;
}
.fb-mask.is-open { opacity: 1; visibility: visible; }

/* ---------------- 抽屉 ---------------- */

.fb-drawer {
  position: fixed;
  top: 0; right: 0; bottom: 0;
  width: min(92vw, 392px);
  z-index: 71;
  display: flex;
  flex-direction: column;
  background: #fff;
  border-left: 1px solid var(--border);
  box-shadow: -10px 0 34px rgba(16, 24, 40, .13);
  transform: translateX(100%);
  visibility: hidden;
  transition: transform .24s cubic-bezier(.4, 0, .2, 1), visibility .24s;
}
.fb-drawer.is-open { transform: none; visibility: visible; }

.fb-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 17px 18px 14px;
  border-bottom: 1px solid var(--border);
}
.fb-title {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 7px;
}
.fb-title i {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--brand);
  flex: none;
}
.fb-sub {
  margin: 6px 0 0;
  font-size: 12.5px;
  line-height: 1.62;
  color: var(--text-3);
}
.fb-close {
  flex: none;
  width: 28px; height: 28px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--text-3);
  font-size: 15px;
  cursor: pointer;
  transition: background .14s, color .14s;
}
.fb-close:hover { background: var(--bg-hover); color: var(--text); }

.fb-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 16px 18px 18px;
}

/* ---------------- 表单 ---------------- */

.fb-group { margin-bottom: 16px; }
.fb-label {
  margin: 0 0 8px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-2);
  display: flex;
  align-items: center;
  gap: 6px;
}
.fb-label em {
  font-style: normal;
  font-weight: 400;
  font-size: 11.5px;
  color: var(--text-3);
}

/* 类型：单选 */
.fb-kinds { display: flex; flex-wrap: wrap; gap: 7px; }
.fb-kind {
  padding: 6px 13px;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  background: #fff;
  color: var(--text-2);
  font-size: 12.5px;
  cursor: pointer;
  transition: border-color .14s, background .14s, color .14s;
}
.fb-kind:hover { border-color: var(--brand-line); color: var(--brand-dark); }
.fb-kind.is-on {
  border-color: var(--brand);
  background: var(--brand-soft);
  color: var(--brand-dark);
  font-weight: 600;
}

/* 想看什么：多选标签 */
.fb-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.fb-chip {
  padding: 5px 11px;
  border-radius: 7px;
  border: 1px solid var(--border);
  background: var(--bg-soft);
  color: var(--text-2);
  font-size: 12px;
  cursor: pointer;
  transition: border-color .14s, background .14s, color .14s;
}
.fb-chip:hover { border-color: var(--brand-line); }
.fb-chip.is-on {
  border-color: var(--brand);
  background: var(--brand-soft);
  color: var(--brand-dark);
  font-weight: 600;
}

.fb-ta,
.fb-input {
  width: 100%;
  box-sizing: border-box;
  padding: 9px 11px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--text);
  font-family: inherit;
  font-size: 13px;
  line-height: 1.6;
  transition: border-color .14s, box-shadow .14s;
}
.fb-ta { min-height: 92px; resize: vertical; }
.fb-ta:focus,
.fb-input:focus {
  outline: 0;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(31, 111, 235, .12);
}
.fb-ta::placeholder,
.fb-input::placeholder { color: #b8bdc7; }

.fb-count {
  margin: 5px 0 0;
  font-size: 11.5px;
  color: var(--text-3);
  text-align: right;
}

.fb-submit {
  width: 100%;
  margin-top: 4px;
  padding: 10px;
  border: 0;
  border-radius: var(--radius-sm);
  background: var(--brand);
  color: #fff;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s;
}
.fb-submit:hover:not(:disabled) { background: var(--brand-dark); }
.fb-submit:disabled { background: #b9c6dd; cursor: default; }

.fb-note {
  margin: 10px 0 0;
  font-size: 12.5px;
  line-height: 1.6;
  min-height: 19px;
}
.fb-note.is-ok { color: #1a7f4b; }
.fb-note.is-err { color: #c0392b; }

.fb-foot {
  margin: 14px 0 0;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  font-size: 11.5px;
  line-height: 1.7;
  color: var(--text-3);
}

/* 提交成功后：整块换成一句致谢，比弹 toast 更扎实 */
.fb-done {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex: 1;
  padding: 30px 26px;
  text-align: center;
}
.fb-drawer.is-done .fb-body { display: none; }
.fb-drawer.is-done .fb-done { display: flex; }
.fb-done-mark {
  width: 46px; height: 46px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #eafaf1;
  color: #1a7f4b;
  font-size: 22px;
}
.fb-done h4 { margin: 0; font-size: 15px; font-weight: 700; color: var(--text); }
.fb-done p { margin: 0; font-size: 12.5px; line-height: 1.7; color: var(--text-3); }

/* ---------------- 窄屏：入口改成右下角圆钮 ---------------- */

@media (max-width: 820px) {
  .fb-fab {
    top: auto;
    bottom: 76px;
    right: 12px;
    border-radius: 999px;
    border-right: 1px solid var(--brand-line);
    padding: 12px;
    transform: none;
    box-shadow: 0 4px 14px rgba(16, 24, 40, .14);
  }
  .fb-fab span { display: none; }
  .fb-fab:hover { padding-left: 12px; }
}
