/* assets/css/ai_chat.css */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600&family=Roboto:wght@400;500;700&display=swap');

:root {
  --bg-app: #ffffff;
  --bg-sidebar: #f0f4f9;
  --bg-bubble-user: #e7f0fe;
  --bg-bubble-bot: transparent;
  --bg-input: #f0f4f9;
  --text-main: #1f1f1f;
  --text-muted: #444746;
  --border-light: #e1e3e1;
  --primary: #0b57d0;
  --icon-hover: rgba(0,0,0,0.05);
  --gemini-gradient: linear-gradient(135deg, #4285f4, #9b72cb, #d96570);
  --shadow-input: 0 4px 12px rgba(0,0,0,0.1);
  --transition-speed: 0.3s;
}

/* Panel Entegrasyon Ayarları */
.ai-module-container {
    display: flex;
    height: calc(100vh - 100px); /* Header ve padding payı */
    background-color: var(--bg-app);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.05);
    font-family: 'Roboto', sans-serif;
    position: relative;
}

.ai-sidebar {
    width: 260px;
    background-color: var(--bg-sidebar);
    padding: 20px 16px;
    display: flex;
    flex-direction: column;
    border-right: 1px solid var(--border-light);
}

.ai-chat-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: var(--bg-app);
    position: relative;
}

/* Chat Mesajları */
.msgs {
    flex: 1;
    overflow-y: auto;
    padding: 20px 40px;
    display: flex;
    flex-direction: column;
    scroll-behavior: smooth;
}

.msg { display: flex; gap: 16px; margin-bottom: 24px; animation: fadeIn 0.3s ease; }
.msg.user { flex-direction: row-reverse; }

.avatar {
    width: 32px; height: 32px; flex-shrink: 0; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 12px; font-weight: bold; color: #fff;
}
.msg.assistant .avatar { background: var(--gemini-gradient); }
.msg.user .avatar { background: #444746; }

.bubble {
    max-width: 85%; padding: 12px 16px; border-radius: 18px; font-size: 1rem; line-height: 1.6;
    color: var(--text-main); word-break: break-word;
}
.msg.user .bubble { background: var(--bg-bubble-user); border-bottom-right-radius: 4px; }
.msg.assistant .bubble { background: transparent; padding: 0; padding-top: 4px; max-width: 100%; }

/* Composer (Yazma Alanı) */
.composer {
    padding: 20px 40px 30px 40px;
    background: var(--bg-app);
    z-index: 20;
}

.input-group {
    display: flex; align-items: flex-end; gap: 12px;
    background: var(--bg-input); border: 1px solid var(--border-light);
    border-radius: 24px; padding: 12px 16px;
    transition: all 0.3s ease;
}
.input-group:focus-within { background: var(--bg-app); border-color: var(--primary); box-shadow: var(--shadow-input); }

textarea.ai-text {
    flex: 1; background: transparent; border: none; padding: 10px 5px;
    font-family: 'Roboto', sans-serif; font-size: 1rem; color: var(--text-main);
    max-height: 150px; min-height: 24px; resize: none; outline: none;
}

.btn-send {
    width: 42px; height: 42px; border-radius: 50%; border: none;
    background: var(--primary); color: #fff; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: 0.2s;
}
.btn-send:hover { transform: scale(1.05); }

/* Animasyonlar */
.typing { display: flex; gap: 4px; padding: 5px; }
.dot { width: 6px; height: 6px; background: #555; border-radius: 50%; animation: bounce 1.4s infinite ease-in-out both; }
.dot:nth-child(1) { animation-delay: -0.32s; }
.dot:nth-child(2) { animation-delay: -0.16s; }
@keyframes bounce { 0%, 80%, 100% { transform: scale(0); } 40% { transform: scale(1); } }
@keyframes fadeIn { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: translateY(0); } }

/* Quick Buttons */
.qbtn {
    text-align: left; background: transparent; border: none; padding: 10px 16px;
    border-radius: 20px; color: var(--text-main); font-size: 0.9rem;
    cursor: pointer; transition: background 0.2s; margin-bottom: 4px; display: block; width: 100%;
}
.qbtn:hover { background: var(--icon-hover); }
.qbtn.primary { background: #d3e3fd; color: #041e49; font-weight: 500; }