/* ==========================================================================
   MOKASH URBAN ASSISTANT — LUXURY FLOATING AI CHAT WIDGET
   Directly matching brand specifications and live website assistant UI
   ========================================================================== */

/* Floating Launch Button (Bottom Right) */
.mokash-chat-fab {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: var(--brand-gold, #D69B05);
  color: #121C38;
  border: none;
  box-shadow: 0 10px 25px rgba(214, 155, 5, 0.4), 0 4px 10px rgba(0, 0, 0, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s ease, background-color 0.2s ease;
  outline: none;
}

.mokash-chat-fab:hover {
  transform: scale(1.08);
  background: #E5AB1C;
  box-shadow: 0 14px 32px rgba(214, 155, 5, 0.55), 0 6px 14px rgba(0, 0, 0, 0.25);
}

.mokash-chat-fab:active {
  transform: scale(0.96);
}

.mokash-chat-fab svg {
  width: 26px;
  height: 26px;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.mokash-chat-fab .icon-close {
  display: none;
}

.mokash-chat-fab.is-open .icon-chat {
  display: none;
}

.mokash-chat-fab.is-open .icon-close {
  display: block;
}

/* Chat Floating Modal Container */
.mokash-chat-window {
  position: fixed;
  bottom: 94px;
  right: 24px;
  z-index: 9998;
  width: min(390px, calc(100vw - 32px));
  height: min(580px, calc(100vh - 120px));
  background: #FFFFFF;
  border-radius: 18px;
  box-shadow: 0 20px 50px rgba(14, 23, 46, 0.28), 0 4px 16px rgba(0, 0, 0, 0.08);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(34, 48, 87, 0.12);
  opacity: 0;
  visibility: hidden;
  transform: translateY(16px) scale(0.95);
  transform-origin: bottom right;
  transition: opacity 0.28s cubic-bezier(0.16, 1, 0.3, 1), 
              transform 0.28s cubic-bezier(0.16, 1, 0.3, 1), 
              visibility 0.28s;
}

.mokash-chat-window.is-open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

/* Header Bar */
.mokash-chat-header {
  background: #16203B;
  color: #FFFFFF;
  padding: 16px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top-left-radius: 18px;
  border-top-right-radius: 18px;
  user-select: none;
  border-bottom: 1px solid rgba(214, 155, 5, 0.25);
}

.mokash-chat-header-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-body, 'Plus Jakarta Sans', sans-serif);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.mokash-chat-header-title svg {
  width: 22px;
  height: 22px;
  color: #FFFFFF;
}

.mokash-chat-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.mokash-chat-btn-icon {
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.7);
  width: 28px;
  height: 28px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.15s ease, background-color 0.15s ease;
}

.mokash-chat-btn-icon:hover {
  color: #FFFFFF;
  background: rgba(255, 255, 255, 0.12);
}

/* Messages Scrollable Body */
.mokash-chat-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: #F8FAFC;
  scroll-behavior: smooth;
}

.mokash-chat-body::-webkit-scrollbar {
  width: 5px;
}

.mokash-chat-body::-webkit-scrollbar-thumb {
  background: rgba(34, 48, 87, 0.15);
  border-radius: 4px;
}

/* Chat Message Bubbles */
.chat-msg {
  display: flex;
  flex-direction: column;
  max-width: 86%;
  animation: chatMsgFadeIn 0.25s ease-out;
}

@keyframes chatMsgFadeIn {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.chat-msg.msg-assistant {
  align-self: flex-start;
}

.chat-msg.msg-user {
  align-self: flex-end;
}

.chat-bubble {
  padding: 12px 14px;
  border-radius: 14px;
  font-family: var(--font-body, 'Plus Jakarta Sans', sans-serif);
  font-size: 13.5px;
  line-height: 1.5;
  word-break: break-word;
}

.chat-msg.msg-assistant .chat-bubble {
  background: #F1F4F9;
  color: #121C38;
  border-bottom-left-radius: 4px;
  border: 1px solid rgba(34, 48, 87, 0.08);
}

.chat-msg.msg-user .chat-bubble {
  background: #16203B;
  color: #FFFFFF;
  border-bottom-right-radius: 4px;
}

.chat-bubble p {
  margin: 0 0 6px 0;
}

.chat-bubble p:last-child {
  margin-bottom: 0;
}

.chat-bubble a {
  color: #D69B05;
  font-weight: 600;
  text-decoration: underline;
}

.chat-bubble a:hover {
  color: #B88204;
}

/* Quick Prompt Action Pills */
.chat-quick-actions {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-top: 6px;
  width: 100%;
}

.quick-action-btn {
  background: #FFFFFF;
  border: 1px solid #223057;
  color: #223057;
  padding: 8px 14px;
  border-radius: 20px;
  font-family: var(--font-body, 'Plus Jakarta Sans', sans-serif);
  font-size: 12.5px;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  line-height: 1.35;
}

.quick-action-btn:hover {
  background: #223057;
  color: #FFFFFF;
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(34, 48, 87, 0.15);
}

/* Typing Indicator */
.chat-typing-indicator {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 10px 14px;
  background: #F1F4F9;
  border-radius: 14px;
  border-bottom-left-radius: 4px;
  border: 1px solid rgba(34, 48, 87, 0.08);
  width: fit-content;
}

.chat-typing-indicator span {
  width: 6px;
  height: 6px;
  background: #5B6A8A;
  border-radius: 50%;
  animation: typingBounce 1.4s infinite ease-in-out both;
}

.chat-typing-indicator span:nth-child(1) { animation-delay: -0.32s; }
.chat-typing-indicator span:nth-child(2) { animation-delay: -0.16s; }
.chat-typing-indicator span:nth-child(3) { animation-delay: 0; }

@keyframes typingBounce {
  0%, 80%, 100% { transform: scale(0.6); opacity: 0.4; }
  40% { transform: scale(1); opacity: 1; }
}

/* Bottom Input Bar */
.mokash-chat-footer {
  padding: 12px 14px;
  background: #FFFFFF;
  border-top: 1px solid rgba(34, 48, 87, 0.08);
  display: flex;
  align-items: center;
  gap: 8px;
}

.mokash-chat-input {
  flex: 1;
  border: 1px solid #D5DDEB;
  border-radius: 10px;
  padding: 10px 14px;
  font-family: var(--font-body, 'Plus Jakarta Sans', sans-serif);
  font-size: 13.5px;
  color: #121C38;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  background: #FFFFFF;
}

.mokash-chat-input:focus {
  border-color: #D69B05;
  box-shadow: 0 0 0 3px rgba(214, 155, 5, 0.15);
}

.mokash-chat-input::placeholder {
  color: #8E9BAE;
}

.mokash-chat-send-btn {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: #F5C767;
  color: #121C38;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.15s ease, opacity 0.2s ease;
  flex-shrink: 0;
}

.mokash-chat-send-btn:hover:not(:disabled) {
  background: #D69B05;
  transform: scale(1.04);
}

.mokash-chat-send-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.mokash-chat-send-btn svg {
  width: 18px;
  height: 18px;
}

/* Mobile Responsiveness */
@media (max-width: 480px) {
  .mokash-chat-fab {
    bottom: 18px;
    right: 18px;
    width: 52px;
    height: 52px;
  }
  
  .mokash-chat-window {
    bottom: 80px;
    right: 12px;
    left: 12px;
    width: auto;
    height: calc(100vh - 110px);
    max-height: 520px;
  }
}
