/* =========================================================
   MESSAGES AREA
========================================================= */

.chat-messages {
  flex: 1;
  padding: 24px 22px 18px;
  overflow-y: auto;

  background:
    radial-gradient(circle at 12% 0%, rgba(31,162,255,0.10), transparent 28%),
    linear-gradient(180deg, #ffffff 0%, #f5f9fe 100%);
}

.chat-messages::-webkit-scrollbar {
  width: 8px;
}

.chat-messages::-webkit-scrollbar-track {
  background: transparent;
}

.chat-messages::-webkit-scrollbar-thumb {
  background: #c9d8e7;
  border-radius: 999px;
}

.assistant-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 22px;

  animation: hcbMessageIn 0.42s ease-out both;
}

.assistant-avatar-mini {
  position: relative;

  width: 52px;
  height: 52px;

  border-radius: 999px;
  overflow: hidden;

  background:
    radial-gradient(circle at 30% 25%, rgba(255,255,255,0.95), transparent 28%),
    linear-gradient(135deg, #eaf6ff 0%, #cfeaff 100%);

  border: 1px solid #b7d8f2;
  box-shadow: 0 8px 20px rgba(13,111,201,0.12);

  display: flex;
  align-items: center;
  justify-content: center;

  flex-shrink: 0;

  animation: hcbAvatarFloat 3.8s ease-in-out infinite;
}

.assistant-avatar-mini img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* fallback */
.assistant-avatar-mini svg {
  width: 24px;
  height: 24px;
  fill: var(--hcb-blue-700);
}

.mini-online-dot {
  position: absolute;
  right: 1px;
  bottom: 2px;

  width: 13px;
  height: 13px;

  border-radius: 999px;
  background: var(--hcb-green);
  border: 2px solid #ffffff;

  animation: hcbOnlinePulse 1.9s ease-in-out infinite;
}

.bot-message,
.user-message {
  max-width: 86%;
  padding: 17px 18px;
  margin-bottom: 14px;

  border-radius: 21px;

  font-size: 15px;
  line-height: 1.55;

  word-wrap: break-word;
  overflow-wrap: anywhere;
}

.bot-message {
  background: #ffffff;
  color: var(--hcb-text);

  border: 1px solid #e4edf6;
  border-bottom-left-radius: 9px;

  box-shadow: var(--hcb-shadow-soft);

  animation: hcbMessageIn 0.34s ease-out both;
}

.user-message {
  margin-left: auto;

  background:
    radial-gradient(circle at 24% 18%, rgba(255,255,255,0.20), transparent 26%),
    linear-gradient(135deg, var(--hcb-blue-700) 0%, var(--hcb-blue-500) 100%);

  color: #ffffff;
  border-bottom-right-radius: 9px;

  box-shadow: 0 12px 26px rgba(13,111,201,0.24);

  animation: hcbUserMessageIn 0.34s ease-out both;
}

@keyframes hcbMessageIn {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.985);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes hcbUserMessageIn {
  from {
    opacity: 0;
    transform: translateY(10px) translateX(8px) scale(0.985);
  }

  to {
    opacity: 1;
    transform: translateY(0) translateX(0) scale(1);
  }
}

.welcome-message {
  max-width: calc(100% - 60px);
}

.message-title {
  margin-bottom: 8px;

  color: var(--hcb-blue-800);
  font-size: 12px;
  font-weight: 900;

  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.welcome-text {
  color: #1d2b3c;
  font-size: 15px;
  line-height: 1.6;
}

.bot-message a,
.user-message a {
  color: inherit;
  text-decoration: underline;
}

/* =========================================================
   BOT AVATAR ON EVERY ANSWER
========================================================= */

.assistant-row-dynamic {
  margin-bottom: 14px !important;
}

.assistant-row-dynamic .assistant-avatar-mini {
  width: 38px !important;
  height: 38px !important;
  margin-top: 2px !important;
}

.assistant-row-dynamic .mini-online-dot {
  width: 10px !important;
  height: 10px !important;
}

.assistant-row-dynamic .bot-message {
  max-width: calc(100% - 50px) !important;
  margin-bottom: 0 !important;
}

.assistant-row-dynamic .chat-feedback {
  margin-top: 10px !important;
}

.clinic-station-box {
  margin: 6px 0 14px;
  padding: 12px 13px;

  background: #f6fbff;
  border: 1px solid #d7e9f8;
  border-radius: 16px;
}

.clinic-station-title {
  margin-bottom: 9px;

  color: #0b4f8a;
  font-size: 13px;
  font-weight: 900;
}

.clinic-station-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.clinic-station-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;

  padding: 8px 10px;

  background: #ffffff;
  border: 1px solid #e1edf7;
  border-radius: 13px;
}

.clinic-station-office {
  color: #334155;
  font-size: 12.5px;
  line-height: 1.35;
  font-weight: 750;
}

.clinic-station-phone {
  min-width: 72px;

  color: #0b5ca8;
  font-size: 13px;
  font-weight: 900;
  text-align: right;
}

.clinic-station-empty {
  color: #64748b;
  font-size: 12.5px;
  line-height: 1.4;
}

