/* ========================================
   AYDENIZ KARAVAN — AI Planner
   ======================================== */

/* AI Floating Widget */
.ai-widget {
  position: fixed;
  bottom: var(--space-8);
  left: var(--space-8);
  display: flex;
  align-items: center;
  gap: var(--space-3);
  background: rgba(138, 92, 246, 0.15);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(138, 92, 246, 0.4);
  padding: 6px 20px 6px 6px;
  border-radius: 50px;
  cursor: pointer;
  z-index: 9900;
  box-shadow: 0 0 20px rgba(138, 92, 246, 0.3);
  transition: all 0.3s ease;
}

.ai-widget:hover {
  background: rgba(138, 92, 246, 0.25);
  box-shadow: 0 0 30px rgba(138, 92, 246, 0.5);
  transform: translateY(-5px);
}

.ai-widget.pulse-glow {
  animation: widget-pulse 2s infinite;
}

@keyframes widget-pulse {
  0% { box-shadow: 0 0 0 0 rgba(138, 92, 246, 0.4); }
  70% { box-shadow: 0 0 0 15px rgba(138, 92, 246, 0); }
  100% { box-shadow: 0 0 0 0 rgba(138, 92, 246, 0); }
}

.ai-widget__video-wrapper {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid #a78bfa;
}

.ai-widget__video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ai-widget__text {
  color: white;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: var(--text-sm);
}

/* Chat Input Footer */
.ai-modal__footer {
  padding: var(--space-4) var(--space-6);
  border-top: 1px solid rgba(255,255,255,0.05);
  background: rgba(0,0,0,0.2);
}

.ai-chat-form {
  display: flex;
  gap: var(--space-2);
  position: relative;
}

.ai-chat-input {
  flex: 1;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(138, 92, 246, 0.2);
  color: white;
  border-radius: 30px;
  padding: 12px 48px 12px 20px;
  font-family: var(--font-body);
  font-size: var(--text-sm);
  transition: all 0.2s;
}

.ai-chat-input:focus {
  outline: none;
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(138, 92, 246, 0.5);
}

.ai-chat-send {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  background: linear-gradient(135deg, #8b5cf6 0%, #6d28d9 100%);
  color: white;
  border: none;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
}

.ai-chat-send:hover {
  transform: translateY(-50%) scale(1.1);
}

.ai-modal-overlay {
  position: fixed;
  top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(4, 11, 22, 0.85);
  backdrop-filter: blur(10px);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.4s ease;
}

.ai-modal-overlay.active {
  opacity: 1; visibility: visible;
}

.ai-modal {
  width: 90%;
  max-width: 500px;
  background: linear-gradient(145deg, var(--primary-800) 0%, var(--primary-900) 100%);
  border: 1px solid rgba(138, 92, 246, 0.3);
  border-radius: var(--radius-xl);
  box-shadow: 0 10px 40px rgba(138, 92, 246, 0.2), inset 0 0 20px rgba(255,255,255,0.02);
  transform: scale(0.9) translateY(20px);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.ai-modal-overlay.active .ai-modal {
  transform: scale(1) translateY(0);
}

.ai-modal__header {
  padding: var(--space-4) var(--space-6);
  border-bottom: 1px solid rgba(255,255,255,0.05);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(0,0,0,0.2);
}

.ai-modal__title {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-heading);
  font-weight: 700;
  color: white;
  font-size: var(--text-lg);
}

.ai-modal__title svg {
  color: #a78bfa;
  animation: float-ai 3s ease-in-out infinite;
}

@keyframes float-ai {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}

.ai-modal__close {
  color: rgba(255,255,255,0.5);
  cursor: pointer;
  transition: color 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ai-modal__close:hover { color: white; }

.ai-modal__body {
  padding: var(--space-6);
  height: 400px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  scroll-behavior: smooth;
}

.ai-msg {
  max-width: 85%;
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-lg);
  font-size: var(--text-sm);
  line-height: 1.6;
  opacity: 0;
  transform: translateY(10px);
  animation: msg-appear 0.4s forwards;
}

@keyframes msg-appear {
  to { opacity: 1; transform: translateY(0); }
}

.ai-msg--user {
  align-self: flex-end;
  background: rgba(255,255,255,0.1);
  color: white;
  border-bottom-right-radius: 4px;
}

.ai-msg--bot {
  align-self: flex-start;
  background: linear-gradient(135deg, rgba(138, 92, 246, 0.15) 0%, rgba(124, 58, 237, 0.25) 100%);
  border: 1px solid rgba(138, 92, 246, 0.3);
  color: #fff;
  border-bottom-left-radius: 4px;
}

/* Typing indicator */
.typing-indicator {
  display: flex;
  gap: 4px;
  padding: 4px 0;
}
.typing-dot {
  width: 6px; height: 6px; border-radius: 50%; background: #a78bfa;
  animation: typing 1.4s infinite ease-in-out both;
}
.typing-dot:nth-child(1) { animation-delay: -0.32s; }
.typing-dot:nth-child(2) { animation-delay: -0.16s; }

@keyframes typing {
  0%, 80%, 100% { transform: scale(0); opacity: 0.5; }
  40% { transform: scale(1); opacity: 1; }
}

/* Suggested Card */
.ai-suggest-card {
  margin-top: var(--space-2);
  background: rgba(0,0,0,0.3);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius-md);
  padding: var(--space-3);
  display: flex;
  align-items: center;
  gap: var(--space-4);
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
}
.ai-suggest-card:hover {
  background: rgba(138, 92, 246, 0.15);
  border-color: rgba(138, 92, 246, 0.5);
}
.ai-suggest-card img {
  width: 80px; height: 60px; object-fit: cover; border-radius: var(--radius-sm);  border: 1px solid rgba(255,255,255,0.1);
}
.ai-suggest-info {
  flex: 1;
}
.ai-suggest-info h4 { color: white; font-size: var(--text-sm); margin-bottom: 2px; }
.ai-suggest-info p { color: #a78bfa; font-size: var(--text-xs); margin: 0; font-weight: 600; }
