.autobot-launcher,
.autobot-panel,
.autobot-backdrop {
  --autobot-accent: rgb(var(--scene-accent, 241, 119, 49));
  --autobot-panel: #090b0c;
  --autobot-line: rgba(255, 255, 255, 0.12);
  font-family: Roboto, sans-serif;
}

.autobot-launcher,
.autobot-launcher *,
.autobot-panel,
.autobot-panel *,
.autobot-backdrop {
  box-sizing: border-box;
}

.autobot-launcher {
  position: fixed;
  top: 50%;
  right: 0;
  z-index: 1700;
  display: flex;
  width: 64px;
  min-height: 196px;
  padding: 16px 9px;
  border: 1px solid color-mix(in srgb, var(--autobot-accent) 52%, transparent);
  border-right: 0;
  border-radius: 22px 0 0 22px;
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--autobot-accent) 16%, #0a0b0c), #08090a 68%);
  box-shadow: -16px 22px 54px rgba(0, 0, 0, 0.42);
  color: #fff;
  cursor: pointer;
  transform: translateY(-50%);
  align-items: center;
  flex-direction: column;
  gap: 10px;
  transition:
    width 180ms ease,
    border-color 180ms ease,
    opacity 180ms ease,
    transform 180ms ease;
}

.autobot-launcher:hover,
.autobot-launcher:focus-visible {
  width: 70px;
  border-color: var(--autobot-accent);
  outline: 0;
}

.autobot-launcher-mark {
  display: grid;
  width: 42px;
  height: 42px;
  border-radius: 13px;
  background: var(--autobot-accent);
  color: #08090a;
  box-shadow: 0 10px 26px color-mix(in srgb, var(--autobot-accent) 30%, transparent);
  place-items: center;
}

.autobot-launcher-mark svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.autobot-launcher-copy {
  display: flex;
  align-items: center;
  flex-direction: row-reverse;
  gap: 7px;
  writing-mode: vertical-rl;
}

.autobot-launcher-copy small {
  color: #9fa4a5;
  font: 600 0.55rem/1 Oswald, sans-serif;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.autobot-launcher-copy strong {
  font: 700 0.78rem/1 Oswald, sans-serif;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.autobot-live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #5fe58a;
  box-shadow: 0 0 0 4px rgba(95, 229, 138, 0.12), 0 0 16px rgba(95, 229, 138, 0.58);
}

.autobot-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1790;
  visibility: hidden;
  background: rgba(0, 0, 0, 0.64);
  opacity: 0;
  pointer-events: none;
  backdrop-filter: blur(5px);
  transition:
    opacity 220ms ease,
    visibility 220ms ease;
}

.autobot-backdrop[data-open="true"] {
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
}

.autobot-panel {
  position: fixed;
  top: calc(var(--experience-header-height, 76px) + 14px);
  right: 0;
  bottom: 14px;
  z-index: 1800;
  display: grid;
  visibility: hidden;
  width: min(440px, calc(100vw - 30px));
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--autobot-accent) 42%, var(--autobot-line));
  border-right: 0;
  border-radius: 22px 0 0 22px;
  background:
    radial-gradient(circle at 100% 0, color-mix(in srgb, var(--autobot-accent) 12%, transparent), transparent 38%),
    linear-gradient(180deg, rgba(15, 18, 19, 0.99), rgba(6, 8, 9, 0.995));
  box-shadow: -36px 34px 90px rgba(0, 0, 0, 0.64);
  color: #f6f3ed;
  grid-template-rows: auto auto minmax(0, 1fr) auto auto;
  opacity: 0;
  pointer-events: none;
  transform: translateX(102%);
  transition:
    transform 260ms cubic-bezier(0.22, 1, 0.36, 1),
    opacity 200ms ease,
    visibility 260ms ease;
}

.autobot-panel[data-open="true"] {
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
  transform: translateX(0);
}

.autobot-head,
.autobot-context,
.autobot-messages,
.autobot-form,
.autobot-foot,
.autobot-actions {
  min-width: 0;
  max-width: 100%;
}

.autobot-head {
  display: grid;
  min-height: 88px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--autobot-line);
  grid-template-columns: 58px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
}

