#root button[data-bf-biohub-pilot-access="pending"],
#root button[data-bf-biohub-pilot-access="denied"],
.bf-biohub-sheet[data-bf-biohub-pilot-access="pending"],
.bf-biohub-sheet[data-bf-biohub-pilot-access="denied"] {
  display: none !important;
}

.bf-biohub-pilot-skin {
  color: #24374a !important;
  background: #eef4f8 !important;
}

.bf-biohub-pilot-skin.is-dark {
  color: #e8f3ff !important;
  background: #0a1422 !important;
}

.bf-biohub-pilot-skin > .bf-biohub-pilot-header {
  background: #fff !important;
  border-bottom-color: rgba(43, 100, 145, .13) !important;
}

.bf-biohub-pilot-skin.is-dark > .bf-biohub-pilot-header {
  background: #101e30 !important;
  border-bottom-color: rgba(137, 190, 235, .14) !important;
}

.bf-biohub-pilot-skin .bf-biohub-pilot-subtitle {
  color: #55738a !important;
}

.bf-biohub-pilot-skin.is-dark .bf-biohub-pilot-subtitle {
  color: #9fcbe5 !important;
}

.bf-biohub-pilot-skin .bf-biohub-pilot-legacy-prompts {
  display: none !important;
}

.bf-biohub-pilot-prompts {
  display: flex;
  flex: 0 0 auto;
  gap: 8px;
  overflow-x: auto;
  padding: 10px 14px;
  border-bottom: 1px solid rgba(43, 100, 145, .12);
  background: #fff;
  direction: rtl;
  scrollbar-width: none;
}

.bf-biohub-pilot-prompts::-webkit-scrollbar { display: none; }

.bf-biohub-pilot-skin.is-dark .bf-biohub-pilot-prompts {
  border-bottom-color: rgba(137, 190, 235, .14);
  background: #101e30;
}

