:root {
  --dc-guide-red: #ff4d6d;
  --dc-guide-cyan: #82f7ff;
  --dc-guide-ink: #10131e;
}

/* The guide docks on the opposite side of the existing support chat. */
.dc-guide-root {
  position: fixed;
  left: 24px;
  bottom: 28px;
  z-index: 1100;
  direction: rtl;
  font-family: "Space Grotesk", "Inter", system-ui, sans-serif;
}

.dc-guide-orb {
  position: relative;
  display: grid;
  place-items: center;
  width: 66px;
  height: 66px;
  padding: 0;
  border: 1px solid rgba(255,255,255,.72);
  border-radius: 50%;
  color: var(--dc-guide-ink);
  background: radial-gradient(circle at 35% 25%, #fff 0 7%, #c8fbff 8% 26%, #79dce8 27% 60%, #3c82b8 61% 100%);
  box-shadow: 0 13px 30px rgba(0,0,0,.35), 0 0 0 6px rgba(130,247,255,.10), 0 0 26px rgba(130,247,255,.36);
  cursor: pointer;
  transition: transform .22s ease, box-shadow .22s ease;
  animation: dc-guide-flight 4.6s ease-in-out infinite;
}

.dc-guide-orb:hover,
.dc-guide-orb:focus-visible {
  transform: translateY(-4px) rotate(-3deg) scale(1.05);
  box-shadow: 0 17px 35px rgba(0,0,0,.42), 0 0 0 8px rgba(130,247,255,.15), 0 0 32px rgba(130,247,255,.55);
  outline: none;
}

.dc-guide-orb-face {
  position: relative;
  display: grid;
  grid-template-columns: repeat(2, 8px);
  grid-template-rows: 12px 12px;
  place-items: center;
  width: 39px;
  height: 35px;
  margin-top: 3px;
  border: 2px solid rgba(16,19,30,.8);
  border-radius: 14px 14px 17px 17px;
  background: linear-gradient(145deg, #fbffff, #a8eaf0);
  box-shadow: inset 0 -5px 0 rgba(33,111,155,.17);
  z-index: 2;
}
.dc-guide-orb-face i { width: 7px; height: 7px; border-radius: 50%; background: #152844; box-shadow: 0 0 0 2px rgba(130,247,255,.55); }
.dc-guide-orb-face b { grid-column: 1 / -1; color: var(--dc-guide-red); font-size: 18px; line-height: 9px; }
.dc-guide-antenna { position: absolute; top: 3px; width: 3px; height: 12px; border-radius: 4px; background: #162540; z-index: 1; }
.dc-guide-antenna::after { content: ""; position: absolute; top: -5px; left: 50%; width: 8px; height: 8px; border-radius: 50%; background: var(--dc-guide-red); box-shadow: 0 0 10px var(--dc-guide-red); transform: translateX(-50%); }
.dc-guide-wing { position: absolute; top: 30px; width: 15px; height: 11px; border: 2px solid #224b77; background: rgba(255,255,255,.6); z-index: 0; }
.dc-guide-wing.wing-left { left: -5px; border-radius: 11px 3px 11px 3px; transform: rotate(24deg); }
.dc-guide-wing.wing-right { right: -5px; border-radius: 3px 11px 3px 11px; transform: rotate(-24deg); }
.dc-guide-orb-status { position: absolute; right: 5px; bottom: 6px; width: 9px; height: 9px; border: 2px solid #fff; border-radius: 50%; background: #45e68a; z-index: 3; }

.dc-guide-teaser {
  position: absolute;
  left: 0;
  bottom: 78px;
  width: max-content;
  max-width: min(245px, calc(100vw - 36px));
  padding: 10px 13px;
  border: 1px solid rgba(130,247,255,.35);
  border-radius: 15px 15px 15px 4px;
  color: rgba(255,255,255,.93);
  background: rgba(13,22,36,.95);
  box-shadow: 0 12px 32px rgba(0,0,0,.3), 0 0 18px rgba(130,247,255,.12);
  font-size: .74rem;
  line-height: 1.45;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(7px) scale(.96);
  transition: opacity .2s ease, visibility .2s ease, transform .2s ease;
}
.dc-guide-teaser::after { content: ""; position: absolute; bottom: -6px; left: 22px; width: 11px; height: 11px; border-right: 1px solid rgba(130,247,255,.35); border-bottom: 1px solid rgba(130,247,255,.35); background: #0d1624; transform: rotate(45deg); }
.dc-guide-teaser.is-visible { opacity: 1; visibility: visible; transform: translateY(0) scale(1); }

.dc-guide-panel {
  position: absolute;
  left: 0;
  bottom: 80px;
  display: flex;
  flex-direction: column;
  width: min(340px, calc(100vw - 32px));
  max-height: min(570px, calc(100vh - 120px));
  overflow: hidden;
  border: 1px solid rgba(130,247,255,.22);
  border-radius: 22px;
  color: #fff;
  background: linear-gradient(155deg, rgba(15,25,42,.985), rgba(10,12,21,.985));
  box-shadow: 0 24px 70px rgba(0,0,0,.48), 0 0 0 1px rgba(255,77,109,.08);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(10px) scale(.96);
  transform-origin: bottom left;
  transition: opacity .2s ease, transform .2s ease, visibility .2s ease;
}
.dc-guide-panel.is-open { opacity: 1; visibility: visible; pointer-events: auto; transform: translateY(0) scale(1); }
.dc-guide-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 15px 17px; border-bottom: 1px solid rgba(255,255,255,.1); background: linear-gradient(135deg, rgba(130,247,255,.14), rgba(255,77,109,.1)); }
.dc-guide-header strong, .dc-guide-header small { display: block; }
.dc-guide-header strong { font-size: .94rem; }
.dc-guide-header small { margin-top: 3px; color: rgba(255,255,255,.58); font-size: .68rem; }
.dc-guide-header button { border: 0; background: transparent; color: rgba(255,255,255,.7); font-size: 1.4rem; line-height: 1; cursor: pointer; }
.dc-guide-header button:hover, .dc-guide-header button:focus-visible { color: #fff; outline: none; }
.dc-guide-messages { display: flex; flex-direction: column; gap: 7px; max-height: 130px; overflow: auto; padding: 11px 13px 0; }
.dc-guide-message { width: fit-content; max-width: 92%; padding: 8px 10px; border-radius: 13px; white-space: pre-line; font-size: .76rem; line-height: 1.5; }
.dc-guide-message.bot { align-self: flex-start; background: rgba(255,255,255,.08); color: rgba(255,255,255,.9); }
.dc-guide-message.user { align-self: flex-end; background: rgba(255,77,109,.22); }
.dc-guide-card { margin: 11px 13px 0; padding: 13px; border: 1px solid rgba(130,247,255,.18); border-radius: 16px; background: rgba(255,255,255,.045); }
.dc-guide-card strong { display: block; margin-bottom: 5px; color: #fff; font-size: .9rem; }
.dc-guide-card p { margin: 0; color: rgba(255,255,255,.72); font-size: .77rem; line-height: 1.5; }
.dc-guide-next { margin-top: 9px; color: #9dfaff; font-size: .73rem; line-height: 1.45; }
.dc-guide-next::before { content: "✦ "; color: #ff7a98; }
.dc-guide-actions { display: flex; gap: 7px; padding: 11px 13px 9px; }
.dc-guide-actions button { flex: 1; padding: 8px 6px; border: 1px solid rgba(255,255,255,.13); border-radius: 10px; background: rgba(255,255,255,.055); color: #fff; font-size: .7rem; cursor: pointer; }
.dc-guide-actions button:hover, .dc-guide-actions button:focus-visible { border-color: rgba(130,247,255,.65); background: rgba(130,247,255,.1); outline: none; }
.dc-guide-form { display: flex; gap: 7px; padding: 0 13px 13px; }
.dc-guide-form input { min-width: 0; flex: 1; padding: 9px 11px; border: 1px solid rgba(255,255,255,.13); border-radius: 12px; outline: none; background: rgba(0,0,0,.24); color: #fff; font: inherit; font-size: .76rem; }
.dc-guide-form input:focus { border-color: var(--dc-guide-cyan); }
.dc-guide-form button { width: 38px; border: 0; border-radius: 12px; background: linear-gradient(135deg, var(--dc-guide-red), #b52c62); color: #fff; cursor: pointer; }
.dc-guide-form button:focus-visible { outline: 2px solid var(--dc-guide-cyan); outline-offset: 2px; }

@keyframes dc-guide-flight { 0%, 100% { transform: translate3d(0, 0, 0) rotate(-2deg); } 50% { transform: translate3d(0, -8px, 0) rotate(2deg); } }

@media (max-width: 760px) {
  .dc-guide-root { left: 14px; bottom: 24px; }
  .dc-guide-orb { width: 58px; height: 58px; }
  .dc-guide-orb-face { transform: scale(.9); }
  .dc-guide-panel { bottom: 70px; width: min(330px, calc(100vw - 28px)); }
  .dc-guide-teaser { bottom: 70px; }
}

@media (prefers-reduced-motion: reduce) {
  .dc-guide-orb { animation: none; }
  .dc-guide-panel, .dc-guide-teaser, .dc-guide-orb { transition: none; }
}
