/* RapidWeb Chatbot Widget */
#rw-chat-root, #rw-chat-root * { box-sizing: border-box; font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }

#rw-chat-root {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 999999;
}

.rw-launcher {
  position: relative;
  width: 60px; height: 60px; border-radius: 50%;
  background: linear-gradient(135deg, #facc15, #f59e0b);
  color: #0a0a0a;
  border: none; cursor: pointer;
  box-shadow: 0 10px 30px rgba(245, 158, 11, 0.35);
  display: flex; align-items: center; justify-content: center;
  transition: transform .2s ease;
}
.rw-launcher:hover { transform: scale(1.06); }
.rw-launcher svg { width: 28px; height: 28px; position: relative; z-index: 1; }
.rw-launcher::before {
  content: ""; position: absolute; inset: 0; border-radius: 50%;
  box-shadow: 0 0 0 0 rgba(250, 204, 21, 0.55);
  animation: rw-pulse 2s infinite;
  pointer-events: none;
}
@keyframes rw-pulse {
  0%   { box-shadow: 0 0 0 0    rgba(250,204,21,0.55); }
  70%  { box-shadow: 0 0 0 18px rgba(250,204,21,0); }
  100% { box-shadow: 0 0 0 0    rgba(250,204,21,0); }
}

.rw-window {
  position: absolute;
  bottom: 76px; right: 0;
  width: 360px; max-width: calc(100vw - 40px);
  height: 540px; max-height: calc(100vh - 120px);
  background: #0f0f10;
  border: 1px solid rgba(250, 204, 21, 0.25);
  border-radius: 18px;
  box-shadow: 0 20px 60px rgba(0,0,0,.5);
  display: none; flex-direction: column;
  overflow: hidden;
}
.rw-window.open { display: flex; }

.rw-header {
  padding: 14px 16px;
  background: linear-gradient(135deg, rgba(250,204,21,.12), rgba(245,158,11,.06));
  border-bottom: 1px solid rgba(255,255,255,.06);
  display: flex; align-items: center; justify-content: space-between;
}
.rw-title { color: #fff; font-weight: 800; font-size: 14px; letter-spacing: .02em; }
.rw-sub { color: #9ca3af; font-size: 11px; margin-top: 2px; }
.rw-close { background: transparent; border: none; color: #9ca3af; cursor: pointer; font-size: 20px; }
.rw-close:hover { color: #fff; }

.rw-messages {
  flex: 1; overflow-y: auto; padding: 16px;
  display: flex; flex-direction: column; gap: 10px;
  background: #0a0a0b;
}
.rw-msg { max-width: 85%; padding: 10px 13px; border-radius: 14px; font-size: 14px; line-height: 1.4; white-space: pre-wrap; word-wrap: break-word; }
.rw-msg.bot { background: #1a1a1c; color: #e5e7eb; border-bottom-left-radius: 4px; align-self: flex-start; }
.rw-msg.user { background: #facc15; color: #0a0a0a; border-bottom-right-radius: 4px; align-self: flex-end; font-weight: 600; }
.rw-msg.bot a { color: #facc15; text-decoration: underline; }

.rw-quick { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.rw-quick button {
  background: transparent;
  border: 1px solid rgba(250,204,21,.4);
  color: #facc15;
  padding: 7px 12px;
  border-radius: 999px;
  font-size: 12px; font-weight: 700;
  cursor: pointer;
  transition: all .15s ease;
}
.rw-quick button:hover { background: rgba(250,204,21,.1); }

.rw-input-row {
  display: flex; gap: 8px; padding: 12px;
  border-top: 1px solid rgba(255,255,255,.06);
  background: #0f0f10;
}
.rw-input {
  flex: 1; background: #1a1a1c; border: 1px solid rgba(255,255,255,.08);
  color: #fff; padding: 10px 12px; border-radius: 10px; font-size: 14px;
  outline: none;
}
.rw-input:focus { border-color: rgba(250,204,21,.5); }
.rw-send {
  background: linear-gradient(135deg,#facc15,#f59e0b);
  color: #0a0a0a; border: none; padding: 0 14px; border-radius: 10px;
  font-weight: 800; cursor: pointer;
}
.rw-send:disabled { opacity: .5; cursor: not-allowed; }

.rw-typing { display: inline-flex; gap: 4px; padding: 10px 13px; }
.rw-typing span {
  width: 6px; height: 6px; border-radius: 50%; background: #6b7280;
  animation: rw-blink 1.2s infinite;
}
.rw-typing span:nth-child(2){ animation-delay: .2s; }
.rw-typing span:nth-child(3){ animation-delay: .4s; }
@keyframes rw-blink { 0%,80%,100%{opacity:.3} 40%{opacity:1} }

.rw-form { display: flex; flex-direction: column; gap: 8px; margin-top: 6px; }
.rw-form input, .rw-form textarea {
  background: #1a1a1c; border: 1px solid rgba(255,255,255,.1);
  color: #fff; padding: 9px 11px; border-radius: 8px; font-size: 13px;
  outline: none; font-family: inherit;
}
.rw-form input:focus, .rw-form textarea:focus { border-color: rgba(250,204,21,.5); }
.rw-form button {
  background: linear-gradient(135deg,#facc15,#f59e0b);
  color: #0a0a0a; border: none; padding: 10px; border-radius: 8px;
  font-weight: 800; cursor: pointer; font-size: 13px;
}

.rw-header-actions { display: flex; gap: 4px; align-items: center; }
.rw-restart { background: transparent; border: none; color: #9ca3af; cursor: pointer; font-size: 18px; padding: 0 6px; transition: transform .3s ease, color .15s ease; }
.rw-restart:hover { color: #facc15; transform: rotate(180deg); }


.rw-sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}

/* Online status dot */
.rw-online {
  position: absolute;
  top: 4px; right: 4px;
  width: 14px; height: 14px;
  background: #22c55e;
  border: 2px solid #0a0a0b;
  border-radius: 50%;
  box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.5);
  animation: rw-online-pulse 2s infinite;
  z-index: 2;
}
@keyframes rw-online-pulse {
  0%   { box-shadow: 0 0 0 0   rgba(34,197,94,0.5); }
  70%  { box-shadow: 0 0 0 8px rgba(34,197,94,0); }
  100% { box-shadow: 0 0 0 0   rgba(34,197,94,0); }
}

/* Hover tooltip - desktop only */
.rw-tooltip {
  position: absolute;
  right: 72px;
  top: 50%;
  transform: translateY(-50%) translateX(6px);
  background: #0f0f10;
  color: #fff;
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity .18s ease, transform .18s ease;
  border: 1px solid rgba(250,204,21,.3);
  box-shadow: 0 6px 20px rgba(0,0,0,.4);
}
.rw-tooltip::after {
  content: "";
  position: absolute;
  right: -5px;
  top: 50%;
  transform: translateY(-50%) rotate(45deg);
  width: 8px; height: 8px;
  background: #0f0f10;
  border-right: 1px solid rgba(250,204,21,.3);
  border-top: 1px solid rgba(250,204,21,.3);
}
.rw-launcher:hover .rw-tooltip {
  opacity: 1;
  transform: translateY(-50%) translateX(0);
}
@media (hover: none), (max-width: 640px) {
  .rw-tooltip { display: none; }
}

/* Proactive bubble */
.rw-bubble {
  position: absolute;
  bottom: 72px; right: 0;
  background: #0f0f10;
  border: 1px solid rgba(250,204,21,.35);
  color: #fff;
  padding: 10px 32px 10px 14px;
  border-radius: 12px;
  font-size: 13px; font-weight: 600;
  white-space: nowrap;
  box-shadow: 0 6px 24px rgba(0,0,0,.4);
  cursor: pointer;
  opacity: 0; pointer-events: none;
  transform: translateY(8px);
  transition: opacity .25s ease, transform .25s ease;
}
.rw-bubble.rw-bubble-visible { opacity: 1; pointer-events: auto; transform: translateY(0); }
.rw-bubble-close {
  position: absolute; top: 6px; right: 8px;
  color: #6b7280; font-size: 14px; line-height: 1;
  cursor: pointer;
}
.rw-bubble-close:hover { color: #fff; }

/* Weaver role subtitle */
.rw-role {
  color: #9ca3af;
  font-size: 11px;
  margin-top: 2px;
  font-weight: 500;
}