/* harry.css - Styles for the Harry AI assistant chat widget */

/* Floating button */
#harryToggleBtn {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  background: var(--accent-color);
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 56px;
  height: 56px;
  font-size: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
  cursor: pointer;
  z-index: 99999 !important;
  transition: transform var(--transition-fast), background var(--transition-fast);
}
#harryToggleBtn:hover { transform: scale(1.08); }

/* Chat modal overlay */
#harryChatOverlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  backdrop-filter: blur(8px);
  display: none;
  align-items: flex-end;
  justify-content: center;
  z-index: 100000 !important;
  padding: 0.5rem;
}
#harryChatOverlay.open { display: flex; }

/* Chat panel */
#harryChatPanel {
  width: 100%;
  max-width: 420px;
  max-height: 80vh;
  background: var(--glass-bg);
  border-radius: 20px 20px 0 0;
  box-shadow: 0 -4px 24px rgba(0,0,0,0.4);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
#harryChatHeader {
  padding: 0.75rem 1rem;
  background: var(--accent-color);
  color: var(--text-inverse);
  font-weight: 600;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
#harryChatBody {
  flex: 1;
  padding: 0.75rem 1rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.message {
  max-width: 85%;
  padding: 0.6rem 0.9rem;
  border-radius: 12px;
  line-height: 1.4;
  font-size: 0.9rem;
}
.message.user { align-self: flex-end; background: var(--accent-color); color: var(--text-inverse); }
.message.assistant { align-self: flex-start; background: rgba(255,255,255,0.07); color: var(--text-main); border: 1px solid rgba(255,255,255,0.1); }
.message img { max-width: 100%; border-radius: 8px; margin-top: 0.5rem; }
#harryInputWrapper {
  display: flex;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  background: var(--glass-bg);
  border-top: 1px solid rgba(255,255,255,0.05);
}
#harryInput {
  flex: 1;
  border: none;
  padding: 0.5rem 0.75rem;
  border-radius: 12px;
  background: rgba(255,255,255,0.08);
  color: var(--text-main);
  font-size: 0.9rem;
  outline: none;
}
#harrySendBtn {
  background: var(--accent-color);
  color: var(--text-inverse);
  border: none;
  border-radius: 12px;
  padding: 0.5rem 0.8rem;
  cursor: pointer;
  font-weight: 600;
  transition: background var(--transition-fast);
}
#harrySendBtn:hover { background: #4f46e5; }
/* Mobile */
@media (max-width: 768px) {
  #harryToggleBtn { bottom: 140px; right: 16px; width: 48px; height: 48px; }
  #harryChatPanel { border-radius: 16px 16px 0 0; max-height: 70vh; }
  #harryChatOverlay { align-items: flex-end; padding: 0; }
}