.autobot-head-logo {
  display: grid;
  width: 58px;
  height: 58px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  background: #050606;
  place-items: center;
}

.autobot-head-logo img {
  display: block;
  width: 64px;
  max-width: none;
  height: 64px;
  object-fit: contain;
}

.autobot-head-copy small {
  display: block;
  margin-bottom: 4px;
  color: var(--autobot-accent);
  font: 600 0.59rem/1 Oswald, sans-serif;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.autobot-head-copy strong {
  display: block;
  font: 700 1.08rem/1 Oswald, sans-serif;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.autobot-head-copy span {
  display: block;
  margin-top: 5px;
  color: #9ca1a2;
  font-size: 0.72rem;
}

.autobot-close {
  display: grid;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 1px solid var(--autobot-line);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.03);
  color: #fff;
  cursor: pointer;
  place-items: center;
}

.autobot-close:hover,
.autobot-close:focus-visible {
  border-color: var(--autobot-accent);
  outline: 0;
}

.autobot-close svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
}

.autobot-context {
  padding: 14px 16px 15px;
  border-bottom: 1px solid var(--autobot-line);
  background: rgba(255, 255, 255, 0.025);
}

.autobot-context-label {
  display: flex;
  margin: 0 0 11px;
  align-items: baseline;
  gap: 8px;
}

.autobot-context-label span {
  color: #8f9495;
  font-size: 0.72rem;
}

.autobot-context-label strong {
  color: #fff;
  font: 650 0.78rem/1 Oswald, sans-serif;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.autobot-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.autobot-action {
  display: flex;
  min-height: 46px;
  padding: 10px 11px;
  border: 1px solid var(--autobot-line);
  border-radius: 11px;
  background: #101314;
  color: #f6f3ed;
  font: 600 0.69rem/1.2 Oswald, sans-serif;
  letter-spacing: 0.07em;
  text-align: left;
  text-transform: uppercase;
  cursor: pointer;
  align-items: center;
  gap: 8px;
}

.autobot-action:hover,
.autobot-action:focus-visible {
  border-color: var(--autobot-accent);
  outline: 0;
}

.autobot-action[data-primary="true"] {
  border-color: transparent;
  background: var(--autobot-accent);
  color: #090a0b;
}

.autobot-action svg {
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
}

.autobot-messages {
  display: flex;
  overflow-y: auto;
  padding: 16px;
  flex-direction: column;
  gap: 10px;
  overscroll-behavior: contain;
  scrollbar-color: rgba(255, 255, 255, 0.18) transparent;
}

.autobot-message {
  max-width: 88%;
  padding: 11px 13px;
  border-radius: 13px;
  font-size: 0.86rem;
  line-height: 1.52;
  white-space: pre-wrap;
}

.autobot-message[data-role="bot"] {
  border: 1px solid var(--autobot-line);
  border-bottom-left-radius: 3px;
  background: #121516;
  color: #e8e6e1;
  align-self: flex-start;
}

.autobot-message[data-role="user"] {
  border-bottom-right-radius: 3px;
  background: var(--autobot-accent);
  color: #090a0b;
  align-self: flex-end;
}

.autobot-typing {
  display: flex;
  width: max-content;
  padding: 12px 14px;
  border: 1px solid var(--autobot-line);
  border-radius: 13px;
  gap: 5px;
}

.autobot-typing i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--autobot-accent);
  animation: autobot-breathe 1.1s infinite;
}

.autobot-typing i:nth-child(2) {
  animation-delay: 140ms;
}

.autobot-typing i:nth-child(3) {
  animation-delay: 280ms;
}

@keyframes autobot-breathe {
  0%,
  65%,
  100% {
    opacity: 0.3;
    transform: translateY(0);
  }
  30% {
    opacity: 1;
    transform: translateY(-4px);
  }
}

.autobot-message-action {
  align-self: flex-start;
  min-height: 43px;
  padding: 0 15px;
  border: 0;
  border-radius: 10px;
  background: var(--autobot-accent);
  color: #090a0b;
  font: 700 0.7rem/1 Oswald, sans-serif;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
}

