/* ===========================================================================
   Paynovate Brand Hub — per-page comments
   Floating button + slide-in panel. Comments are scoped to the active page.
   =========================================================================== */

/* ---------- Floating button ---------- */
.bh-cmt-fab {
  position: fixed;
  right: var(--sp-5);
  bottom: var(--sp-5);
  z-index: 60;
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  padding: 12px 18px;
  border: none;
  border-radius: 999px;
  background: var(--pv-purple);
  color: #fff;
  font-family: var(--pv-font);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: var(--shadow);
  transition: transform .16s ease, background .16s ease, opacity .16s ease;
}
.bh-cmt-fab:hover { background: var(--pv-primary); transform: translateY(-1px); }
.bh-cmt-fab svg { width: 18px; height: 18px; flex: 0 0 18px; }
.bh-cmt-fab.is-hidden { opacity: 0; pointer-events: none; transform: translateY(8px); }

.bh-cmt-fab__count {
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .22);
  font-size: 12px;
  font-weight: 700;
  line-height: 20px;
  text-align: center;
}
.bh-cmt-fab__count.is-empty { display: none; }

/* ---------- Backdrop ---------- */
.bh-cmt-backdrop {
  position: fixed;
  inset: 0;
  z-index: 70;
  background: rgba(23, 23, 25, .28);
  opacity: 0;
  pointer-events: none;
  transition: opacity .22s ease;
}
.bh-cmt-backdrop.is-open { opacity: 1; pointer-events: auto; }

/* ---------- Panel ---------- */
.bh-cmt-panel {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 80;
  width: 400px;
  max-width: 92vw;
  height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--pv-white);
  box-shadow: -18px 0 48px rgba(23, 23, 25, .16);
  transform: translateX(100%);
  transition: transform .26s cubic-bezier(.4, 0, .2, 1);
}
.bh-cmt-panel.is-open { transform: translateX(0); }

.bh-cmt-head {
  flex: 0 0 auto;
  padding: var(--sp-5) var(--sp-5) var(--sp-4);
  border-bottom: 1px solid var(--pv-line);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--sp-3);
}
.bh-cmt-head__title {
  font-size: var(--fs-h3);
  font-weight: 600;
  color: var(--pv-purple);
  letter-spacing: -.01em;
}
.bh-cmt-head__sub {
  font-size: var(--fs-small);
  color: var(--pv-ink-soft);
  margin-top: 2px;
}
.bh-cmt-close {
  flex: 0 0 auto;
  width: 32px;
  height: 32px;
  border: none;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--pv-ink-soft);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  transition: background .14s ease, color .14s ease;
}
.bh-cmt-close:hover { background: var(--pv-neutral); color: var(--pv-ink); }

/* ---------- List ---------- */
.bh-cmt-list {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: var(--sp-4) var(--sp-5);
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
}
.bh-cmt-list::-webkit-scrollbar { width: 8px; }
.bh-cmt-list::-webkit-scrollbar-thumb { background: var(--pv-line); border-radius: 8px; }

.bh-cmt-item { display: flex; gap: var(--sp-3); }
.bh-cmt-avatar {
  flex: 0 0 34px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--pv-light-blue);
  color: var(--pv-blue);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
}
.bh-cmt-body { flex: 1 1 auto; min-width: 0; }
.bh-cmt-meta {
  display: flex;
  align-items: baseline;
  gap: var(--sp-2);
  margin-bottom: 2px;
}
.bh-cmt-author { font-size: var(--fs-small); font-weight: 600; color: var(--pv-ink); }
.bh-cmt-time { font-size: var(--fs-micro); color: var(--pv-ink-mute); }
.bh-cmt-text {
  font-size: var(--fs-small);
  line-height: 1.55;
  color: var(--pv-ink);
  white-space: pre-wrap;
  word-wrap: break-word;
  overflow-wrap: anywhere;
}
.bh-cmt-del {
  border: none;
  background: transparent;
  color: var(--pv-ink-mute);
  font-size: var(--fs-micro);
  cursor: pointer;
  padding: 2px 0;
  margin-top: 2px;
}
.bh-cmt-del:hover { color: var(--pv-primary); text-decoration: underline; }

/* ---------- States ---------- */
.bh-cmt-state {
  text-align: center;
  color: var(--pv-ink-soft);
  font-size: var(--fs-small);
  padding: var(--sp-7) var(--sp-4);
}
.bh-cmt-state__icon { font-size: 26px; color: var(--pv-purple-tint); margin-bottom: var(--sp-2); }

/* ---------- Composer ---------- */
.bh-cmt-form {
  flex: 0 0 auto;
  border-top: 1px solid var(--pv-line);
  padding: var(--sp-4) var(--sp-5) var(--sp-5);
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
  background: var(--pv-surface);
}
.bh-cmt-input,
.bh-cmt-textarea {
  width: 100%;
  font-family: var(--pv-font);
  font-size: var(--fs-small);
  color: var(--pv-ink);
  background: var(--pv-white);
  border: 1px solid var(--pv-line);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  transition: border-color .14s ease, box-shadow .14s ease;
}
.bh-cmt-input:focus,
.bh-cmt-textarea:focus {
  outline: none;
  border-color: var(--pv-blue);
  box-shadow: 0 0 0 3px rgba(38, 108, 178, .14);
}
.bh-cmt-textarea { resize: vertical; min-height: 76px; line-height: 1.5; }
.bh-cmt-form__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-3);
}
.bh-cmt-error { color: var(--pv-primary); font-size: var(--fs-micro); min-height: 14px; }
.bh-cmt-submit {
  flex: 0 0 auto;
  border: none;
  border-radius: var(--radius-sm);
  background: var(--pv-blue);
  color: #fff;
  font-family: var(--pv-font);
  font-size: var(--fs-small);
  font-weight: 600;
  padding: 10px 18px;
  cursor: pointer;
  transition: background .14s ease, opacity .14s ease;
}
.bh-cmt-submit:hover { background: var(--pv-purple); }
.bh-cmt-submit:disabled { opacity: .5; cursor: default; }

@media (max-width: 560px) {
  .bh-cmt-fab { right: var(--sp-4); bottom: var(--sp-4); }
}
