
#wr-widget {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 99997;
  font-family: 'DM Sans', sans-serif;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
}

/* The round button — same spot Botpress used */
#wr-fab {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--accent);
  border: none;
  cursor: pointer;
  box-shadow: 0 6px 28px rgba(0,201,106,0.45);
  transition: transform 0.2s, box-shadow 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  flex-shrink: 0;
}
#wr-fab:hover { transform: translateY(-2px); box-shadow: 0 10px 36px rgba(0,201,106,0.6); }
#wr-fab-logo {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.18rem;
  letter-spacing: 1px;
  color: var(--navy);
  line-height: 1;
  pointer-events: none;
  display: block;
}
#wr-unread-dot {
  position: absolute;
  top: 3px;
  right: 3px;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: #ff1744;
  border: 2px solid var(--navy);
  box-shadow: 0 0 0 2px rgba(255,23,68,0.18), 0 0 12px rgba(255,23,68,0.6);
  display: none;
}
#wr-unread-dot.show { display: block; }

/* The panel */
#wr-panel {
  display: none;
  width: 360px;
  max-height: 560px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.6);
  flex-direction: column;
  overflow: hidden;
}
#wr-panel.open { display: flex; }

#wr-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px 12px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
#wr-head-left { display: flex; flex-direction: column; gap: 2px; }
#wr-head-title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.2rem;
  letter-spacing: 1px;
  color: var(--text);
}
#wr-head-sub { font-size: 0.7rem; color: var(--muted); }
#wr-close {
  background: none;
  border: 1px solid var(--border);
  color: var(--muted);
  width: 28px; height: 28px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 0.78rem;
  display: flex; align-items: center; justify-content: center;
}
#wr-close:hover { border-color: var(--danger); color: var(--danger); }

#wr-gate {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 8px;
  padding: 32px 20px;
  text-align: center;
}
#wr-gate-icon { font-size: 2rem; }
#wr-gate-text { font-size: 0.84rem; color: var(--muted); line-height: 1.6; }

#wr-feed {
  flex: 1;
  overflow-y: auto;
  padding: 10px 10px 4px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  scroll-behavior: smooth;
}
#wr-feed::-webkit-scrollbar { width: 4px; }
#wr-feed::-webkit-scrollbar-track { background: transparent; }
#wr-feed::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }

.wr-msg {
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 9px 11px;
  font-size: 0.83rem;
  line-height: 1.55;
  color: var(--text);
  animation: wrMsgIn 0.2s ease;
}
@keyframes wrMsgIn { from { opacity:0; transform:translateY(4px); } to { opacity:1; transform:none; } }
.wr-msg-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 4px;
}
.wr-msg-name {
  font-weight: 700;
  font-size: 0.73rem;
  color: var(--accent);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 160px;
}
.wr-msg-name.anon { color: var(--muted); font-style: italic; }
.wr-msg-time { font-size: 0.66rem; color: var(--muted); flex-shrink: 0; }
.wr-msg-body { word-break: break-word; }
.wr-msg-actions { display: flex; gap: 5px; margin-top: 6px; justify-content: flex-end; }
.wr-btn-report, .wr-btn-delete {
  border-radius: 6px;
  padding: 2px 8px;
  font-size: 0.67rem;
  cursor: pointer;
  font-family: 'DM Sans', sans-serif;
  transition: all 0.15s;
}
.wr-btn-report {
  background: none;
  border: 1px solid rgba(255,77,109,0.25);
  color: var(--muted);
}
.wr-btn-report:hover { border-color: var(--danger); color: var(--danger); }
.wr-btn-delete {
  background: rgba(255,77,109,0.1);
  border: 1px solid rgba(255,77,109,0.35);
  color: var(--danger);
}
.wr-btn-delete:hover { background: rgba(255,77,109,0.22); }

#wr-empty {
  text-align: center;
  padding: 36px 16px;
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.7;
}

#wr-composer {
  border-top: 1px solid var(--border);
  padding: 10px 10px 10px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 7px;
}
#wr-input {
  width: 100%;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 9px 11px;
  color: var(--text);
  font-family: 'DM Sans', sans-serif;
  font-size: 0.83rem;
  resize: none;
  height: 68px;
  outline: none;
  transition: border-color 0.2s;
}
#wr-input:focus { border-color: var(--accent); }
#wr-input::placeholder { color: var(--muted); font-size: 0.8rem; }
#wr-bottom-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}
#wr-char { font-size: 0.68rem; color: var(--muted); }
#wr-bottom-btns { display: flex; gap: 6px; align-items: center; }
#wr-anon-btn {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--muted);
  border-radius: 7px;
  padding: 5px 10px;
  font-size: 0.7rem;
  cursor: pointer;
  font-family: 'DM Sans', sans-serif;
  white-space: nowrap;
  transition: all 0.15s;
}
#wr-anon-btn.on { border-color: var(--gold); color: var(--gold); background: rgba(244,197,66,0.08); }
#wr-send {
  background: var(--accent);
  border: none;
  color: var(--navy);
  border-radius: 7px;
  padding: 5px 14px;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  font-family: 'DM Sans', sans-serif;
  transition: background 0.15s;
}
#wr-send:hover { background: #33e088; }
#wr-send:disabled { opacity: 0.5; cursor: not-allowed; }

#wr-status {
  font-size: 0.72rem;
  color: var(--danger);
  min-height: 16px;
  padding: 0 2px;
}

@media (max-width: 480px) {
  #wr-panel { width: calc(100vw - 24px); max-height: 70vh; }
  #wr-widget { right: 12px; bottom: 12px; }
}
