/* Assistant FAB */
#assistant-fab {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--accent-primary);
  color: white;
  border: none;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 9999;
  transition: transform 0.2s, box-shadow 0.2s;
  /* Hidden by default, shown via JS if owner */
  display: none; 
}

#assistant-fab:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 16px rgba(0,0,0,0.3);
}

#assistant-fab svg {
  width: 24px;
  height: 24px;
}

/* Assistant Chat Window */
#assistant-window {
  position: fixed;
  bottom: 90px;
  right: 24px;
  width: 350px;
  max-width: calc(100vw - 48px);
  height: 500px;
  max-height: calc(100vh - 120px);
  background: var(--bg-elevated);
  border: 1px solid var(--border-light);
  border-radius: 16px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.15);
  display: flex;
  flex-direction: column;
  z-index: 9998;
  opacity: 0;
  pointer-events: none;
  transform: translateY(20px);
  transition: opacity 0.3s, transform 0.3s;
  overflow: hidden;
  font-family: 'Inter', 'Outfit', sans-serif;
}

#assistant-window.active {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

/* Header */
.assistant-header {
  padding: 16px;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.assistant-header-title {
  font-weight: 600;
  font-size: 1rem;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.assistant-header-title svg {
  color: var(--accent);
}

.assistant-close-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
}
.assistant-close-btn:hover {
  background: rgba(128,128,128,0.1);
  color: var(--text-primary);
}

/* Body (Chat Area) */
.assistant-body {
  flex: 1;
  padding: 16px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.assistant-message {
  max-width: 85%;
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 0.9rem;
  line-height: 1.4;
  animation: fadeInMsg 0.2s ease-out forwards;
}

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

.assistant-message p {
  margin: 0 0 8px 0;
}
.assistant-message p:last-child {
  margin-bottom: 0;
}

.assistant-message strong {
  font-weight: 600;
  color: inherit;
}

.msg-ai {
  align-self: flex-start;
  background: var(--bg-secondary);
  color: var(--text-primary);
  border-bottom-left-radius: 4px;
}

.msg-user {
  align-self: flex-end;
  background: var(--accent, #f97316);
  color: white;
  border-bottom-right-radius: 4px;
}

/* Footer (Input Area) */
.assistant-footer {
  padding: 12px;
  border-top: 1px solid var(--border-light);
  display: flex;
  gap: 8px;
  background: var(--bg-elevated);
}

.assistant-input {
  flex: 1;
  padding: 10px 14px;
  border: 1px solid var(--border-strong);
  border-radius: 20px;
  background: var(--bg-primary);
  color: var(--text-primary);
  font-size: 0.9rem;
  outline: none;
}
.assistant-input:focus {
  border-color: var(--accent);
}

/* Suggestion Chips */
.assistant-suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}
.assistant-chip {
  background: transparent;
  border: 1px solid var(--border-strong);
  color: var(--text-primary);
  padding: 6px 12px;
  border-radius: 16px;
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.2s;
}
.assistant-chip:hover {
  background: var(--bg-secondary);
  border-color: var(--accent);
}
.assistant-input:focus {
  border-color: var(--accent);
}

.assistant-send-btn {
  background: var(--accent);
  color: white;
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.1s;
}
.assistant-send-btn:active {
  transform: scale(0.95);
}
.assistant-send-btn svg {
  width: 18px;
  height: 18px;
  margin-left: -2px;
}
