/* public/css/synet-chat-widget.css - FİNAL VERSİYON */

:root {
    --synet-primary: #0f172a;
    --synet-secondary: #3b82f6;
    --synet-bg: #f8fafc;
    --synet-text: #334155;
    --synet-ai-bubble: #ffffff;
    --synet-user-bubble: #3b82f6;
    --synet-border: #e2e8f0;
}

#synet-ai-chat-widget {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 2147483647;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: var(--synet-text);
}

/* --- Buton --- */
#synet-ai-chat-button {
    background: linear-gradient(135deg, var(--synet-secondary), #2563eb);
    color: white;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    cursor: pointer;
    transition: transform 0.3s ease;
}
.synet-ai-shadow-hover { box-shadow: 0 4px 14px rgba(59, 130, 246, 0.4); }
#synet-ai-chat-button:hover { transform: scale(1.08) translateY(-4px); }

/* --- Container --- */
#synet-ai-chat-container {
    position: absolute;
    bottom: 84px;
    right: 0;
    width: 380px;
    height: 680px;
    background-color: var(--synet-bg);
    border-radius: 20px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px) scale(0.95);
    transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
    transform-origin: bottom right;
}
.synet-ai-shadow { box-shadow: 0 12px 40px rgba(0,0,0,0.15); border: 1px solid rgba(0,0,0,0.08); }
#synet-ai-chat-widget:not(.synet-ai-closed) #synet-ai-chat-container {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

/* ... (Önceki CSS'lerin altına ekle veya üzerine yaz) ... */

/* Giriş Yapıldıysa Kilit Butonu */
#synet-ai-auth-button.synet-ai-logged-in {
    color: #22c55e; /* Yeşil Renk */
}

