.rv-helper {
  position: fixed;
  right: 22px;
  bottom: var(--rv-helper-bottom, 22px);
  z-index: 1055;
  font-family: inherit;
  transition: bottom .18s ease;
}

.rv-helper[hidden], .rv-helper [hidden] { display: none !important; }

.rv-helper__launcher {
  border: 0;
  border-radius: 999px;
  background: #111827;
  color: #fff;
  padding: 11px 16px;
  font-size: .82rem;
  font-weight: 700;
  box-shadow: 0 12px 30px rgba(15, 23, 42, .24);
}

.rv-helper__launcher:hover, .rv-helper__launcher:focus { background: #312e81; }

.rv-helper__panel {
  position: absolute;
  right: 0;
  bottom: 54px;
  width: min(390px, calc(100vw - 28px));
  max-height: min(610px, calc(100vh - var(--rv-helper-bottom, 22px) - 68px));
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid #dbe3ee;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 22px 55px rgba(15, 23, 42, .22);
}

.rv-helper__head {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  background: #0b1220;
  color: #fff;
}

.rv-helper__title { font-size: .95rem; font-weight: 800; }
.rv-helper__subtitle { color: #cbd5e1; font-size: .7rem; }
.rv-helper__close { border: 0; background: transparent; color: #fff; font-size: 1.25rem; line-height: 1; }

.rv-helper__body { padding: 14px; overflow-y: auto; }
.rv-helper__status { color: #64748b; font-size: .75rem; min-height: 18px; }
.rv-helper__answer { white-space: pre-wrap; color: #1f2937; font-size: .82rem; line-height: 1.5; }
.rv-helper__screen { margin: 12px 0; padding: 10px; background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 8px; font-size: .8rem; line-height: 1.5; color: #334155; }
.rv-helper__screen summary { cursor: pointer; font-weight: 600; margin-top: 6px; }
.rv-helper__screen ul { padding-left: 20px; margin: 6px 0; }
.rv-helper__screen li { margin-bottom: 5px; overflow-wrap: anywhere; }
.rv-helper__screen p { font-size: .7rem; color: #64748b; margin: 8px 0 0; }
.rv-helper__screen .rv-helper__field-impact p { font-size: .8rem; color: #334155; margin: 8px 0; }
.rv-helper__field-impact { padding-bottom: 4px; }
.rv-helper__context { margin-top: 10px; padding: 9px 10px; border-radius: 8px; background: #f8fafc; color: #475569; font-size: .72rem; }
.rv-helper__suggestions { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0; }
.rv-helper__suggestion { border: 1px solid #c7d2fe; border-radius: 999px; background: #eef2ff; color: #3730a3; padding: 6px 9px; font-size: .7rem; font-weight: 700; }
.rv-helper__action { display: inline-block; margin-top: 10px; color: #4338ca; font-size: .78rem; font-weight: 700; }
.rv-helper__feedback { display: flex; gap: 7px; margin-top: 10px; }
.rv-helper__feedback button { border: 1px solid #dbe3ee; border-radius: 7px; background: #fff; padding: 5px 8px; color: #475569; font-size: .7rem; }

.rv-helper__form { display: flex; flex-shrink: 0; gap: 8px; padding: 12px 14px; border-top: 1px solid #e5e7eb; }
.rv-helper__input { min-width: 0; flex: 1; border: 1px solid #cbd5e1; border-radius: 9px; padding: 9px 10px; font-size: .8rem; }
.rv-helper__ask { border: 0; border-radius: 9px; background: #4f46e5; color: #fff; padding: 9px 13px; font-size: .78rem; font-weight: 800; }
.rv-helper__ask:disabled { opacity: .65; }
.rv-helper__preferences { flex-shrink: 0; padding: 0 14px 13px; text-align: right; }
.rv-helper__hide { border: 0; background: transparent; color: #64748b; padding: 0; font-size: .7rem; text-decoration: underline; }

@media (max-width: 575.98px) {
  .rv-helper { right: 14px; bottom: var(--rv-helper-bottom, 14px); }
  .rv-helper__panel { bottom: 52px; max-height: min(610px, calc(100vh - var(--rv-helper-bottom, 14px) - 66px)); }
}
