/**
 * @file
 * Arechi chatbot widget styles.
 *
 * Compiled from Less source with variables resolved:
 *   @color_3  -> #012169
 *   @color_2  -> #074d99
 *   fade(@color_2, 12%) -> rgba(7, 77, 153, 0.12)
 *   darken(@color_3, 10%) -> #011136
 */

/* FAB button. */
.chatbot-fab {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background-color: #152b74;
  color: #fff;
  border: none;
  cursor: pointer;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.chatbot-fab:hover {
  transform: scale(1.1);
}
.chatbot-fab--hidden {
  transform: scale(0);
  opacity: 0;
  pointer-events: none;
}

/* Chat panel. */
.chatbot-panel {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 380px;
  height: 520px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
  z-index: 10000;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: scale(0.5) translateY(20px);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.25s ease, opacity 0.25s ease;
  transform-origin: bottom right;
}
.chatbot-panel--open {
  transform: scale(1) translateY(0);
  opacity: 1;
  pointer-events: auto;
}

/* Header. */
.chatbot-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background-color: #152b74;
  color: #fff;
  flex-shrink: 0;
}
.chatbot-header-title {
  font-size: 15px;
  font-weight: 600;
}
.chatbot-close {
  background: none;
  border: none;
  color: #fff;
  font-size: 18px;
  cursor: pointer;
  padding: 0;
  line-height: 1;
  opacity: 0.8;
}
.chatbot-close:hover {
  opacity: 1;
}

/* Messages area. */
.chatbot-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Disclaimer. */
.chatbot-disclaimer {
  font-size: 12px;
  line-height: 1.5;
  color: #666;
  background-color: #fdf6e3;
  border: 1px solid #e8dcc8;
  border-radius: 8px;
  padding: 10px 12px;
  margin-bottom: 4px;
  text-align: justify;
}
.chatbot-disclaimer a {
  color: #012169;
  text-decoration: underline;
}

/* Single message. */
.chatbot-msg {
  display: flex;
  max-width: 85%;
}
.chatbot-msg--user {
  align-self: flex-end;
}
.chatbot-msg--user .chatbot-msg-content {
  background-color: rgba(7, 77, 153, 0.12);
  color: #1a1a1a;
  border-radius: 12px 12px 2px 12px;
}
.chatbot-msg--assistant {
  align-self: flex-start;
}
.chatbot-msg--assistant .chatbot-msg-content {
  background-color: #f0f0f0;
  color: #1a1a1a;
  border-radius: 12px 12px 12px 2px;
}
.chatbot-msg-content {
  padding: 10px 14px;
  font-size: 14px;
  line-height: 1.45;
  word-wrap: break-word;
}
.chatbot-msg-content a {
  color: #074d99;
  text-decoration: underline;
}

/* Input area. */
.chatbot-input-area {
  display: flex;
  align-items: center;
  padding: 10px 12px;
  border-top: 1px solid #e0e0e0;
  flex-shrink: 0;
  gap: 8px;
}
.chatbot-input {
  flex: 1;
  border: 1px solid #d0d0d0;
  border-radius: 20px;
  padding: 8px 14px;
  font-size: 14px;
  outline: none;
}
.chatbot-input:focus {
  border-color: #152b74;
}
.chatbot-send {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background-color: #152b74;
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  flex-shrink: 0;
  transition: background-color 0.15s ease;
}
.chatbot-send:hover {
  background-color: #011136;
}

/* Typing indicator. */
.chatbot-typing .chatbot-msg-content {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 12px 18px;
}
.chatbot-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: #999;
  display: inline-block;
  animation: chatbot-dot-bounce 1.4s ease-in-out infinite both;
}
.chatbot-dot:nth-child(1) {
  animation-delay: 0s;
}
.chatbot-dot:nth-child(2) {
  animation-delay: 0.2s;
}
.chatbot-dot:nth-child(3) {
  animation-delay: 0.4s;
}
@keyframes chatbot-dot-bounce {
  0%, 80%, 100% {
    transform: scale(0.6);
    opacity: 0.4;
  }
  40% {
    transform: scale(1);
    opacity: 1;
  }
}

/* Responsive: full-screen on mobile. */
@media (max-width: 576px) {
  .chatbot-panel {
    width: 100%;
    height: 100%;
    bottom: 0;
    right: 0;
    border-radius: 0;
  }
}
