.support-bot {
  position: fixed;
  right: 1.1rem;
  bottom: 1.1rem;
  z-index: 70;
  font-size: 0.9rem;
}

.support-bot[hidden] {
  display: none !important;
}

.support-bot__toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.7rem 0.95rem;
  border: 0;
  border-radius: 9999px;
  background: hsl(var(--primary));
  color: hsl(var(--primary-foreground));
  font-weight: 600;
  box-shadow: 0 10px 28px hsl(var(--primary) / 0.35);
  cursor: pointer;
}

.support-bot__toggle:hover {
  opacity: 0.92;
}

.support-bot__toggle-label {
  white-space: nowrap;
}

.support-bot__panel {
  position: absolute;
  right: 0;
  bottom: 3.4rem;
  width: min(22.5rem, calc(100vw - 1.5rem));
  max-height: min(34rem, calc(100vh - 6rem));
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 1rem;
  border: 1px solid hsl(var(--border));
  background: hsl(var(--card));
  box-shadow: 0 18px 50px hsl(var(--foreground) / 0.16);
}

.support-bot__panel[hidden] {
  display: none !important;
}

.support-bot__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.9rem 1rem 0.7rem;
  border-bottom: 1px solid hsl(var(--border));
  background: hsl(var(--primary) / 0.07);
}

.support-bot__title {
  margin: 0;
  font-family: ui-serif, Georgia, Cambria, "Times New Roman", Times, serif;
  font-weight: 700;
  font-size: 1.05rem;
}

.support-bot__subtitle {
  margin: 0.2rem 0 0;
  font-size: 0.75rem;
  line-height: 1.35;
  color: hsl(var(--muted-foreground));
}

.support-bot__close {
  border: 0;
  background: transparent;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  color: hsl(var(--muted-foreground));
}

.support-bot__messages {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 0.85rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.support-bot__bubble {
  max-width: 100%;
  padding: 0.65rem 0.75rem;
  border-radius: 0.8rem;
  line-height: 1.45;
}

.support-bot__bubble--bot {
  background: hsl(var(--muted) / 0.7);
}

.support-bot__bubble--user {
  align-self: flex-end;
  background: hsl(var(--primary) / 0.12);
}

.support-bot__answer {
  margin-top: 0.55rem;
  padding-top: 0.55rem;
  border-top: 1px solid hsl(var(--border) / 0.7);
}

.support-bot__answer-title {
  margin: 0 0 0.3rem;
  font-weight: 700;
  font-size: 0.85rem;
}

.support-bot__topics {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.55rem;
}

.support-bot__chip,
.support-bot__action {
  border: 1px solid hsl(var(--primary) / 0.28);
  background: hsl(var(--background));
  color: hsl(var(--primary));
  border-radius: 9999px;
  padding: 0.28rem 0.7rem;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
}

.support-bot__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.6rem;
}

.support-bot__link {
  color: hsl(var(--primary));
  text-decoration: underline;
  text-underline-offset: 2px;
}

.support-bot__composer,
.support-bot__ticket {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  padding: 0.7rem 1rem 0.9rem;
  border-top: 1px solid hsl(var(--border));
}

.support-bot__ticket-title {
  margin: 0;
  font-weight: 700;
  font-size: 0.85rem;
}

.support-bot__hint {
  margin: 0 0 0.35rem;
  font-size: 0.75rem;
  line-height: 1.4;
  color: hsl(var(--muted-foreground));
}

.support-bot__composer textarea,
.support-bot__ticket input,
.support-bot__ticket textarea {
  width: 100%;
  border: 1px solid hsl(var(--input));
  border-radius: 0.65rem;
  padding: 0.5rem 0.65rem;
  font: inherit;
  background: hsl(var(--background));
}

.support-bot__send {
  align-self: flex-end;
  border: 0;
  border-radius: 0.55rem;
  padding: 0.45rem 0.85rem;
  background: hsl(var(--primary));
  color: hsl(var(--primary-foreground));
  font-weight: 600;
  cursor: pointer;
}

.support-bot__sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}

.support-bot__hp {
  position: absolute;
  left: -9999px;
  opacity: 0;
  height: 0;
  width: 0;
}

.support-bot .hidden {
  display: none !important;
}

@media (max-width: 480px) {
  .support-bot {
    right: 0.7rem;
    bottom: 0.7rem;
  }

  .support-bot__toggle-label {
    display: none;
  }

  .support-bot__toggle {
    width: 3.1rem;
    height: 3.1rem;
    justify-content: center;
    padding: 0;
  }
}
