/* RiffBuddy Help Widget – Guided FAQ (SaaS-style) */
#rspHelpWidgetRoot{
  position:fixed;right:18px;bottom:18px;z-index:99999;
  font-family:system-ui,-apple-system,Segoe UI,Roboto,sans-serif;
  transition:opacity .15s ease, transform .15s ease;
}

/* Mobile: keep the widget above the bottom navigation (no overlap) */
@media (max-width: 980px){
  #rspHelpWidgetRoot{
    right:16px;
    bottom:calc(env(safe-area-inset-bottom, 0px) + 98px);
  }
}

/* Hide the floating widget while an in-app modal OR mobile overlay view is open (mobile UX) */
@media (max-width: 820px){
  body.rsp-modal-open #rspHelpWidgetRoot,
  body.rsp-overlay-open #rspHelpWidgetRoot{
    opacity:0 !important;
    pointer-events:none !important;
    transform:translateY(10px) scale(.98);
    transition:opacity .15s ease, transform .15s ease;
  }
}
.rspHelpBtn{
  width:60px;height:60px;border-radius:999px;border:0;
  background:#ff6a00;box-shadow:0 14px 34px rgba(0,0,0,.26);
  display:flex;align-items:center;justify-content:center;cursor:pointer;
}
.rspHelpBtn img{width:42px;height:42px;border-radius:999px;background:#fff;padding:6px;box-sizing:border-box}

.rspHelpPanel{
  position:absolute;
  right:0;
  bottom:76px;
  width:392px;
  max-width:92vw;
  background:linear-gradient(180deg,#14161b 0%, #0e1014 100%);
  border:1px solid rgba(255,255,255,.08);
  border-radius:22px;
  box-shadow:0 28px 60px rgba(0,0,0,.45);
  overflow:hidden;
  display:none;
}
#rspHelpWidgetRoot.isOpen .rspHelpPanel{display:block}

.rspHelpHeader{
  padding:16px 16px 12px 16px;
  display:flex;align-items:flex-start;justify-content:space-between;gap:12px;
  border-bottom:1px solid rgba(255,255,255,.07);
}
.rspHelpBrand{display:flex;gap:10px;align-items:flex-start}
.rspHelpBrandIcon{
  width:40px;height:40px;border-radius:14px;background:#fff;
  padding:6px;box-sizing:border-box;flex:0 0 auto
}
.rspHelpTitle{color:#fff;font-weight:800;font-size:18px;line-height:1.1}
.rspHelpSub{color:rgba(255,255,255,.65);font-size:12px;margin-top:4px;max-width:260px}
.rspHelpClose{
  border:0;background:transparent;color:rgba(255,255,255,.7);
  font-size:26px;line-height:1;cursor:pointer;padding:0 6px
}
.rspHelpClose:hover{color:#fff}

.rspHelpBody{
  max-height:420px;overflow:auto;padding:14px 16px 6px 16px;
}
.rspHelpFooter{
  padding:10px 14px 14px 14px;
  border-top:1px solid rgba(255,255,255,.07);
  background:rgba(255,255,255,.02);
}

.rspHelpSection{margin-bottom:14px}
.rspHelpKicker{
  color:rgba(255,255,255,.65);font-size:12px;font-weight:700;
  letter-spacing:.02em;margin-bottom:10px;
}
.rspHelpList{display:flex;flex-direction:column;gap:10px}
.rspHelpListItem{
  width:100%;
  display:flex;align-items:center;justify-content:space-between;
  padding:12px 14px;
  border-radius:14px;
  background:rgba(255,255,255,.04);
  border:1px solid rgba(255,255,255,.08);
  color:#fff;
  cursor:pointer;
}
.rspHelpListItem:hover{background:rgba(255,255,255,.06)}
.rspHelpChevron{color:rgba(255,255,255,.55);font-size:18px}

.rspHelpTopicPill{
  display:inline-flex;align-items:center;gap:8px;
  background:rgba(255,106,0,.14);
  border:1px solid rgba(255,106,0,.35);
  color:#fff;
  padding:8px 10px;border-radius:999px;
  font-weight:700;font-size:13px;
}

.rspHelpAccordion{display:flex;flex-direction:column;gap:10px}
.rspHelpAccItem{
  border-radius:16px;
  border:1px solid rgba(255,255,255,.08);
  background:rgba(255,255,255,.03);
  overflow:hidden;
}
.rspHelpAccHead{
  width:100%;
  display:flex;align-items:center;justify-content:space-between;
  gap:12px;
  padding:12px 14px;
  border:0;background:transparent;
  color:#fff;font-weight:750;font-size:14px;
  cursor:pointer;text-align:left;
}
.rspHelpAccIcon{
  width:28px;height:28px;border-radius:10px;
  display:flex;align-items:center;justify-content:center;
  background:rgba(255,255,255,.05);
  border:1px solid rgba(255,255,255,.08);
  color:rgba(255,255,255,.8);font-weight:900;
}
.rspHelpAccBody{display:none;padding:0 14px 14px 14px;color:rgba(255,255,255,.82);font-size:14px;line-height:1.45}
.rspHelpAccItem.isOpen .rspHelpAccBody{display:block}
.rspHelpAnswer p{margin:10px 0}
.rspHelpAnswer ul{margin:10px 0 10px 18px}

.rspHelpFooterRow{
  display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap;
}
.rspHelpFooterActions{display:flex;gap:10px;flex-wrap:wrap;justify-content:flex-end}
.rspHelpPrimary{
  border:0;cursor:pointer;
  background:#ff6a00;color:#111;font-weight:900;
  padding:10px 12px;border-radius:14px;
}
.rspHelpPrimary:hover{filter:brightness(1.04)}
.rspHelpGhost{
  border:1px solid rgba(255,255,255,.12);
  background:rgba(255,255,255,.03);
  color:rgba(255,255,255,.9);
  padding:10px 12px;border-radius:14px;cursor:pointer;
}
.rspHelpGhost:hover{background:rgba(255,255,255,.05)}
.rspHelpLinkBtn{
  border:0;background:transparent;color:rgba(255,255,255,.75);
  cursor:pointer;font-weight:700;padding:8px 6px;
}
.rspHelpLinkBtn:hover{color:#fff}

.rspHelpTicketCard{
  border-radius:18px;
  border:1px solid rgba(255,255,255,.08);
  background:rgba(255,255,255,.03);
  padding:14px;
}
.rspHelpTicketTitle{color:#fff;font-weight:900;font-size:15px}
.rspHelpTicketSub{color:rgba(255,255,255,.7);font-size:13px;margin-top:6px}
.rspHelpField{display:block;margin-top:12px}
.rspHelpField span{display:block;color:rgba(255,255,255,.65);font-size:12px;font-weight:700;margin-bottom:6px}
.rspHelpField input,.rspHelpField textarea{
  width:100%;box-sizing:border-box;
  background:rgba(0,0,0,.25);
  border:1px solid rgba(255,255,255,.12);
  color:#fff;border-radius:14px;padding:10px 12px;outline:none;
}
.rspHelpField input:focus,.rspHelpField textarea:focus{border-color:rgba(255,106,0,.6)}
.rspHelpTicketActions{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-top:12px}
.rspHelpTicketNote{margin-top:10px;color:rgba(255,255,255,.75);font-size:13px}

.rspHelpDone{
  background:rgba(255,106,0,.12);
  border:1px solid rgba(255,106,0,.35);
  padding:14px;border-radius:18px;
  color:#fff;font-weight:800;
}

/* Mobile tweaks */
@media (max-width:520px){
  #rspHelpWidgetRoot{right:12px;bottom:12px}
  .rspHelpPanel{width: 93vw;bottom:74px;height: 103vw;}
  .rspHelpBody{max-height:60vh}
}


/* Tooltip bubble above the mascot button */
.rspHelpTooltip{
  position:absolute;
  right:0;
  bottom:74px;
  max-width:320px;
  padding:10px 12px;
  border-radius:16px;
  background:#12151c;
  border:1px solid rgba(255,255,255,.10);
  box-shadow:0 18px 40px rgba(0,0,0,.38);
  color:#fff;
  font-size:14px;
  font-weight:600;
  letter-spacing:.1px;
  opacity:0;
  transform:translateY(10px);
  transition:opacity .18s ease, transform .18s ease;
  pointer-events:none;
  display:flex;
  align-items:center;
  gap:2px;
}

.rspHelpTooltip::after{
  content:"";
  position:absolute;
  bottom:-6px;
  right:18px;
  width:12px;
  height:12px;
  background:#12151c;
  border-right:1px solid rgba(255,255,255,.10);
  border-bottom:1px solid rgba(255,255,255,.10);
  transform:rotate(45deg);
}

#rspHelpWidgetRoot:hover .rspHelpTooltip,
#rspHelpWidgetRoot.showTooltip .rspHelpTooltip{
  opacity:1;
  transform:translateY(0);
}

#rspHelpWidgetRoot.isOpen .rspHelpTooltip{
  display:none;
}

.rspHelpTooltipText{white-space:nowrap; overflow:hidden; text-overflow:ellipsis;}
.rspHelpTooltipCursor{
  display:inline-block;
  opacity:.9;
  animation:rspBlink 1s steps(1) infinite;
}

@keyframes rspBlink{
  0%,49%{opacity:.9}
  50%,100%{opacity:0}
}


/* === Mobile Overlay Scroll Fix === */
@media (max-width: 768px){

  .rsp-overlay,
  .rsp-menu,
  .rsp-help-menu {
    height: 100dvh !important;
    max-height: 100dvh !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch;
  }

  body.menu-open{
    overflow: hidden;
  }

}


/* === Mobile Overlay Half Height Update === */
@media (max-width: 768px){

  .rsp-overlay,
  .rsp-menu,
  .rsp-help-menu {
    height: 50dvh !important;
    max-height: 50dvh !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch;
  }

}
