body {
  padding-top: var(--typography-spacing-vertical);
}

h1 {
  margin-bottom: 1rem !important;
}

button {
  width: auto !important;
  display: inline !important;
}

.header {
  margin-bottom: 2rem;
}

.header hr {
  border: .05rem solid #ccc;
}

#upload-image-input {
  border: 1px solid #ccc;
  max-width: 16rem;
  padding: 0;
  height: auto;
}

#upload-image-input::file-selector-button {
  height: 3rem;
  background-color: var(--primary);
}

#upload-preview {
  max-width: 200px;
  display: none;
}

#chat-container>b {
  display: block;
  margin-bottom: 8px;
}

.chat-messages-wrap {
  position: relative;
}

#chat-messages {
  border: 1px solid #ccc;
  padding: 60px 8px 8px;
  height: 30vh;
  min-height: 120px;
  max-height: 30vh;
  overflow-y: auto;
  margin-bottom: 8px;
}

#chat-messages.chat-messages-full-height {
  height: 70vh;
  max-height: 70vh;
}

#chat-expand-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 1;
  width: auto !important;
  height: auto;
  padding: 0.3rem 0.7rem;
}

.chat__flex {
  display: flex;
}

#chat-input {
  height: auto;
}

.chat-message {
  margin-bottom: 10px;
  border-radius: 8px;
  padding: 8px;
}

.chat-message-user {
  background-color: #eef6ff;
  border: 1px solid #cfe3ff;
}

.chat-message-assistant {
  background-color: #f7f7f7;
  border: 1px solid #e0e0e0;
}

.chat-message-loading {
  opacity: 0.9;
}

.chat-message-title {
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 6px;
}

.chat-message-body {
  font-size: 14px;
  line-height: 1.45;
  white-space: normal;
}

.chat-message-body p {
  margin: 0 0 8px;
}

.chat-message-body p:last-child {
  margin-bottom: 0;
}

.chat-message-body ul,
.chat-message-body ol {
  margin: 0 0 8px 18px;
}

.chat-message-body code {
  background-color: #ececec;
  padding: 1px 4px;
  border-radius: 4px;
}

.chat-message-body pre {
  background-color: #1f2937;
  color: #f9fafb;
  padding: 10px;
  border-radius: 6px;
  overflow-x: auto;
}

.chat-message-body pre code {
  background-color: transparent;
  padding: 0;
}

.chat-message-body-loading {
  display: flex;
  align-items: center;
  gap: 5px;
}

.typing-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: #6b7280;
  animation: typingPulse 1.2s infinite ease-in-out;
}

.typing-dot:nth-child(2) {
  animation-delay: 0.15s;
}

.typing-dot:nth-child(3) {
  animation-delay: 0.3s;
}

@keyframes typingPulse {

  0%,
  80%,
  100% {
    transform: scale(0.8);
    opacity: 0.5;
  }

  40% {
    transform: scale(1);
    opacity: 1;
  }
}

.medical-disclaimer {
  margin-top: 2rem;
  padding: 0.9rem 1rem;
  border: 1px solid #ffd27d;
  background-color: #fff8e8;
  color: #5f4500;
  border-radius: 8px;
  font-size: 0.95rem;
}

.site-copyright {
  margin-top: 0.75rem;
  margin-bottom: 0;
  font-size: 0.9rem;
  color: #666;
}