.bf-biohub-pilot-prompt {
  flex: 0 0 auto;
  max-width: 85vw;
  padding: 7px 12px;
  border: 1px solid rgba(38, 119, 203, .2);
  border-radius: 999px;
  color: #1c669f;
  background: linear-gradient(135deg, #f5fbff, #edf8fa);
  font: 700 11.5px/1.6 'Vazirmatn', sans-serif;
  text-align: right;
  cursor: pointer;
}

.bf-biohub-pilot-skin.is-dark .bf-biohub-pilot-prompt {
  border-color: rgba(95, 185, 226, .22);
  color: #a9e7ff;
  background: linear-gradient(135deg, #172c45, #17344a);
}

.bf-biohub-pilot-body,
.bf-biohub-pilot-messages {
  background: #eef4f8 !important;
}

.bf-biohub-pilot-skin.is-dark .bf-biohub-pilot-body,
.bf-biohub-pilot-skin.is-dark .bf-biohub-pilot-messages {
  background: #0a1422 !important;
}

.bf-biohub-pilot-message-row { gap: 9px !important; }
.bf-biohub-pilot-message-row--assistant { justify-content: flex-start !important; }
.bf-biohub-pilot-message-row--user { justify-content: flex-end !important; }

.bf-biohub-pilot-bubble {
  overflow-wrap: anywhere;
  box-shadow: 0 6px 18px rgba(2, 18, 36, .1) !important;
}

.bf-biohub-pilot-bubble--assistant {
  color: #26384c !important;
  background: #fff !important;
  border: 1px solid rgba(43, 100, 145, .1);
  border-radius: 18px 18px 18px 4px !important;
}

.bf-biohub-pilot-skin.is-dark .bf-biohub-pilot-bubble--assistant {
  color: #e8f3ff !important;
  background: #14243a !important;
  border-color: rgba(137, 190, 235, .11);
}

.bf-biohub-pilot-bubble--user {
  color: #fff !important;
  background: linear-gradient(135deg, #2677cb, #17a5b7) !important;
  border-radius: 18px 18px 4px 18px !important;
}

.bf-biohub-pilot-avatar {
  position: relative;
  display: grid;
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  place-items: center;
  margin-bottom: 4px;
  border: 1px solid rgba(191, 222, 255, .3);
  border-radius: 14px;
  background: linear-gradient(145deg, #123458, #24215f);
  box-shadow: 0 5px 14px rgba(34, 94, 167, .24);
  animation: bf-pilot-float 3.8s ease-in-out infinite;
  isolation: isolate;
}

.bf-biohub-pilot-avatar::before {
  position: absolute;
  z-index: -1;
  inset: -4px;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(67, 225, 255, .4), rgba(114, 105, 255, .2), rgba(223, 87, 232, .3));
  opacity: .55;
  filter: blur(8px);
  content: "";
}

.bf-biohub-pilot-avatar svg {
  width: 38px;
  height: 38px;
  filter: drop-shadow(0 3px 5px rgba(5, 12, 37, .3));
}

.bf-biohub-pilot-eye {
  transform-box: fill-box;
  transform-origin: center;
  animation: bf-pilot-blink 5.8s ease-in-out infinite;
}

.bf-biohub-pilot-eye:nth-of-type(2) { animation-delay: .08s; }

.bf-biohub-pilot-mouth-open {
  opacity: 0;
  transform-box: fill-box;
  transform-origin: center;
}

.bf-biohub-pilot-avatar[data-state="talking"] .bf-biohub-pilot-mouth-closed { opacity: 0; }

.bf-biohub-pilot-avatar[data-state="talking"] .bf-biohub-pilot-mouth-open {
  opacity: 1;
  animation: bf-pilot-talk .32s ease-in-out infinite alternate;
}

.bf-biohub-pilot-thinking-dots {
  position: absolute;
  right: -3px;
  bottom: -2px;
  display: flex;
  gap: 2px;
  padding: 3px 4px;
  border: 1px solid rgba(177, 215, 255, .38);
  border-radius: 8px;
  background: #102445;
  opacity: 0;
}

.bf-biohub-pilot-thinking-dots i {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: #9fefff;
  animation: bf-pilot-dot 1s ease-in-out infinite;
}

.bf-biohub-pilot-thinking-dots i:nth-child(2) { animation-delay: .14s; }
.bf-biohub-pilot-thinking-dots i:nth-child(3) { animation-delay: .28s; }

.bf-biohub-pilot-sources {
  margin-top: 9px;
  padding-top: 7px;
  border-top: 1px solid rgba(43, 100, 145, .13);
  color: #55738a;
  font: 600 10.5px/1.7 'Vazirmatn', sans-serif;
  direction: rtl;
}

.bf-biohub-pilot-skin.is-dark .bf-biohub-pilot-sources {
  border-top-color: rgba(137, 190, 235, .14);
  color: #9fcbe5;
}

.bf-biohub-pilot-welcome {
  white-space: pre-wrap;
  line-height: 1.9;
}

.bf-biohub-pilot-skin .bf-biohub-composer {
  background: #eef4f8 !important;
  border-top-color: rgba(43, 100, 145, .12) !important;
}

.bf-biohub-pilot-skin.is-dark .bf-biohub-composer {
  background: #0a1422 !important;
  border-top-color: rgba(137, 190, 235, .14) !important;
}

.bf-biohub-pilot-skin .bf-biohub-input-wrap {
  border-color: rgba(43, 100, 145, .16) !important;
  background: #fff !important;
}

.bf-biohub-pilot-skin.is-dark .bf-biohub-input-wrap {
  border-color: rgba(137, 190, 235, .17) !important;
  background: #101e30 !important;
}

.bf-biohub-pilot-skin .bf-biohub-pilot-send {
  background: #2677cb !important;
  box-shadow: 0 5px 14px rgba(38, 119, 203, .24);
}

@keyframes bf-pilot-float {
  0%, 100% { transform: translateY(0) rotate(-1deg); }
  50% { transform: translateY(-2px) rotate(1deg); }
}

@keyframes bf-pilot-blink {
  0%, 43%, 47%, 100% { transform: scaleY(1); }
  45% { transform: scaleY(.16); }
}

@keyframes bf-pilot-talk {
  from { transform: scaleY(.8); }
  to { transform: scaleY(1.25); }
}

@keyframes bf-pilot-dot {
  0%, 65%, 100% { opacity: .42; transform: translateY(0); }
  32% { opacity: 1; transform: translateY(-2px); }
}

@media (prefers-reduced-motion: reduce) {
  .bf-biohub-pilot-avatar,
  .bf-biohub-pilot-eye,
  .bf-biohub-pilot-mouth-open,
  .bf-biohub-pilot-thinking-dots i {
    animation: none !important;
  }
}

/* Pilot theme is detected from the visible Mini App surface, not the legacy chat default. */
.bf-biohub-pilot-skin.bf-biohub-pilot-light {
  color: #203449 !important;
  background: #eef4f8 !important;
}

.bf-biohub-pilot-skin.bf-biohub-pilot-light > .bf-biohub-pilot-header,
.bf-biohub-pilot-skin.bf-biohub-pilot-light .bf-biohub-pilot-prompts,
.bf-biohub-pilot-skin.bf-biohub-pilot-light .bf-biohub-input-wrap {
  background: #fff !important;
}

.bf-biohub-pilot-skin.bf-biohub-pilot-light .bf-biohub-pilot-body,
.bf-biohub-pilot-skin.bf-biohub-pilot-light .bf-biohub-pilot-messages,
.bf-biohub-pilot-skin.bf-biohub-pilot-light .bf-biohub-composer {
  background: #eef4f8 !important;
}

.bf-biohub-pilot-skin.bf-biohub-pilot-light .bf-biohub-pilot-bubble--assistant {
  color: #203449 !important;
  background: #fff !important;
  border-color: rgba(43, 100, 145, .18) !important;
}

.bf-biohub-pilot-skin.bf-biohub-pilot-light .bf-biohub-pilot-bubble--assistant p,
.bf-biohub-pilot-skin.bf-biohub-pilot-light .bf-biohub-pilot-bubble--assistant ul,
.bf-biohub-pilot-skin.bf-biohub-pilot-light .bf-biohub-pilot-bubble--assistant ol,
.bf-biohub-pilot-skin.bf-biohub-pilot-light .bf-biohub-pilot-bubble--assistant li {
  color: #203449 !important;
  opacity: 1 !important;
}

.bf-biohub-pilot-skin.bf-biohub-pilot-light .bf-biohub-pilot-bubble--assistant strong,
.bf-biohub-pilot-skin.bf-biohub-pilot-light .bf-biohub-pilot-bubble--assistant b {
  color: #075985 !important;
}

.bf-biohub-pilot-skin.bf-biohub-pilot-light .bf-biohub-pilot-subtitle {
  color: #47647d !important;
}

.bf-biohub-pilot-skin.bf-biohub-pilot-light .bf-biohub-pilot-sources {
  color: #47647d !important;
  border-top-color: rgba(43, 100, 145, .2) !important;
}

.bf-biohub-pilot-skin.bf-biohub-pilot-dark {
  color: #e8f3ff !important;
  background: #0a1422 !important;
}

.bf-biohub-pilot-skin.bf-biohub-pilot-dark > .bf-biohub-pilot-header,
.bf-biohub-pilot-skin.bf-biohub-pilot-dark .bf-biohub-pilot-prompts,
.bf-biohub-pilot-skin.bf-biohub-pilot-dark .bf-biohub-input-wrap {
  background: #101e30 !important;
}

.bf-biohub-pilot-skin.bf-biohub-pilot-dark .bf-biohub-pilot-body,
.bf-biohub-pilot-skin.bf-biohub-pilot-dark .bf-biohub-pilot-messages,
.bf-biohub-pilot-skin.bf-biohub-pilot-dark .bf-biohub-composer {
  background: #0a1422 !important;
}

.bf-biohub-pilot-skin.bf-biohub-pilot-dark .bf-biohub-pilot-bubble--assistant {
  color: #edf6ff !important;
  background: #14243a !important;
  border-color: rgba(137, 190, 235, .2) !important;
}

.bf-biohub-pilot-skin.bf-biohub-pilot-dark .bf-biohub-pilot-bubble--assistant p,
.bf-biohub-pilot-skin.bf-biohub-pilot-dark .bf-biohub-pilot-bubble--assistant ul,
.bf-biohub-pilot-skin.bf-biohub-pilot-dark .bf-biohub-pilot-bubble--assistant ol,
.bf-biohub-pilot-skin.bf-biohub-pilot-dark .bf-biohub-pilot-bubble--assistant li {
  color: #edf6ff !important;
  opacity: 1 !important;
}

.bf-biohub-pilot-skin.bf-biohub-pilot-dark .bf-biohub-pilot-bubble--assistant strong,
.bf-biohub-pilot-skin.bf-biohub-pilot-dark .bf-biohub-pilot-bubble--assistant b {
  color: #c8f3ff !important;
}

.bf-biohub-pilot-skin.bf-biohub-pilot-dark .bf-biohub-pilot-sources {
  color: #b5d5e8 !important;
  border-top-color: rgba(137, 190, 235, .2) !important;
}
