/* =========================================================
   ARTIVO CHAT WIDGET
   Shared Chat Component
   ========================================================= */

.artivo-chat-widget {
  position: fixed;
  right: 2rem;
  bottom: 2rem;
  z-index: 999999;
  font-family: inherit;
}

/* =========================
   Chat Toggle Button
   ========================= */

.artivo-chat-toggle {
  width: 65px;
  height: 65px;
  border: none;
  border-radius: 50%;
  background: linear-gradient(135deg, #4facfe 0%, #a855f7 50%, #f472b6 100%);
  cursor: pointer;

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

  box-shadow:
    0 4px 30px rgba(107, 33, 165, 0.5),
    0 0 25px rgba(168, 85, 247, 0.25);

  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
}

.artivo-chat-toggle:hover {
  transform: scale(1.08);

  box-shadow:
    0 8px 40px rgba(168, 85, 247, 0.65),
    0 0 35px rgba(244, 114, 182, 0.25);
}

.artivo-chat-toggle svg {
  width: 28px;
  height: 28px;
  color: #ffffff;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

/* =========================
   Chat Panel
   ========================= */

.artivo-chat-panel {
  position: absolute;

  right: 0;
  bottom: 80px;

  width: 340px;
  max-width: calc(100vw - 30px);

  background: rgba(15, 1, 24, 0.96);

  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);

  border: 1px solid rgba(168, 85, 247, 0.35);
  border-radius: 24px;

  overflow: hidden;

  opacity: 0;
  visibility: hidden;

  transform:
    translateY(20px)
    scale(0.95);

  transform-origin: bottom right;

  transition:
    opacity 0.3s ease,
    visibility 0.3s ease,
    transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);

  box-shadow:
    0 20px 50px rgba(0, 0, 0, 0.65),
    0 0 0 1px rgba(168, 85, 247, 0.12) inset;
}

.artivo-chat-panel.active {
  opacity: 1;
  visibility: visible;

  transform:
    translateY(0)
    scale(1);
}

/* =========================
   Header
   ========================= */

.artivo-chat-header {
  display: flex;
  align-items: center;

  gap: 0.75rem;

  padding: 1rem 1rem 0.9rem;

  border-bottom:
    1px solid rgba(255, 255, 255, 0.1);
}