.autobot-form {
  display: grid;
  padding: 11px 12px;
  border-top: 1px solid var(--autobot-line);
  background: #090b0c;
  grid-template-columns: minmax(0, 1fr) 46px;
  gap: 8px;
}

.autobot-input {
  min-height: 46px;
  max-height: 96px;
  padding: 12px 13px;
  resize: none;
  border: 1px solid var(--autobot-line);
  border-radius: 11px;
  outline: 0;
  background: #121516;
  color: #fff;
  font: 400 0.87rem/1.4 Roboto, sans-serif;
}

.autobot-input:focus {
  border-color: var(--autobot-accent);
}

.autobot-send {
  display: grid;
  width: 46px;
  height: 46px;
  padding: 0;
  border: 0;
  border-radius: 11px;
  background: var(--autobot-accent);
  color: #090a0b;
  cursor: pointer;
  place-items: center;
}

.autobot-send:disabled {
  opacity: 0.45;
  cursor: wait;
}

.autobot-send svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

.autobot-foot {
  padding: 0 14px 11px;
  background: #090b0c;
  color: #777d7e;
  font-size: 0.62rem;
  line-height: 1.45;
  text-align: center;
  overflow-wrap: anywhere;
}

.autobot-foot a {
  color: #b6babb;
}

body.autobot-scheduler-open .autobot-launcher {
  opacity: 0;
  pointer-events: none;
  transform: translate(100%, -50%);
}

body.autobot-open .autobot-launcher {
  opacity: 0;
  pointer-events: none;
}

@media (max-width: 840px) {
  body.autobot-open {
    overflow: hidden;
  }

  .autobot-launcher {
    top: auto;
    right: 14px;
    bottom: 72px;
    width: 48px;
    height: 48px;
    min-height: 48px;
    padding: 5px;
    border-right: 1px solid color-mix(in srgb, var(--autobot-accent) 52%, transparent);
    border-radius: 50%;
    transform: none;
    flex-direction: row;
    gap: 0;
  }

  .autobot-launcher:hover,
  .autobot-launcher:focus-visible {
    width: 48px;
  }

  .autobot-launcher-mark {
    width: 38px;
    height: 38px;
    border-radius: 50%;
  }

  .autobot-launcher-copy {
    display: none;
  }

  .autobot-live-dot {
    position: absolute;
    top: 0;
    right: 0;
    border: 2px solid #090b0c;
  }

  .autobot-backdrop {
    bottom: 70px;
  }

  .autobot-panel {
    top: auto;
    right: 8px;
    bottom: var(--autobot-layout-bottom, 70px);
    left: 8px;
    visibility: hidden;
    width: auto;
    height: min(
      720px,
      calc(
        var(--autobot-viewport-height, 100dvh) -
          var(--autobot-panel-bottom-gap, 70px) -
          16px
      )
    );
    max-height: none;
    border-right: 1px solid color-mix(in srgb, var(--autobot-accent) 42%, var(--autobot-line));
    border-radius: 24px 24px 14px 14px;
    opacity: 1;
    transform: translateY(calc(100% + 82px));
  }

  .autobot-panel[data-open="true"] {
    visibility: visible;
    transform: translateY(0);
  }

  .autobot-head {
    min-height: 78px;
    padding: 10px 13px;
    grid-template-columns: 50px minmax(0, 1fr) auto;
  }

  .autobot-head-logo {
    width: 50px;
    height: 50px;
    border-radius: 14px;
  }

  .autobot-head-logo img {
    width: 56px;
    height: 56px;
  }

  .autobot-context {
    padding: 10px 12px 12px;
  }

  .autobot-context-label {
    margin-bottom: 8px;
  }

  .autobot-actions {
    display: flex;
    overflow-x: auto;
    padding-bottom: 2px;
    scrollbar-width: none;
  }

  .autobot-action {
    min-width: max-content;
    min-height: 42px;
  }

  .autobot-messages {
    padding: 13px;
  }

  .autobot-message {
    max-width: 92%;
  }

  body.autobot-scheduler-open .autobot-launcher {
    transform: translateY(120px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .autobot-launcher,
  .autobot-backdrop,
  .autobot-panel {
    transition-duration: 0.01ms !important;
  }

  .autobot-typing i {
    animation: none;
  }
}
