/* Aldia Premium Chat Interface */
#aldia-chat-trigger {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 60px;
  height: 60px;
  background: #000;
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  cursor: pointer;
  z-index: 99999;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

#aldia-chat-trigger:hover {
  transform: scale(1.1) translateY(-5px);
  background: #111;
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.35);
}

#aldia-chat-window {
  position: fixed;
  bottom: 6.5rem;
  right: 2rem;
  width: 380px;
  height: 550px;
  background: #ffffff;
  border-radius: 28px;
  box-shadow: 0 30px 60px -12px rgba(0,0,0,0.25);
  display: none;
  flex-direction: column;
  overflow: hidden;
  z-index: 99998;
  border: 1px solid #000000;
  font-family: 'Inter', sans-serif;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

#aldia-chat-window.active {
  display: flex;
}

.chat-header {
  background: #000;
  padding: 1.2rem 1.5rem;
  color: white;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.status-dot {
  width: 8px;
  height: 8px;
  background: #00ff88;
  border-radius: 50%;
}

.header-info { display: flex; align-items: center; gap: 12px; }
.header-info h4 { margin: 0; font-size: 0.95rem; font-weight: 700; }
.header-info p { margin: 0; font-size: 0.72rem; opacity: 0.5; }

#close-chat { background: none; border: none; color: white; font-size: 1.5rem; cursor: pointer; opacity: 0.6; transition: 0.3s; }
#close-chat:hover { opacity: 1; }

#chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
  background: #fcfcfc;
  scroll-behavior: smooth;
}

.msg {
  max-width: 82%;
  padding: 0.9rem 1.1rem;
  border-radius: 20px;
  font-size: 0.9rem;
  line-height: 1.5;
  animation: msgPop 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes msgPop {
  from { opacity: 0; transform: translateY(10px) scale(0.95); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.msg.bot {
  align-self: flex-start;
  background: white;
  color: #333;
  border-bottom-left-radius: 4px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.03);
  border: 1px solid rgba(0,0,0,0.02);
}

.msg.user {
  align-self: flex-end;
  background: #000;
  color: white;
  border-bottom-right-radius: 4px;
}

.chat-input-area {
  padding: 1.2rem;
  background: white;
  border-top: 1px solid #f0f0f0;
  display: flex;
  gap: 12px;
}

#chat-input {
  flex: 1;
  border: none;
  background: #f5f5f5;
  padding: 0.75rem 1.2rem;
  border-radius: 100px;
  font-size: 0.9rem;
  outline: none;
  color: #000;
}

#chat-input::placeholder {
  color: #aaa;
  font-size: 0.85rem;
  letter-spacing: 0.02em;
}

#send-msg {
  width: 48px;
  height: 48px;
  background: #000;
  color: white;
  border: none;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: 0.3s;
}

#send-msg:hover { transform: scale(1.08); background: #222; }
#send-msg svg { width: 10px; height: 10px; }

.typing span {
  width: 5px;
  height: 5px;
  background: #999;
  display: inline-block;
  border-radius: 50%;
  margin: 0 2px;
  animation: typing 1.4s infinite ease-in-out;
}
.typing span:nth-child(2) { animation-delay: 0.2s; }
.typing span:nth-child(3) { animation-delay: 0.4s; }

@keyframes typing {
  0%, 80%, 100% { transform: scale(0); }
  40% { transform: scale(1); }
}

@media (max-width: 768px) {
  #aldia-chat-window {
    width: calc(100vw - 2rem);
    height: 60vh;
    right: 1rem;
    bottom: 5.5rem;
  }
  #aldia-chat-trigger {
    bottom: 1.5rem;
    right: 1.5rem;
  }
}
