/* Gamepad Tester Pro site assistant (bottom-right) */
.itk-chatbot {
  --cb-ink: #0b1320;
  --cb-muted: #5a6b7d;
  --cb-line: rgba(11, 19, 32, 0.12);
  --cb-panel: #ffffff;
  --cb-accent: #0e7490;
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 1050;
  font-family: "Space Grotesk", "Segoe UI", sans-serif;
}

.itk-chatbot__launcher {
  appearance: none;
  border: 0;
  border-radius: 999px;
  background: var(--cb-ink);
  color: #fff;
  width: 3.35rem;
  height: 3.35rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 14px 34px rgba(11, 19, 32, 0.22);
  cursor: pointer;
  position: relative;
  transition: transform 0.25s ease, background 0.25s ease, box-shadow 0.25s ease;
  animation: itk-chatbot-bob 2.8s ease-in-out infinite;
}

.itk-chatbot__launcher::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: 0 0 0 0 rgba(14, 116, 144, 0.35);
  animation: itk-chatbot-pulse 2.4s ease-out infinite;
  pointer-events: none;
}

.itk-chatbot__launcher:hover,
.itk-chatbot__launcher:focus-visible {
  background: var(--cb-accent);
  outline: none;
  transform: translateY(-2px) scale(1.05);
  animation-play-state: paused;
  box-shadow: 0 16px 36px rgba(14, 116, 144, 0.28);
}

.itk-chatbot.is-open .itk-chatbot__launcher {
  animation: none;
  background: var(--cb-accent);
}

.itk-chatbot.is-open .itk-chatbot__launcher::before {
  animation: none;
  opacity: 0;
}

@keyframes itk-chatbot-bob {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-4px);
  }
}

@keyframes itk-chatbot-pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(14, 116, 144, 0.4);
  }
  70% {
    box-shadow: 0 0 0 14px rgba(14, 116, 144, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(14, 116, 144, 0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .itk-chatbot__launcher,
  .itk-chatbot__launcher::before {
    animation: none !important;
  }
}

.itk-chatbot__panel {
  position: absolute;
  right: 0;
  bottom: 4.1rem;
  width: min(24rem, calc(100vw - 1.5rem));
  height: min(32rem, calc(100vh - 6rem));
  background: var(--cb-panel);
  border: 1px solid var(--cb-line);
  border-radius: 1rem;
  box-shadow: 0 22px 50px rgba(11, 19, 32, 0.18);
  display: none;
  flex-direction: column;
  overflow: hidden;
}

.itk-chatbot.is-open .itk-chatbot__panel {
  display: flex;
}

.itk-chatbot__head {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--cb-line);
  background: linear-gradient(180deg, #f7fafc, #ffffff);
}

.itk-chatbot__head strong {
  display: block;
  color: var(--cb-ink);
  font-size: 0.95rem;
}

.itk-chatbot__head span {
  display: block;
  color: var(--cb-muted);
  font-size: 0.75rem;
  margin-top: 0.15rem;
}

.itk-chatbot__messages {
  flex: 1;
  overflow: auto;
  padding: 0.9rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  background: #f4f7fb;
}

.itk-chatbot__msg {
  max-width: 92%;
  padding: 0.65rem 0.75rem;
  border-radius: 0.75rem;
  font-size: 0.86rem;
  line-height: 1.45;
  color: var(--cb-ink);
  white-space: pre-wrap;
}

.itk-chatbot__msg--bot {
  align-self: flex-start;
  background: #fff;
  border: 1px solid var(--cb-line);
}

.itk-chatbot__msg--user {
  align-self: flex-end;
  background: #0b1320;
  color: #fff;
}

.itk-chatbot__sources {
  margin-top: 0.45rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.itk-chatbot__sources a {
  display: inline-flex;
  align-items: center;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--cb-accent);
  text-decoration: none;
  border: 1px solid rgba(14, 116, 144, 0.25);
  border-radius: 999px;
  padding: 0.15rem 0.55rem;
  background: rgba(14, 116, 144, 0.06);
}

.itk-chatbot__sources a:hover {
  background: rgba(14, 116, 144, 0.12);
}

.itk-chatbot__form {
  display: flex;
  gap: 0.4rem;
  padding: 0.7rem;
  border-top: 1px solid var(--cb-line);
  background: #fff;
}

.itk-chatbot__form input {
  flex: 1;
  border: 1px solid var(--cb-line);
  border-radius: 0.65rem;
  padding: 0.55rem 0.7rem;
  font: inherit;
  font-size: 0.86rem;
}

.itk-chatbot__form button {
  appearance: none;
  border: 0;
  border-radius: 0.65rem;
  background: var(--cb-ink);
  color: #fff;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 700;
  padding: 0.55rem 0.8rem;
  cursor: pointer;
}

.itk-chatbot__form button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

@media (max-width: 520px) {
  .itk-chatbot {
    right: 0.65rem;
    bottom: 0.65rem;
  }
}