.artivo-chat-avatar {
  position: relative;

  width: 45px;
  height: 45px;

  flex-shrink: 0;

  border-radius: 50%;

  background:
    linear-gradient(
      135deg,
      #4facfe 0%,
      #a855f7 50%,
      #f472b6 100%
    );

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

.artivo-chat-avatar svg {
  width: 26px;
  height: 26px;

  color: #ffffff;
}

.artivo-chat-online {
  position: absolute;

  right: 1px;
  bottom: 1px;

  width: 12px;
  height: 12px;

  background: #22c55e;

  border: 2px solid #150118;

  border-radius: 50%;
}

.artivo-chat-name {
  font-size: 1.05rem;
  font-weight: 600;

  color: #ffffff;

  line-height: 1.2;
}

.artivo-chat-status {
  margin-top: 3px;

  font-size: 0.7rem;

  color: #22c55e;
}

/* =========================
   Messages Area
   ========================= */

.artivo-chat-messages {
  height: 300px;

  padding: 1rem;

  display: flex;
  flex-direction: column;

  gap: 0.75rem;

  overflow-y: auto;

  scroll-behavior: smooth;
}

/* Scrollbar */

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

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

.artivo-chat-messages::-webkit-scrollbar-thumb {
  background: rgba(168, 85, 247, 0.35);
  border-radius: 20px;
}

/* =========================
   Message
   ========================= */

.artivo-chat-message {
  display: flex;
  flex-direction: column;
}

.artivo-chat-message.bot {
  align-items: flex-start;
}

.artivo-chat-message.user {
  align-items: flex-end;
}

.artivo-chat-bubble {
  max-width: 85%;

  padding: 0.7rem 0.9rem;

  border-radius: 18px;

  font-size: 0.875rem;
  line-height: 1.45;

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

.artivo-chat-message.bot
.artivo-chat-bubble {
  background: rgba(107, 33, 165, 0.2);

  border:
    1px solid rgba(107, 33, 165, 0.3);

  color: #ffffff;

  border-bottom-left-radius: 4px;
}

.artivo-chat-message.user
.artivo-chat-bubble {
  background:
    linear-gradient(
      135deg,
      #4facfe,
      #a855f7
    );

  color: #ffffff;

  border-bottom-right-radius: 4px;
}

.artivo-chat-time {
  margin-top: 3px;

  padding: 0 0.45rem;

  font-size: 0.62rem;

  color: rgba(255, 255, 255, 0.4);
}

/* =========================
   Typing Indicator
   ========================= */

.artivo-chat-typing {
  display: flex;
  align-items: center;

  gap: 4px;

  padding: 0.75rem 0.9rem;

  background: rgba(107, 33, 165, 0.2);

  border:
    1px solid rgba(107, 33, 165, 0.3);

  border-radius: 18px;
  border-bottom-left-radius: 4px;
}

.artivo-chat-typing span {
  width: 5px;
  height: 5px;

  border-radius: 50%;

  background: #c084fc;

  animation: artivoTyping 1.2s infinite ease-in-out;
}

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

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

@keyframes artivoTyping {
  0%,
  60%,
  100% {
    transform: translateY(0);
    opacity: 0.45;
  }

  30% {
    transform: translateY(-4px);
    opacity: 1;
  }
}

/* =========================
   Input Area
   ========================= */

.artivo-chat-input-area {
  display: flex;
  align-items: center;

  gap: 0.5rem;

  padding: 0.75rem;

  border-top:
    1px solid rgba(255, 255, 255, 0.08);

  background: rgba(0, 0, 0, 0.12);
}

.artivo-chat-input {
  flex: 1;

  min-width: 0;

  height: 42px;

  padding:
    0 0.9rem;

  border-radius: 22px;

  border:
    1px solid rgba(168, 85, 247, 0.25);

  outline: none;

  background:
    rgba(255, 255, 255, 0.05);

  color: #ffffff;

  font-family: inherit;

  font-size: 0.85rem;

  transition:
    border-color 0.2s ease,
    background 0.2s ease;
}

.artivo-chat-input::placeholder {
  color: rgba(255, 255, 255, 0.45);
}

.artivo-chat-input:focus {
  border-color:
    rgba(168, 85, 247, 0.65);

  background:
    rgba(255, 255, 255, 0.07);
}

.artivo-chat-send {
  width: 42px;
  height: 42px;

  flex-shrink: 0;

  border: none;
  border-radius: 50%;

  cursor: pointer;

  background:
    linear-gradient(
      135deg,
      #4facfe,
      #a855f7,
      #f472b6
    );

  color: #ffffff;

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

  transition:
    transform 0.2s ease,
    opacity 0.2s ease;
}

.artivo-chat-send:hover {
  transform: scale(1.06);
}

.artivo-chat-send:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
}

.artivo-chat-send svg {
  width: 19px;
  height: 19px;
}

/* =========================
   Mobile
   ========================= */

@media (max-width: 600px) {

  .artivo-chat-widget {
    right: 1rem;
    bottom: 1rem;
  }

  .artivo-chat-toggle {
    width: 58px;
    height: 58px;
  }

  .artivo-chat-toggle svg {
    width: 25px;
    height: 25px;
  }

  .artivo-chat-panel {
    right: 0;

    bottom: 70px;

    width:
      calc(100vw - 30px);

    max-width: 360px;

    border-radius: 20px;
  }

  .artivo-chat-messages {
    height: 280px;
  }
}


/* =========================================================
   ARTIVO CUSTOM CURSOR
   Keep the website cursor visible above the chat widget
   ========================================================= */

.custom-cursor {
  z-index: 1000000 !important;
  pointer-events: none !important;
}
