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

.rb-assistant {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 120;
  font-family: "Sora", sans-serif;
  pointer-events: none;
}

.rb-assistant-fab,
.rb-assistant-panel {
  pointer-events: auto;
}

.rb-assistant-fab {
  position: relative;
  width: 62px;
  height: 62px;
  border: 0;
  border-radius: 50%;
  cursor: pointer;
  color: #fff;
  background: linear-gradient(135deg, #1f5fd6, #14c8b8);
  box-shadow: 0 16px 36px rgba(20, 200, 184, .35);
  display: grid;
  place-items: center;
  transition: transform .25s ease, box-shadow .25s ease;
}
.rb-assistant-fab:hover {
  transform: translateY(-3px) scale(1.03);
  box-shadow: 0 20px 44px rgba(31, 95, 214, .4);
}
.rb-assistant-fab-pulse {
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 2px solid rgba(20, 200, 184, .45);
  animation: rbPulse 2.2s ease-out infinite;
  pointer-events: none;
}
.rb-assistant[data-open="true"] .rb-assistant-fab-pulse { display: none; }
.rb-assistant[data-open="true"] .rb-assistant-fab {
  background: #0b2134;
  border: 1px solid rgba(110, 231, 216, .35);
}

/* Closed by default — floating icon only */
.rb-assistant-panel {
  display: none !important;
  position: absolute;
  right: 0;
  bottom: 76px;
  width: min(400px, calc(100vw - 28px));
  height: min(640px, calc(100vh - 110px));
  flex-direction: column;
  background: #071422;
  color: #e8f0f5;
  border: 1px solid rgba(110, 231, 216, .22);
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 30px 80px rgba(0, 0, 0, .45);
  transform-origin: bottom right;
}

.rb-assistant[data-open="true"] .rb-assistant-panel {
  display: flex !important;
  animation: rbOpen .22s ease;
}

@keyframes rbOpen {
  from { opacity: 0; transform: translateY(12px) scale(.96); }
  to { opacity: 1; transform: none; }
}

.rb-assistant-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 16px 14px;
  background: linear-gradient(120deg, #0b2134, #0a2a36);
  border-bottom: 1px solid rgba(255,255,255,.08);
  flex-shrink: 0;
}
.rb-assistant-identity {
  display: flex;
  align-items: center;
  gap: 12px;
}
.rb-assistant-avatar {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: .85rem;
  letter-spacing: .04em;
  background: linear-gradient(135deg, #1f5fd6, #14c8b8);
  color: #fff;
}
.rb-assistant-head h2 {
  margin: 0;
  font-family: "Syne", sans-serif;
  font-size: 1.05rem;
  letter-spacing: -.02em;
  color: #fff;
}
.rb-assistant-head p {
  margin: 3px 0 0;
  font-size: .72rem;
  color: #9eb0c2;
  display: flex;
  align-items: center;
  gap: 6px;
}
.rb-online {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #35d6c4;
  box-shadow: 0 0 0 4px rgba(53, 214, 196, .18);
}
.rb-assistant-close {
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: rgba(255,255,255,.06);
  color: #fff;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
}
.rb-assistant-close:hover { background: rgba(255,255,255,.12); }

.rb-assistant-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  background:
    radial-gradient(circle at 90% 0%, rgba(20,200,184,.08), transparent 40%),
    #050f1a;
}

.rb-msg { display: flex; }
.rb-msg-user { justify-content: flex-end; }
.rb-msg-bot { justify-content: flex-start; }

.rb-bubble {
  max-width: 92%;
  padding: 12px 14px;
  border-radius: 16px;
  font-size: .9rem;
  line-height: 1.55;
}
.rb-msg-bot .rb-bubble {
  background: #102536;
  border: 1px solid rgba(255,255,255,.06);
  border-bottom-left-radius: 6px;
  color: #dce7ee;
}
.rb-msg-user .rb-bubble {
  background: linear-gradient(135deg, #1f5fd6, #149f96);
  color: #fff;
  border-bottom-right-radius: 6px;
}
.rb-bubble p { margin: 0 0 .7rem; color: inherit; }
.rb-bubble p:last-child { margin-bottom: 0; }
.rb-bubble a { color: #6ee7d8; font-weight: 700; }
.rb-bubble strong { color: #fff; }

.rb-list {
  margin: .4rem 0 .8rem;
  padding-left: 1.15rem;
  color: #c5d4df;
}
.rb-list li { margin: .35rem 0; }

.rb-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}
.rb-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 12px;
  border-radius: 999px;
  font-size: .78rem;
  font-weight: 700;
  text-decoration: none !important;
}
.rb-action.call {
  background: #14c8b8;
  color: #04201d !important;
}
.rb-action.mail {
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(110, 231, 216, .35);
  color: #6ee7d8 !important;
}

.rb-typing {
  display: inline-flex;
  gap: 5px;
  align-items: center;
  min-height: 18px;
}
.rb-typing span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #6ee7d8;
  animation: rbDot 1.2s ease-in-out infinite;
}
.rb-typing span:nth-child(2) { animation-delay: .15s; }
.rb-typing span:nth-child(3) { animation-delay: .3s; }

.rb-assistant-quick {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 0 14px 10px;
  scrollbar-width: none;
  flex-shrink: 0;
}
.rb-assistant-quick::-webkit-scrollbar { display: none; }
.rb-assistant-quick button {
  flex: 0 0 auto;
  border: 1px solid rgba(110, 231, 216, .28);
  background: rgba(20, 200, 184, .08);
  color: #d7f7f2;
  border-radius: 999px;
  padding: 8px 12px;
  font-size: .75rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}
.rb-assistant-quick button:hover {
  background: rgba(20, 200, 184, .18);
}

.rb-assistant-form {
  display: flex;
  gap: 8px;
  padding: 12px 14px 14px;
  border-top: 1px solid rgba(255,255,255,.08);
  background: #071422;
  flex-shrink: 0;
}
.rb-assistant-form input {
  flex: 1;
  border: 1px solid #243849;
  background: #0b1c2b;
  color: #fff;
  border-radius: 14px;
  padding: 12px 14px;
  font: inherit;
  outline: 0;
}
.rb-assistant-form input:focus {
  border-color: #14c8b8;
  box-shadow: 0 0 0 3px rgba(20, 200, 184, .15);
}
.rb-assistant-form button {
  width: 46px;
  height: 46px;
  border: 0;
  border-radius: 14px;
  background: linear-gradient(135deg, #1f5fd6, #14c8b8);
  color: #fff;
  cursor: pointer;
  display: grid;
  place-items: center;
}

@keyframes rbPulse {
  0% { transform: scale(.95); opacity: .9; }
  100% { transform: scale(1.35); opacity: 0; }
}
@keyframes rbDot {
  0%, 80%, 100% { opacity: .35; transform: translateY(0); }
  40% { opacity: 1; transform: translateY(-3px); }
}

@media (max-width: 720px) {
  .rb-assistant {
    right: 14px;
    bottom: 14px;
  }
  .rb-assistant-panel {
    bottom: 72px;
    height: min(70vh, 560px);
  }
  .back-top {
    right: 16px;
    bottom: 88px;
  }
}
