/* Access Actually Chat Widget */
#aa-chat-bubble {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #183D33;
  color: #fff;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(0,0,0,0.15);
  transition: transform 0.2s;
}
#aa-chat-bubble:hover { transform: scale(1.1); }

#aa-chat-panel {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 10000;
  width: 380px;
  max-width: calc(100vw - 2rem);
  height: 520px;
  max-height: calc(100vh - 4rem);
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 8px 40px rgba(0,0,0,0.15);
  border: 1px solid #E5E2DC;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
#aa-chat-panel.aa-chat-fullpage-mode {
  position: relative;
  bottom: auto;
  right: auto;
  width: 100%;
  max-width: 100%;
  height: auto;
  min-height: 500px;
  max-height: none;
  box-shadow: none;
  border-radius: 16px;
}

.aa-chat-header {
  background: #183D33;
  color: #fff;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}
.aa-chat-header-left { display: flex; align-items: center; gap: 10px; }
.aa-chat-header-right { display: flex; align-items: center; gap: 4px; }
.aa-chat-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255,255,255,0.2);
  display: flex;
  align-items: center;
  justify-content: center;
}
.aa-chat-title { font-family: 'Outfit', sans-serif; font-weight: 600; font-size: 14px; }
.aa-chat-subtitle { font-size: 10px; opacity: 0.7; }
.aa-chat-close, .aa-chat-hdr-btn {
  background: rgba(255,255,255,0.1);
  border: none;
  color: #fff;
  cursor: pointer;
  padding: 6px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
}
.aa-chat-hdr-btn { padding: 6px 12px; font-family: 'Outfit', sans-serif; }
.aa-chat-close:hover, .aa-chat-hdr-btn:hover { background: rgba(255,255,255,0.2); }

.aa-chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 12px;
}

.aa-chat-empty {
  text-align: center;
  padding: 24px 0;
  color: #4A4D4A;
  font-size: 14px;
}
.aa-chat-suggestions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 16px;
}
.aa-chat-suggest {
  text-align: left;
  font-size: 12px;
  padding: 10px 14px;
  background: rgba(24,61,51,0.05);
  border: none;
  border-radius: 10px;
  color: #183D33;
  cursor: pointer;
  transition: background 0.2s;
}
.aa-chat-suggest:hover { background: rgba(24,61,51,0.1); }

.aa-msg { display: flex; margin-bottom: 10px; }
.aa-msg-user { justify-content: flex-end; }
.aa-msg-assistant { justify-content: flex-start; }
.aa-msg-bubble {
  max-width: 85%;
  padding: 10px 14px;
  border-radius: 16px;
  font-size: 13px;
  line-height: 1.5;
}
.aa-msg-user .aa-msg-bubble {
  background: #183D33;
  color: #fff;
  border-bottom-right-radius: 4px;
}
.aa-msg-assistant .aa-msg-bubble {
  background: #F5F3EF;
  color: #1A1D1A;
  border-bottom-left-radius: 4px;
}
.aa-msg-bubble p { margin: 0 0 4px; }
.aa-msg-bubble p:last-child { margin-bottom: 0; }
.aa-msg-bubble ul { margin: 4px 0; padding-left: 16px; }
.aa-msg-bubble li { margin-bottom: 2px; }
.aa-msg-bubble strong { font-weight: 600; }

.aa-chat-loading {
  display: flex;
  gap: 4px;
  padding: 4px 0;
}
.aa-chat-loading span {
  width: 6px;
  height: 6px;
  background: #183D33;
  border-radius: 50%;
  opacity: 0.4;
  animation: aa-bounce 1.4s infinite ease-in-out;
}
.aa-chat-loading span:nth-child(2) { animation-delay: 0.2s; }
.aa-chat-loading span:nth-child(3) { animation-delay: 0.4s; }
@keyframes aa-bounce {
  0%, 80%, 100% { transform: scale(0); }
  40% { transform: scale(1); opacity: 1; }
}

.aa-chat-input-area {
  display: flex;
  gap: 8px;
  padding: 10px 12px;
  border-top: 1px solid #E5E2DC;
  flex-shrink: 0;
}
#aa-chat-input {
  flex: 1;
  padding: 8px 14px;
  border: 1px solid #E5E2DC;
  border-radius: 20px;
  font-size: 13px;
  outline: none;
  font-family: inherit;
}
#aa-chat-input:focus { border-color: #183D33; box-shadow: 0 0 0 2px rgba(24,61,51,0.1); }
#aa-chat-send {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #183D33;
  color: #fff;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.2s;
}
#aa-chat-send:hover { background: #0f2b23; }

@media (max-width: 440px) {
  #aa-chat-panel {
    width: calc(100vw - 1rem);
    right: 0.5rem;
    bottom: 0.5rem;
    height: calc(100vh - 3rem);
  }
}
