/* ==== Aslan AI Chat Widget ==== */
.aslan-chat-fab {
  position: fixed;
  right: 22px;
  bottom: 22px;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: linear-gradient(135deg, #f5b942 0%, #ff7a1a 100%);
  color: #0a0a0a;
  font-size: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 10px 30px rgba(245, 185, 66, 0.4), 0 4px 10px rgba(0,0,0,0.3);
  z-index: 9998;
  border: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  font-family: inherit;
}
.aslan-chat-fab:hover { transform: translateY(-2px) scale(1.04); box-shadow: 0 14px 36px rgba(245,185,66,0.5); }
.aslan-chat-fab.is-hidden { display: none; }
.aslan-chat-fab-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background: #ef4444;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  border-radius: 999px;
  padding: 2px 6px;
  min-width: 18px;
  text-align: center;
}

.aslan-chat-panel {
  position: fixed;
  right: 22px;
  bottom: 96px;
  width: 360px;
  max-width: calc(100vw - 32px);
  height: 520px;
  max-height: calc(100vh - 120px);
  background: #161a22;
  color: #e5e7eb;
  border-radius: 16px;
  border: 1px solid #262b38;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.6);
  display: none;
  flex-direction: column;
  z-index: 9999;
  overflow: hidden;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}
.aslan-chat-panel.is-open { display: flex; animation: aslan-chat-in 0.25s ease; }
@keyframes aslan-chat-in {
  from { opacity: 0; transform: translateY(12px) scale(0.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.aslan-chat-head {
  background: linear-gradient(135deg, #f5b942 0%, #ff7a1a 100%);
  color: #0a0a0a;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.aslan-chat-head img { width: 36px; height: 36px; border-radius: 50%; border: 2px solid rgba(0,0,0,0.25); }
.aslan-chat-head .meta { flex: 1; }
.aslan-chat-head .meta strong { display: block; font-size: 14px; }
.aslan-chat-head .meta small { display: block; font-size: 11px; opacity: 0.7; }
.aslan-chat-head .close { background: transparent; border: 0; font-size: 22px; cursor: pointer; color: #0a0a0a; padding: 0 4px; }

.aslan-chat-body {
  flex: 1;
  overflow-y: auto;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: #0f131b;
}
.aslan-chat-msg {
  max-width: 80%;
  padding: 9px 12px;
  border-radius: 12px;
  font-size: 14px;
  line-height: 1.4;
  white-space: pre-wrap;
  word-wrap: break-word;
}
.aslan-chat-msg.agent { background: #1d2230; color: #e5e7eb; align-self: flex-start; border-bottom-left-radius: 4px; }
.aslan-chat-msg.user { background: linear-gradient(135deg, #f5b942 0%, #ff7a1a 100%); color: #0a0a0a; align-self: flex-end; border-bottom-right-radius: 4px; font-weight: 500; }
.aslan-chat-msg .quick { display: inline-block; background: #0a0a0a; color: #f5b942; padding: 6px 10px; margin: 6px 6px 0 0; border-radius: 8px; font-size: 12px; cursor: pointer; border: 1px solid rgba(245,185,66,0.4); }
.aslan-chat-msg .quick:hover { background: #f5b942; color: #0a0a0a; }
.aslan-chat-msg a { color: #f5b942; text-decoration: underline; }

.aslan-chat-typing { color: var(--muted, #94a3b8); font-size: 12px; padding: 4px 12px; }
.aslan-chat-typing span { display: inline-block; animation: aslan-dot 1.2s infinite; }
.aslan-chat-typing span:nth-child(2) { animation-delay: 0.2s; }
.aslan-chat-typing span:nth-child(3) { animation-delay: 0.4s; }
@keyframes aslan-dot { 0%, 60%, 100% { opacity: 0.2; } 30% { opacity: 1; } }

.aslan-chat-foot {
  padding: 10px;
  background: #161a22;
  border-top: 1px solid #262b38;
  display: flex;
  gap: 8px;
}
.aslan-chat-foot input {
  flex: 1;
  background: #0f131b;
  border: 1px solid #262b38;
  border-radius: 10px;
  color: #e5e7eb;
  padding: 10px 12px;
  font-size: 14px;
  font-family: inherit;
  outline: none;
}
.aslan-chat-foot input:focus { border-color: #f5b942; }
.aslan-chat-foot button {
  background: #f5b942;
  color: #0a0a0a;
  border: 0;
  border-radius: 10px;
  padding: 0 16px;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  font-family: inherit;
}
.aslan-chat-foot button:disabled { opacity: 0.5; cursor: not-allowed; }

.aslan-chat-call-cta {
  display: flex;
  gap: 8px;
  padding: 10px 12px;
  background: rgba(245, 185, 66, 0.1);
  border: 1px solid rgba(245, 185, 66, 0.3);
  border-radius: 10px;
  margin: 8px 12px 0;
  font-size: 13px;
  align-items: center;
}
.aslan-chat-call-cta a { color: #f5b942; font-weight: 700; text-decoration: none; }

@media (max-width: 480px) {
  .aslan-chat-panel { right: 12px; left: 12px; width: auto; bottom: 88px; height: 70vh; }
  .aslan-chat-fab { right: 12px; bottom: 12px; }
}
