html,
body {
  height: 100%;
}

body {
  display: flex;
  flex-direction: column;
  letter-spacing: -0.01em;
}

#chatScroll {
  scroll-behavior: smooth;
}

.typing-cursor {
  display: inline-block;
  font-weight: 300;
  color: var(--bs-secondary-color);
  animation: cursor-blink 0.9s infinite;
  margin-left: 1px;
}

@keyframes cursor-blink {

  0%,
  100% {
    opacity: 0;
  }

  50% {
    opacity: 1;
  }
}

.brand-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--bs-primary);
  display: inline-block;
}

.theme-btn {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.empty-app-icon {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  background-color: var(--bs-secondary-bg);
  display: flex;
  align-items: center;
  justify-content: center;
}

.msg-row {
  display: flex;
  gap: 0.65rem;
  align-items: flex-end;
  width: 100%;
}

.msg-row--user {
  flex-direction: row-reverse;
}

.msg-row--ai {
  flex-direction: row;
}

.msg-avatar {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--bs-secondary-bg);
}

.msg-bubble {
  max-width: min(82%, 36rem);
  border-radius: 10px;
  font-size: 0.935rem;
  line-height: 1.5;
}

.msg-bubble--ai {
  background-color: var(--bs-secondary-bg);
  color: var(--bs-body-color);
  border-bottom-left-radius: 2px;
}

.msg-bubble--user {
  background-color: var(--bs-primary);
  color: #ffffff;
  border-bottom-right-radius: 2px;
}

.msg-bubble>*:last-child {
  margin-bottom: 0;
}

.msg-bubble p {
  margin-bottom: 0.65rem;
}

.msg-bubble p:last-child {
  margin-bottom: 0 !important;
}

.floating-input-bar {
  border-radius: 10px !important;
  transition: box-shadow 0.2s ease;
}

.floating-input-bar:focus-within {
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08) !important;
}

.send-btn {
  width: 36px;
  height: 36px;
  border-radius: 8px !important;
}

.plan-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.plan-item {
  border-radius: 10px !important;
  background-color: var(--bs-tertiary-bg);
}

.typing {
  display: inline-flex;
  gap: 0.25rem;
  align-items: center;
  padding: 4px 6px;
}

.typing span {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background-color: currentColor;
  opacity: 0.35;
  animation: typing-blink 1.2s infinite ease-in-out both;
}

.typing span:nth-child(2) {
  animation-delay: 0.2s;
}

.typing span:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes typing-blink {

  0%,
  80%,
  100% {
    opacity: 0.25;
    transform: scale(0.9);
  }

  40% {
    opacity: 0.85;
    transform: scale(1.15);
  }
}

@media (prefers-reduced-motion: reduce) {
  #chatScroll {
    scroll-behavior: auto;
  }

  .typing span {
    animation: none;
  }
}