/* ============================================================
   YAPAY ZEKA VİTRİNİ — AI Asistanı (Yol Arkadaşı) Özel CSS
   ============================================================ */

.assistant-page-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  min-height: calc(100vh - var(--header-height));
  margin-top: var(--header-height);
  background: var(--bg-primary);
}

/* SIDEBAR STYLES */
.assistant-sidebar {
  background: rgba(10, 11, 22, 0.45);
  border-right: 1px solid var(--border-color);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.btn-new-chat {
  background: var(--gradient-primary);
  color: #fff;
  border: none;
  padding: 12px 20px;
  border-radius: var(--radius-md);
  font-family: 'Outfit', sans-serif;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 4px 15px rgba(235, 100, 65, 0.2);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.btn-new-chat:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(235, 100, 65, 0.35);
}

.sidebar-section {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.sidebar-section h4 {
  font-family: 'Outfit', sans-serif;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.history-item {
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-secondary);
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  text-align: left;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all var(--transition-fast);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.history-item:hover, .history-item.active {
  background: rgba(255, 255, 255, 0.03);
  border-color: var(--border-color);
  color: var(--text-primary);
}

.history-item.active {
  border-color: var(--accent-purple);
  background: rgba(99, 102, 241, 0.05);
}

/* MAIN CHAT AREA */
.assistant-chat-panel {
  display: flex;
  flex-direction: column;
  height: calc(100vh - var(--header-height));
  position: relative;
}

.chat-messages-container {
  flex: 1;
  overflow-y: auto;
  padding: 40px 24px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  max-width: 800px;
  width: 100%;
  margin: 0 auto;
}

/* Welcome Screen */
.chat-welcome-screen {
  text-align: center;
  margin: auto;
  max-width: 600px;
  padding: 20px;
  animation: fadeIn 0.5s ease-out;
}

.welcome-logo {
  font-size: 3rem;
  margin-bottom: 16px;
  display: inline-block;
  animation: pulse 2s infinite;
}

.welcome-title {
  font-family: 'Outfit', sans-serif;
  font-size: 2.2rem;
  margin-bottom: 12px;
}

.welcome-subtitle {
  color: var(--text-secondary);
  font-size: 1rem;
  line-height: 1.6;
  margin-bottom: 32px;
}

.suggestion-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  text-align: left;
}

.suggestion-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 16px;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.suggestion-card:hover {
  border-color: var(--accent-purple);
  background: var(--bg-card-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-card-hover);
}

.suggestion-card h5 {
  font-family: 'Outfit', sans-serif;
  font-size: 0.95rem;
  margin-bottom: 6px;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.suggestion-card p {
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.4;
  margin: 0;
}

/* Chat Messages */
.chat-msg {
  display: flex;
  gap: 16px;
  animation: slideUp 0.3s ease-out;
}

.chat-msg.user {
  flex-direction: row-reverse;
}

.msg-avatar {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
  box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

.chat-msg.user .msg-avatar {
  background: var(--accent-cyan);
}

.chat-msg.assistant .msg-avatar {
  background: var(--accent-purple);
}

.msg-bubble {
  max-width: 70%;
  padding: 16px 20px;
  border-radius: var(--radius-md);
  line-height: 1.6;
  font-size: 0.95rem;
}

.chat-msg.user .msg-bubble {
  background: var(--accent-purple);
  color: #fff;
  border-top-right-radius: 2px;
}

.chat-msg.assistant .msg-bubble {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  border-top-left-radius: 2px;
}

.msg-bubble p {
  margin: 0 0 12px;
}

.msg-bubble p:last-child {
  margin-bottom: 0;
}

.msg-bubble strong {
  color: var(--text-primary);
}

/* Recommmended tools inside bubble */
.chat-recommended-tools {
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.assistant-tool-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 16px;
  transition: all var(--transition-fast);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.assistant-tool-card:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: var(--accent-cyan);
}

.tool-card-left {
  display: flex;
  gap: 12px;
  align-items: center;
}

.tool-card-icon {
  width: 44px;
  height: 44px;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.2rem;
  color: var(--accent-purple);
  text-transform: uppercase;
}

.tool-card-info h5 {
  font-family: 'Outfit', sans-serif;
  font-size: 0.95rem;
  margin: 0 0 4px;
  color: var(--text-primary);
}

.tool-card-info p {
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin: 0 0 6px;
  line-height: 1.4;
}

.tool-card-badges {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.tool-badge-mini {
  font-size: 0.7rem;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  font-weight: 600;
}

.tool-badge-mini.pricing-ucretsiz {
  background: rgba(16, 185, 129, 0.1);
  color: #10b981;
}

.tool-badge-mini.pricing-freemium {
  background: rgba(245, 158, 11, 0.1);
  color: #f59e0b;
}

.tool-badge-mini.pricing-ucretli {
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
}

.tool-badge-mini.tr-full {
  background: rgba(99, 102, 241, 0.1);
  color: #6366f1;
}

.tool-card-right {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: flex-end;
}

.btn-assistant-action {
  padding: 8px 16px;
  font-size: 0.8rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition-fast);
  text-decoration: none;
  font-family: inherit;
  text-align: center;
  min-width: 100px;
}

.btn-assistant-action.primary {
  background: var(--accent-purple);
  color: #fff;
  border: none;
}

.btn-assistant-action.primary:hover {
  background: hsl(235, 100%, 70%);
}

.btn-assistant-action.secondary {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border-color);
}

.btn-assistant-action.secondary:hover {
  border-color: var(--text-primary);
  color: var(--text-primary);
}

/* Chat Input Bar */
.chat-input-wrapper {
  background: var(--bg-primary);
  border-top: 1px solid var(--border-color);
  padding: 24px;
}

.chat-input-box {
  max-width: 800px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.chat-input-form {
  display: flex;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 6px 12px;
  align-items: center;
  transition: all var(--transition-fast);
}

.chat-input-form:focus-within {
  border-color: var(--accent-purple);
  box-shadow: 0 0 0 1px var(--accent-purple), 0 0 20px rgba(99, 102, 241, 0.15);
}

.chat-textarea {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text-primary);
  padding: 10px 4px;
  font-family: inherit;
  font-size: 0.95rem;
  resize: none;
  height: 44px;
}

.btn-send-message {
  background: var(--gradient-primary);
  color: #fff;
  border: none;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform var(--transition-fast);
}

.btn-send-message:hover {
  transform: scale(1.05);
}

.chat-input-disclaimer {
  text-align: center;
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* Typing indicator */
.typing-dots {
  display: flex;
  gap: 4px;
  align-items: center;
  padding: 4px 8px;
}

.typing-dots span {
  width: 6px;
  height: 6px;
  background: var(--text-muted);
  border-radius: var(--radius-full);
  display: inline-block;
  animation: bounce 1.4s infinite ease-in-out both;
}

.typing-dots span:nth-child(1) { animation-delay: -0.32s; }
.typing-dots span:nth-child(2) { animation-delay: -0.16s; }

/* ANIMATIONS */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

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

@keyframes pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.05); }
  100% { transform: scale(1); }
}

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

/* RESPONSIVE & MOBILE APPLIANCE */
.assistant-chat-header-bar {
  display: none;
}

@media (max-width: 900px) {
  .assistant-page-layout {
    grid-template-columns: 1fr;
  }
  
  .assistant-chat-header-bar {
    display: flex;
  }

  .assistant-sidebar {
    position: fixed;
    top: var(--header-height);
    left: 0;
    bottom: 0;
    width: 280px;
    z-index: 150;
    transform: translateX(-100%);
    transition: transform var(--transition-base);
    box-shadow: 10px 0 30px rgba(0, 0, 0, 0.5);
    background: var(--bg-secondary);
  }

  .assistant-sidebar.open {
    transform: translateX(0);
  }

  .chat-messages-container {
    padding: 20px 16px;
  }

  .suggestion-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .msg-bubble {
    max-width: 85%;
  }

  .assistant-tool-card {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }

  .tool-card-right {
    flex-direction: row;
    align-items: center;
    justify-content: flex-end;
  }
}
