.jt-chat-header {
  gap: 0.5rem;
}

.jt-chat-sound {
  align-items: center;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.38);
  border-radius: 999px;
  color: inherit;
  cursor: pointer;
  display: inline-flex;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 700;
  gap: 0.3rem;
  margin-left: auto;
  min-height: 2rem;
  padding: 0.25rem 0.65rem;
  white-space: nowrap;
}

.jt-chat-sound:hover,
.jt-chat-sound:focus-visible {
  background: rgba(255, 255, 255, 0.24);
}

.jt-chat-sound:focus-visible,
.jt-chat-box button:focus-visible,
.jt-chat-box input:focus-visible {
  outline: 3px solid #ffd66b;
  outline-offset: 2px;
}

.jt-chat-sound[aria-pressed="false"] {
  opacity: 0.78;
}

.jt-chat-sound-icon {
  font-size: 1rem;
  line-height: 1;
}

.jt-chat-typing {
  align-items: center;
  display: inline-flex;
  gap: 0.45rem;
  min-width: 9.5rem;
}

.jt-chat-typing[hidden] {
  display: none;
}

.jt-chat-typing-text {
  font-size: 0.82em;
  opacity: 0.78;
}

.jt-chat-typing-dots {
  display: inline-flex;
  gap: 0.18rem;
}

.jt-chat-typing-dots i {
  animation: jt-chat-dot 1s infinite ease-in-out;
  background: currentColor;
  border-radius: 50%;
  display: block;
  height: 0.38rem;
  opacity: 0.45;
  width: 0.38rem;
}

.jt-chat-typing-dots i:nth-child(2) {
  animation-delay: 0.14s;
}

.jt-chat-typing-dots i:nth-child(3) {
  animation-delay: 0.28s;
}

.jt-msg.jt-chat-new-message {
  animation: jt-chat-message-in 220ms ease-out both;
}

.jt-chat-box[aria-busy="true"] .jt-send-btn {
  cursor: wait;
  opacity: 0.58;
}

.jt-chat-external-note {
  display: block;
  font-size: 0.78em;
  margin-top: 0.2rem;
  opacity: 0.72;
}

.jt-quick button.jt-chat-quick-new {
  animation: jt-chat-chip-in 180ms ease-out both;
}

@keyframes jt-chat-dot {
  0%, 60%, 100% {
    opacity: 0.35;
    transform: translateY(0);
  }
  30% {
    opacity: 1;
    transform: translateY(-0.22rem);
  }
}

@keyframes jt-chat-message-in {
  from {
    opacity: 0;
    transform: translateY(0.45rem) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes jt-chat-chip-in {
  from {
    opacity: 0;
    transform: translateY(0.2rem);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 520px) {
  .jt-chat-sound-label {
    font-size: 0;
  }

  .jt-chat-sound-label::after {
    content: "Ljud";
    font-size: 0.75rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .jt-chat-typing-dots i,
  .jt-msg.jt-chat-new-message,
  .jt-quick button.jt-chat-quick-new {
    animation: none;
  }
}
