/* PC 机会情报 · 吐槽浮窗（深色金色 UI + 小程序文案） */
:root {
  --intel-fb-edge: 24px;
  --intel-fb-bottom: 48px;
}

.intel-fb-fab {
  position: fixed;
  /* right/left 由 intel-feedback.js 按 .wrapper 边界动态计算，保证不压住正文 */
  right: var(--intel-fb-right, 24px);
  left: auto;
  bottom: max(
    var(--intel-fb-bottom),
    calc(var(--intel-fb-bottom) + env(safe-area-inset-bottom, 0px))
  );
  z-index: 1200;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 22px;
  border-radius: 999px;
  border: 1px solid rgba(244, 197, 66, .45);
  background: linear-gradient(145deg, #1a2234 0%, #151d2e 100%);
  color: var(--gold, #f4c542);
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  box-shadow:
    0 10px 36px rgba(0, 0, 0, .4),
    0 0 0 4px rgba(244, 197, 66, .08);
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
  animation: intel-fb-pulse 2.8s ease-in-out infinite;
}
.intel-fb-fab:hover {
  transform: translateY(-3px);
  border-color: rgba(244, 197, 66, .65);
  box-shadow:
    0 16px 44px rgba(244, 197, 66, .18),
    0 0 0 6px rgba(244, 197, 66, .12);
  animation: none;
}
.intel-fb-fab--docked {
  position: static !important;
  right: auto !important;
  left: auto !important;
  bottom: auto !important;
  width: 100%;
  animation: none;
  padding: 10px 14px;
  border-radius: 12px;
  justify-content: center;
}
.intel-fb-fab--docked:hover { transform: translateY(-2px); }

.intel-fb-fab.hidden { display: none; }
.intel-fb-fab--left { right: auto !important; }
.intel-fb-fab--compact { padding: 12px 14px; gap: 0; }
.intel-fb-fab--compact .intel-fb-fab-text { display: none; }
.intel-fb-fab-icon { font-size: 18px; line-height: 1; }
.intel-fb-fab-text { letter-spacing: .04em; }

@keyframes intel-fb-pulse {
  0%, 100% {
    box-shadow:
      0 10px 36px rgba(0, 0, 0, .4),
      0 0 0 4px rgba(244, 197, 66, .08);
  }
  50% {
    box-shadow:
      0 14px 44px rgba(244, 197, 66, .16),
      0 0 0 8px rgba(244, 197, 66, .12);
  }
}

.intel-fb-mask {
  position: fixed;
  inset: 0;
  z-index: 1250;
  background: rgba(8, 12, 20, .62);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity .2s ease, visibility .2s ease;
}
.intel-fb-mask.show {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.intel-fb-dialog {
  position: fixed;
  z-index: 1260;
  left: 50%;
  top: 50%;
  width: min(480px, calc(100vw - 32px));
  max-height: min(90vh, 720px);
  overflow: auto;
  transform: translate(-50%, -46%) scale(.96);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: transform .22s ease, opacity .22s ease, visibility .22s ease;
  background: #151d2e;
  border: 1px solid rgba(244, 197, 66, .22);
  border-radius: 16px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, .5);
  padding: 22px 22px 18px;
}
.intel-fb-dialog.show {
  transform: translate(-50%, -50%) scale(1);
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.intel-fb-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}
.intel-fb-title {
  font-size: 20px;
  font-weight: 800;
  color: #f3f6fb;
  letter-spacing: .02em;
}
.intel-fb-close {
  border: none;
  background: transparent;
  color: #8b9bb4;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 6px;
}
.intel-fb-close:hover { color: #e2e8f0; background: rgba(255,255,255,.06); }

.intel-fb-intro {
  padding: 14px 14px 12px;
  border-radius: 12px;
  background: linear-gradient(145deg, rgba(244,197,66,.08) 0%, rgba(99,102,241,.08) 100%);
  border: 1px solid rgba(244, 197, 66, .18);
  margin-bottom: 14px;
}
.intel-fb-quote {
  font-size: 13px;
  font-weight: 600;
  color: #d6deea;
  line-height: 1.65;
  margin-bottom: 0;
}

.intel-fb-pm-card {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(0, 0, 0, .18);
  border: 1px solid rgba(255, 255, 255, .06);
}
.intel-fb-pm-body { flex: 1; min-width: 0; }
.intel-fb-pm-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(244, 197, 66, .15);
  border: 1px solid rgba(244, 197, 66, .35);
  color: var(--gold, #f4c542);
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.intel-fb-pm-label { font-size: 11px; color: #8b9bb4; display: block; }
.intel-fb-pm-name { font-size: 14px; font-weight: 700; color: #eef2f7; display: block; margin-top: 2px; }

.intel-fb-copy {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  width: 100%;
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px dashed rgba(244, 197, 66, .35);
  background: rgba(0, 0, 0, .15);
  color: #d6deea;
  font-size: 12px;
  cursor: pointer;
  text-align: center;
}
.intel-fb-copy:hover { border-color: rgba(244, 197, 66, .55); }
.intel-fb-copy-label { font-size: 12px; font-weight: 700; color: var(--gold, #f4c542); }
.intel-fb-copy-id {
  font-weight: 700;
  color: #f3f6fb;
  font-family: Menlo, Consolas, monospace;
  letter-spacing: .04em;
}
.intel-fb-copy-hint { color: #8b9bb4; font-size: 11px; }

.intel-fb-blame {
  display: inline-block;
  margin-top: 10px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  color: #c4b5fd;
  background: rgba(0, 0, 0, .2);
}

.intel-fb-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}
.intel-fb-tag {
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid #27364f;
  background: #19243a;
  color: #b8c5d9;
  font-size: 12px;
  cursor: pointer;
  transition: .15s;
}
.intel-fb-tag:hover { border-color: rgba(244, 197, 66, .35); color: #e2e8f0; }
.intel-fb-tag.active {
  border-color: rgba(244, 197, 66, .55);
  background: rgba(244, 197, 66, .12);
  color: var(--gold, #f4c542);
}

.intel-fb-textarea {
  width: 100%;
  min-height: 112px;
  resize: vertical;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid #27364f;
  background: #0e1624;
  color: #e8edf5;
  font-size: 14px;
  line-height: 1.6;
  font-family: inherit;
}
.intel-fb-textarea:focus {
  outline: none;
  border-color: rgba(244, 197, 66, .45);
  box-shadow: 0 0 0 2px rgba(244, 197, 66, .12);
}
.intel-fb-textarea::placeholder { color: #6b7a92; }

.intel-fb-contact-label {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 12px 0 6px;
  font-size: 12px;
  color: #b8c5d9;
}
.intel-fb-contact-opt { color: #6b7a92; font-size: 11px; }
.intel-fb-contact {
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid #27364f;
  background: #0e1624;
  color: #e8edf5;
  font-size: 13px;
}
.intel-fb-contact:focus {
  outline: none;
  border-color: rgba(244, 197, 66, .45);
}

.intel-fb-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 14px;
  gap: 12px;
}
.intel-fb-count { font-size: 12px; color: #6b7a92; }
.intel-fb-submit {
  padding: 10px 22px;
  border-radius: 999px;
  border: none;
  background: linear-gradient(135deg, #f4c542 0%, #e6a817 100%);
  color: #1a1200;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}
.intel-fb-submit:disabled {
  opacity: .45;
  cursor: not-allowed;
}
.intel-fb-cancel {
  display: block;
  width: 100%;
  margin-top: 10px;
  padding: 8px;
  border: none;
  background: transparent;
  color: #8b9bb4;
  font-size: 13px;
  cursor: pointer;
}
.intel-fb-cancel:hover { color: #d6deea; }

.intel-fb-toast {
  position: fixed;
  left: 50%;
  bottom: 120px;
  transform: translateX(-50%) translateY(12px);
  z-index: 1280;
  padding: 10px 16px;
  border-radius: 10px;
  background: rgba(21, 29, 46, .96);
  border: 1px solid rgba(244, 197, 66, .3);
  color: #eef2f7;
  font-size: 13px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease, transform .2s ease;
}
.intel-fb-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

@media (max-width: 768px) {
  .intel-fb-dialog--sheet {
    top: auto !important;
    left: 50% !important;
    right: auto !important;
    bottom: calc(8px + env(safe-area-inset-bottom, 0px)) !important;
    width: min(360px, calc(100vw - 28px)) !important;
    max-width: min(360px, calc(100vw - 28px)) !important;
    max-height: min(68dvh, calc(100dvh - 96px)) !important;
    height: auto !important;
    margin: 0;
    padding: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important;
    transform: translate(-50%, calc(100% + 24px)) !important;
    opacity: 1 !important;
    visibility: hidden;
    pointer-events: none;
    border-radius: 14px;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.55);
    transition: transform 0.28s cubic-bezier(0.32, 0.72, 0, 1), visibility 0.28s;
  }

  .intel-fb-dialog--sheet.show {
    transform: translate(-50%, 0) !important;
    visibility: visible;
    pointer-events: auto;
  }

  .intel-fb-dialog--sheet .intel-fb-intro,
  .intel-fb-dialog--sheet .intel-fb-contact-label,
  .intel-fb-dialog--sheet .intel-fb-contact {
    display: none;
  }

  .intel-fb-dialog--sheet .intel-fb-head {
    flex-shrink: 0;
    margin: 0;
    padding: 8px 14px 10px;
    border-radius: 14px 14px 0 0;
  }

  .intel-fb-dialog--sheet .intel-fb-head::before {
    content: '';
    display: block;
    width: 36px;
    height: 4px;
    margin: 0 auto 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.16);
  }

  .intel-fb-dialog--sheet .intel-fb-title {
    font-size: 16px;
  }

  .intel-fb-dialog--sheet .intel-fb-close {
    min-width: 40px;
    min-height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.05);
  }

  .intel-fb-dialog--sheet .intel-fb-scroll {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 0 14px 8px;
  }

  .intel-fb-dialog--sheet .intel-fb-tags {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    gap: 8px;
    margin: 0 0 10px;
    padding-bottom: 2px;
  }

  .intel-fb-dialog--sheet .intel-fb-tags::-webkit-scrollbar {
    display: none;
  }

  .intel-fb-dialog--sheet .intel-fb-tag {
    flex-shrink: 0;
    min-height: 34px;
    padding: 7px 12px;
  }

  .intel-fb-dialog--sheet .intel-fb-textarea {
    min-height: 112px;
    font-size: 16px;
    line-height: 1.55;
  }

  .intel-fb-dialog--sheet .intel-fb-sheet-foot {
    flex-shrink: 0;
    padding: 10px 14px calc(12px + env(safe-area-inset-bottom, 0px));
    border-top: 1px solid #27364f;
    background: #151d2e;
    border-radius: 0 0 14px 14px;
  }

  .intel-fb-dialog--sheet .intel-fb-foot {
    position: static;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    margin: 0;
    padding: 0;
    background: transparent;
  }

  .intel-fb-dialog--sheet .intel-fb-submit {
    min-height: 44px;
    padding: 0 22px;
    font-size: 14px;
    border-radius: 12px;
  }

  .intel-fb-dialog--sheet .intel-fb-cancel {
    margin-top: 8px;
    min-height: 36px;
  }

  body.detail-has-mobile-bar .intel-fb-mask {
    z-index: 1540;
  }

  body.detail-has-mobile-bar .intel-fb-dialog--sheet {
    z-index: 1550;
  }
}

@media (max-width: 640px) {
  .intel-fb-fab--docked {
    padding: 12px 10px !important;
    font-size: 13px !important;
    min-height: 48px;
  }
  :root {
    --intel-fb-edge: 20px;
    --intel-fb-bottom: 24px;
  }
  .intel-fb-fab {
    padding: 12px 18px;
    font-size: 14px;
  }
  .intel-fb-dialog:not(.intel-fb-dialog--sheet) {
    width: calc(100vw - 20px);
    padding: 18px 16px 14px;
  }
}