/* Çıkış ve Özel Butonlar */
.synet-ai-primary-btn, .synet-ai-danger-btn {
    width: 100%; border: none; border-radius: 12px; padding: 12px; font-size: 15px; font-weight: 600; cursor: pointer; transition: 0.3s;
}
.synet-ai-primary-btn { background: var(--synet-secondary); color: white; }
.synet-ai-danger-btn { background: #fee2e2; color: #b91c1c; }
.synet-ai-danger-btn:hover { background: #fecaca; }

/* Popup form geçişlerini gizlemek için */
#synet-ai-auth-view-login, #synet-ai-auth-view-forgot, #synet-ai-auth-view-logout {
    width: 100%;
}

/* --- Header --- */
#synet-ai-chat-header {
    background-color: var(--synet-primary);
    color: white;
    padding: 16px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.synet-ai-header-profile { display: flex; align-items: center; gap: 12px; }
.synet-ai-avatar { width: 44px; height: 44px; border-radius: 50%; border: 2px solid rgba(255,255,255,0.2); }
.synet-ai-header-info { display: flex; flex-direction: column; }
.synet-ai-chat-title { font-size: 16px; font-weight: 600; }
.synet-ai-status-text { font-size: 12px; color: rgba(255,255,255,0.7); display: flex; align-items: center; gap: 6px; }
.synet-ai-pulsing-dot { width: 8px; height: 8px; background-color: #22c55e; border-radius: 50%; position: relative; }
.synet-ai-pulsing-dot::after { content: ''; position: absolute; width: 100%; height: 100%; background-color: #22c55e; border-radius: 50%; animation: synet-pulse 2s infinite; }
@keyframes synet-pulse { 0% { transform: scale(1); opacity: 0.8; } 100% { transform: scale(2.5); opacity: 0; } }

.synet-ai-header-actions { display: flex; gap: 12px; }
.synet-ai-icon-button { background: rgba(255,255,255,0.1); border: none; color: white; width: 32px; height: 32px; border-radius: 8px; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.synet-ai-icon-button:hover { background: rgba(255,255,255,0.2); }

/* Dropdown */
.synet-ai-dropdown { position: relative; }
.synet-ai-dropdown-content { display: none; position: absolute; right: 0; top: 110%; z-index: 99999; background: #fff; min-width: 120px; border-radius: 8px; border: 1px solid var(--synet-border); box-shadow: 0 8px 24px rgba(0,0,0,0.1); }
.synet-ai-dropdown:hover .synet-ai-dropdown-content { display: block; }
.synet-ai-dropdown-content a { color: var(--synet-text); padding: 10px 16px; text-decoration: none; display: block; font-size: 13px; }
.synet-ai-dropdown-content a:hover { background-color: #f1f5f9; }

/* --- Mesajlar --- */
#synet-ai-chat-messages { flex-grow: 1; padding: 20px; overflow-y: auto; display: flex; flex-direction: column; gap: 16px; }
#synet-ai-chat-messages::-webkit-scrollbar { width: 4px; }
#synet-ai-chat-messages::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 4px; }

.synet-ai-message-wrapper { display: flex; flex-direction: column; width: 100%; }
.synet-ai-message { padding: 12px 16px; border-radius: 16px; max-width: 85%; font-size: 14.5px; line-height: 1.5; position: relative; }
.user-wrapper { align-items: flex-end; }
.user-message { background-color: var(--synet-user-bubble); color: white; border-bottom-right-radius: 4px; }
.assistant-wrapper { align-items: flex-start; }
.assistant-message { background-color: var(--synet-ai-bubble); color: var(--synet-text); border: 1px solid var(--synet-border); border-bottom-left-radius: 4px; }
.synet-ai-message-time { display: block; font-size: 10px; text-align: right; margin-top: 4px; opacity: 0.7; }

/* --- Typing --- */
#synet-ai-typing-indicator { padding: 0 20px 10px 20px; display: flex; align-items: center; gap: 8px; }
.synet-ai-typing-bubble { background: var(--synet-ai-bubble); border: 1px solid var(--synet-border); padding: 10px 14px; border-radius: 16px; border-bottom-left-radius: 4px; display: flex; gap: 4px; }
.synet-ai-typing-dot { width: 6px; height: 6px; background: #94a3b8; border-radius: 50%; animation: synet-typing 1.4s infinite ease-in-out both; }
.synet-ai-typing-dot:nth-child(1) { animation-delay: -0.32s; }
.synet-ai-typing-dot:nth-child(2) { animation-delay: -0.16s; }
@keyframes synet-typing { 0%, 80%, 100% { transform: scale(0); } 40% { transform: scale(1); } }
.synet-ai-typing-text { font-size: 11px; color: #64748b; }

/* --- Input Area (SQUISH KONTROLÜ EKLENDİ) --- */
#synet-ai-chat-input-area { display: flex; padding: 16px; background: #fff; border-top: 1px solid var(--synet-border); align-items: center; gap: 10px; }
#synet-ai-auth-button { background: none; border: none; color: #94a3b8; font-size: 20px; cursor: pointer; flex-shrink: 0; }
#synet-ai-auth-button:hover { color: var(--synet-secondary); }
#synet-ai-chat-input { flex-grow: 1; border: 1px solid var(--synet-border); background: #f1f5f9; border-radius: 24px; padding: 12px 18px; font-size: 14.5px; }
#synet-ai-chat-input:focus { outline: none; border-color: var(--synet-secondary); background: #fff; }
#synet-ai-send-button { background: var(--synet-secondary); color: white; border: none; border-radius: 50%; width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; cursor: pointer; flex-shrink: 0; }
#synet-ai-send-button:hover { background: #2563eb; }

/* --- Footer --- */
#synet-ai-powered-by { font-size: 11px; color: #94a3b8; text-align: center; padding: 8px 0; background: #fff; border-top: 1px solid #f1f5f9; }
#synet-ai-powered-by a { color: #64748b; text-decoration: none; font-weight: 600; }

/* --- Popup (Glassmorphism) --- */
#synet-ai-auth-popup { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: rgba(15, 23, 42, 0.6); backdrop-filter: blur(8px); display: flex; flex-direction: column; justify-content: flex-end; border-radius: 20px; opacity: 0; visibility: hidden; transition: all 0.3s ease; z-index: 100; }
#synet-ai-auth-popup.synet-ai-active { opacity: 1; visibility: visible; }
.synet-ai-auth-content { background: #fff; width: 100%; padding: 25px 20px; border-radius: 20px 20px 0 0; transform: translateY(100%); transition: transform 0.3s ease; box-sizing: border-box; }
#synet-ai-auth-popup.synet-ai-active .synet-ai-auth-content { transform: translateY(0); }
.synet-ai-auth-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 15px; }
.synet-ai-auth-header h4 { margin: 0; font-size: 16px; color: var(--synet-primary); }
.synet-ai-close-auth-popup-button { background: #f1f5f9; border: none; width: 30px; height: 30px; border-radius: 50%; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.synet-ai-auth-description { font-size: 12.5px; color: #64748b; margin-bottom: 20px; }
.synet-ai-form-group { margin-bottom: 12px; }
#synet-ai-auth-form input { width: 100%; padding: 12px; border: 1px solid var(--synet-border); border-radius: 12px; font-size: 14px; box-sizing: border-box; }
#synet-ai-login-register-button { background: linear-gradient(135deg, var(--synet-secondary), #2563eb); color: white; border: none; border-radius: 12px; padding: 12px; width: 100%; font-size: 15px; font-weight: 600; cursor: pointer; margin-top: 5px; }
.synet-ai-message-area { margin-top: 15px; font-size: 13px; padding: 10px; border-radius: 8px; text-align: center; }
.synet-ai-message-area.success { background: #f0fdf4; color: #15803d; }
.synet-ai-message-area.error { background: #fef2f2; color: #b91c1c; }