/* Ian Chat Widget Styles */
.ian-chat-button {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 50;
  width: 4rem;
  height: 4rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 9999px;
  background-color: var(--primary);
  color: var(--primary-foreground);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
}

.ian-chat-button:hover {
  transform: scale(1.1);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
}

.ian-chat-button svg {
  width: 1.75rem;
  height: 1.75rem;
}

.ian-chat-badge {
  position: absolute;
  top: -0.25rem;
  right: -0.25rem;
  width: 1.25rem;
  height: 1.25rem;
}

.ian-chat-badge-ping {
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 9999px;
  background-color: var(--accent);
  opacity: 0.75;
  animation: ian-ping 1s cubic-bezier(0, 0, 0.2, 1) infinite;
}

.ian-chat-badge-dot {
  position: relative;
  width: 1.25rem;
  height: 1.25rem;
  border-radius: 9999px;
  background-color: var(--accent);
}

@keyframes ian-ping {
  75%, 100% {
    transform: scale(2);
    opacity: 0;
  }
}

.ian-chat-window {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 50;
  width: 380px;
  display: flex;
  flex-direction: column;
  border-radius: 1rem;
  border: 1px solid var(--border);
  background-color: var(--card);
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.25);
  transition: all 0.3s ease;
}

.ian-chat-window.minimized {
  height: 60px;
}

.ian-chat-window:not(.minimized) {
  height: 600px;
}

.ian-chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top-left-radius: 1rem;
  border-top-right-radius: 1rem;
  border-bottom: 1px solid var(--border);
  background-color: var(--primary);
  padding: 1rem 1.25rem;
}

.ian-chat-header-left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.ian-chat-avatar {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 9999px;
  background-color: rgba(255, 255, 255, 0.2);
  color: var(--primary-foreground);
  overflow: hidden;
}

.ian-chat-avatar svg {
  width: 1.25rem;
  height: 1.25rem;
}

.ian-chat-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--primary-foreground);
  margin: 0;
}

.ian-chat-subtitle {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.8);
  margin: 0;
}

.ian-chat-header-buttons {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.ian-chat-header-btn {
  padding: 0.375rem;
  border-radius: 0.5rem;
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.8);
  cursor: pointer;
  transition: all 0.2s ease;
}

.ian-chat-header-btn:hover {
  background-color: rgba(255, 255, 255, 0.1);
  color: var(--primary-foreground);
}

.ian-chat-header-btn svg {
  width: 1rem;
  height: 1rem;
}

.ian-chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 1rem;
}

.ian-chat-message {
  display: flex;
  margin-bottom: 1rem;
}

.ian-chat-message.user {
  justify-content: flex-end;
}

.ian-chat-message.ian {
  justify-content: flex-start;
}

.ian-chat-bubble {
  max-width: 80%;
  padding: 0.625rem 1rem;
  border-radius: 1rem;
  font-size: 0.875rem;
  line-height: 1.6;
  word-wrap: break-word;
  white-space: pre-wrap;
}

.ian-chat-bubble.user {
  background-color: var(--primary);
  color: var(--primary-foreground);
}

.ian-chat-bubble.ian {
  background-color: var(--secondary);
  color: var(--secondary-foreground);
}

.ian-chat-typing {
  display: flex;
  justify-content: flex-start;
  margin-bottom: 1rem;
}

.ian-chat-typing-bubble {
  padding: 0.75rem 1rem;
  border-radius: 1rem;
  background-color: var(--secondary);
}

.ian-chat-typing-dots {
  display: flex;
  gap: 0.375rem;
}

.ian-chat-typing-dot {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 9999px;
  background-color: var(--primary);
  animation: ian-bounce 1.4s infinite ease-in-out both;
}

.ian-chat-typing-dot:nth-child(1) {
  animation-delay: -0.32s;
}

.ian-chat-typing-dot:nth-child(2) {
  animation-delay: -0.16s;
}

@keyframes ian-bounce {
  0%, 80%, 100% {
    transform: translateY(0);
  }
  40% {
    transform: translateY(-6px);
  }
}

.ian-chat-quick-actions {
  border-top: 1px solid var(--border);
  padding: 0.75rem 1rem;
}

.ian-chat-quick-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.ian-quick-btn {
  padding: 0.375rem 0.75rem;
  border-radius: 9999px;
  border: 1px solid var(--border);
  background-color: var(--background);
  color: var(--foreground);
  font-size: 0.75rem;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.ian-quick-btn:hover {
  background-color: var(--secondary);
}

.ian-chat-input-area {
  border-top: 1px solid var(--border);
  padding: 1rem;
}

.ian-chat-input-wrapper {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.ian-chat-input {
  flex: 1;
  padding: 0.625rem 0.875rem;
  border-radius: 0.5rem;
  border: 1px solid var(--input);
  background-color: var(--background);
  color: var(--foreground);
  font-size: 0.875rem;
  outline: none;
  transition: border-color 0.15s ease;
}

.ian-chat-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 1px var(--primary);
}

.ian-chat-input::placeholder {
  color: var(--muted-foreground);
  opacity: 0.8;
}

.ian-chat-send-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.5rem;
  background-color: var(--primary);
  color: var(--primary-foreground);
  border: none;
  cursor: pointer;
  transition: opacity 0.2s ease;
}

.ian-chat-send-btn:hover {
  opacity: 0.9;
}

.ian-chat-send-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.ian-chat-send-btn svg {
  width: 1rem;
  height: 1rem;
}

.ian-chat-footer-text {
  margin-top: 0.5rem;
  text-align: center;
  font-size: 0.75rem;
  color: var(--muted-foreground);
}

/* Mobile Responsive */
@media (max-width: 640px) {
  .ian-chat-window {
    width: calc(100vw - 2rem);
    right: 1rem;
    left: 1rem;
  }
  
  .ian-chat-window:not(.minimized) {
    height: calc(100vh - 8rem);
  }
}

.hidden {
  display: none;
}
