.chat-box .message-content {
  min-width: 0;
  overflow-wrap: anywhere;
}

.message-icon {
  flex-shrink: 0;
}

.falina-message-text {
  background: #fafafa;
  padding: 10px 14px;
  border-radius: 14px;
  line-height: 1.6;
}

.falina-message-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.falina-message-actions button {
  margin-top: 0;
  padding: 6px 12px;
  border: 1px solid #cbdcdf;
  border-radius: 18px;
  background: #fff;
  color: #2e5360;
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}

.falina-message-actions button:hover {
  background: #edf5f7;
}

.falina-message-actions button:focus-visible,
.falina-message-links a:focus-visible {
  outline: 2px solid #006494;
  outline-offset: 3px;
}

.falina-message-actions button:disabled {
  opacity: 0.65;
  cursor: wait;
}

.falina-message-links {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 10px;
  font-size: 13px;
}

.falina-message-links a {
  color: #285267;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.falina-translation {
  margin-top: 10px;
  padding: 10px 14px;
  border-left: 3px solid #7da2a9;
  background: #f1f7f8;
  border-radius: 0 10px 10px 0;
  line-height: 1.6;
}

.falina-action-status {
  margin-top: 6px;
  font-size: 12px;
  color: #7b3434;
}

.falina-action-status:empty {
  display: none;
}

.falina-typing-bubble {
  display: flex;
  align-items: center;
  padding: 14px 12px;
  border-radius: 14px;
  background: #fafafa;
}

.falina-typing-message .message-wrapper {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}

.falina-typing-message .message-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
}

.falina-typing-bubble .dot {
  width: 7px;
  height: 7px;
  margin: 0 3px;
  border-radius: 50%;
  background: #7da2a9;
  animation: falina-typing 1.2s infinite ease-in-out;
}

.falina-typing-bubble .dot:nth-child(2) { animation-delay: 0.2s; }
.falina-typing-bubble .dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes falina-typing {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}

.lp-message-actions.falina-message-actions button {
  border: 1px solid #cbdcdf;
  border-radius: 18px;
  padding: 6px 12px;
  background: white;
  text-decoration: none;
}

.lp-chat-log .lp-message--bot > .lp-message-links {
  display: grid;
  gap: 8px;
  width: fit-content;
  max-width: 100%;
  margin-top: 10px;
}

.lp-chat-log .lp-message--bot > .lp-message-links .lp-message-link {
  display: flex;
  align-items: center;
  gap: 20px;
  min-height: 44px;
  padding: 10px 14px;
  border: 1px solid #d4e2dc;
  border-radius: 10px;
  background: #f8fbfa;
  color: #315c61;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
  text-decoration: none;
}

.lp-chat-log .lp-message--bot > .lp-message-links .lp-message-link::after {
  /* Draw the arrow independently of platform emoji fonts. */
  content: '';
  width: 1em;
  height: 1em;
  background-color: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 19 19 5M5 5h14v14'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 19 19 5M5 5h14v14'/%3E%3C/svg%3E") center / contain no-repeat;
  flex-shrink: 0;
  margin-left: auto;
  color: #426f76;
  font-size: 18px;
}

.lp-chat-log .lp-message--bot > .lp-message-links .lp-message-link:hover {
  border-color: #91b3a7;
  background: #edf5f1;
}

.lp-chat-log .lp-message--bot > .lp-message-links .lp-message-link:focus-visible {
  outline: 2px solid #426f76;
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  .falina-typing-bubble .dot {
    animation: none;
  }
}

