﻿/* ZekiBeygir AI Assistant Widget CSS */
:root {
    --ai-primary: #E63946;
    --ai-primary-dark: #c62d39;
    --ai-primary-light: #ff4d5a;
    --ai-dark: #1D1D1D;
    --ai-darker: #0f0f0f;
    --ai-gray: #6c757d;
    --ai-border: rgba(255, 255, 255, 0.1);
    --ai-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    --ai-gradient: linear-gradient(135deg, #E63946 0%, #ff6b6b 100%);
}

.ai-assistant-toggle {
    position: fixed;
    bottom: 80px;
    right: 30px;
    width: 65px;
    height: 65px;
    border-radius: 50%;
    background: var(--ai-gradient);
    border: none;
    cursor: pointer;
    box-shadow: var(--ai-shadow);
    z-index: 9998;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.ai-assistant-toggle:hover { transform: scale(1.1); box-shadow: 0 15px 50px rgba(230, 57, 70, 0.4); }
.ai-assistant-toggle:active { transform: scale(0.95); }
.ai-assistant-toggle .toggle-icon { width: 32px; height: 32px; color: white; transition: all 0.3s ease; }
.ai-assistant-toggle .toggle-icon.chat-icon { display: block; }
.ai-assistant-toggle .toggle-icon.close-icon { display: none; }
.ai-assistant-toggle.active .toggle-icon.chat-icon { display: none; }
.ai-assistant-toggle.active .toggle-icon.close-icon { display: block; }
.ai-assistant-toggle::before { content: ''; position: absolute; width: 100%; height: 100%; border-radius: 50%; background: var(--ai-primary); animation: ai-pulse 2s infinite; z-index: -1; }
.ai-assistant-toggle.active::before { animation: none; }

@keyframes ai-pulse { 0% { transform: scale(1); opacity: 0.7; } 70%, 100% { transform: scale(1.5); opacity: 0; } }

.ai-assistant-window {
    position: fixed;
    bottom: 110px;
    right: 30px;
    width: 400px;
    height: 550px;
    background: var(--ai-dark);
    border-radius: 20px;
    box-shadow: var(--ai-shadow);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px) scale(0.95);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.ai-assistant-window.active { opacity: 1; visibility: visible; transform: translateY(0) scale(1); }

.ai-chat-header {
    background: var(--ai-gradient);
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.ai-avatar { width: 50px; height: 50px; border-radius: 50%; background: rgba(255, 255, 255, 0.2); display: flex; align-items: center; justify-content: center; position: relative; }
.ai-avatar img { width: 30px; height: 30px; filter: brightness(0) invert(1); }
.ai-avatar .status-dot { position: absolute; bottom: 2px; right: 2px; width: 12px; height: 12px; background: #28a745; border-radius: 50%; border: 2px solid var(--ai-primary); }

.ai-header-info h4 { color: white; font-size: 18px; font-weight: 700; margin: 0 0 4px 0; }
.ai-header-info p { color: rgba(255, 255, 255, 0.8); font-size: 13px; margin: 0; }

.ai-header-actions { margin-left: auto; display: flex; gap: 8px; }
.ai-header-actions button { width: 36px; height: 36px; border-radius: 50%; border: none; background: rgba(255, 255, 255, 0.15); color: white; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: all 0.2s ease; }
.ai-header-actions button:hover { background: rgba(255, 255, 255, 0.25); }
.ai-header-actions button svg { width: 18px; height: 18px; }

.ai-chat-messages { flex: 1; overflow-y: auto; padding: 20px; display: flex; flex-direction: column; gap: 16px; background: var(--ai-darker); }
.ai-chat-messages::-webkit-scrollbar { width: 6px; }
.ai-chat-messages::-webkit-scrollbar-thumb { background: var(--ai-gray); border-radius: 3px; }

.ai-message { display: flex; gap: 10px; max-width: 85%; animation: ai-messageIn 0.3s ease; }
.ai-message.bot { align-self: flex-start; }
.ai-message.user { align-self: flex-end; flex-direction: row-reverse; }

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

.ai-message-avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--ai-primary); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.ai-message-avatar img { width: 18px; height: 18px; filter: brightness(0) invert(1); }
.ai-message-avatar svg { width: 18px; height: 18px; color: white; }
.ai-message.user .ai-message-avatar { background: var(--ai-gray); }

.ai-message-content { background: var(--ai-dark); padding: 12px 16px; border-radius: 18px; color: white; font-size: 14px; line-height: 1.5; }
.ai-message-content a { color: var(--ai-primary-light); }
.ai-message-content strong { color: var(--ai-primary-light); }
.ai-message.bot .ai-message-content { border-bottom-left-radius: 4px; }
.ai-message.user .ai-message-content { background: var(--ai-primary); border-bottom-right-radius: 4px; }
.ai-message-time { font-size: 11px; color: var(--ai-gray); margin-top: 4px; display: block; }
.ai-message.user .ai-message-time { text-align: right; color: rgba(255, 255, 255, 0.7); }

.ai-typing-indicator { display: flex; gap: 4px; padding: 8px 0; }
.ai-typing-indicator span { width: 8px; height: 8px; background: var(--ai-gray); border-radius: 50%; animation: ai-typing 1.4s infinite ease-in-out; }
.ai-typing-indicator span:nth-child(1) { animation-delay: -0.32s; }
.ai-typing-indicator span:nth-child(2) { animation-delay: -0.16s; }

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

.ai-quick-actions { padding: 12px 20px; background: var(--ai-dark); border-top: 1px solid var(--ai-border); display: flex; gap: 8px; flex-wrap: wrap; }
.ai-quick-btn { padding: 8px 14px; background: rgba(230, 57, 70, 0.15); border: 1px solid rgba(230, 57, 70, 0.3); border-radius: 20px; color: var(--ai-primary-light); font-size: 12px; font-weight: 600; cursor: pointer; transition: all 0.2s ease; }
.ai-quick-btn:hover { background: var(--ai-primary); color: white; border-color: var(--ai-primary); }

.ai-chat-input { padding: 16px 20px; background: var(--ai-dark); border-top: 1px solid var(--ai-border); display: flex; gap: 12px; align-items: flex-end; }
.ai-input-wrapper { flex: 1; }
.ai-input-wrapper textarea { width: 100%; min-height: 44px; max-height: 120px; padding: 12px 16px; background: var(--ai-darker); border: 1px solid var(--ai-border); border-radius: 22px; color: white; font-size: 14px; resize: none; outline: none; }
.ai-input-wrapper textarea::placeholder { color: var(--ai-gray); }
.ai-input-wrapper textarea:focus { border-color: var(--ai-primary); }

.ai-send-btn { width: 44px; height: 44px; border-radius: 50%; background: var(--ai-gradient); border: none; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: all 0.2s ease; flex-shrink: 0; }
.ai-send-btn:hover { transform: scale(1.05); }
.ai-send-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.ai-send-btn svg { width: 20px; height: 20px; color: white; }

.ai-welcome-screen { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 30px; text-align: center; background: var(--ai-darker); }
.ai-welcome-screen .welcome-icon { width: 80px; height: 80px; background: var(--ai-gradient); border-radius: 50%; display: flex; align-items: center; justify-content: center; margin-bottom: 20px; animation: ai-float 3s ease-in-out infinite; }
.ai-welcome-screen .welcome-icon img { width: 40px; height: 40px; filter: brightness(0) invert(1); }
.ai-welcome-screen h3 { color: white; font-size: 22px; font-weight: 700; margin: 0 0 10px 0; }
.ai-welcome-screen p { color: var(--ai-gray); font-size: 14px; margin: 0 0 25px 0; }

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

.ai-welcome-options { display: flex; flex-direction: column; gap: 10px; width: 100%; }
.ai-welcome-option { display: flex; align-items: center; gap: 12px; padding: 14px 18px; background: var(--ai-dark); border: 1px solid var(--ai-border); border-radius: 12px; cursor: pointer; transition: all 0.2s ease; text-align: left; }
.ai-welcome-option:hover { border-color: var(--ai-primary); background: rgba(230, 57, 70, 0.1); }
.ai-welcome-option .option-icon { width: 40px; height: 40px; background: rgba(230, 57, 70, 0.15); border-radius: 10px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.ai-welcome-option .option-icon svg { width: 20px; height: 20px; color: var(--ai-primary); }
.ai-welcome-option .option-text strong { display: block; color: white; font-size: 14px; margin-bottom: 2px; }
.ai-welcome-option .option-text span { color: var(--ai-gray); font-size: 12px; }

@media (max-width: 480px) {
    .ai-assistant-window { width: calc(100% - 20px); height: calc(100% - 140px); right: 10px; bottom: 100px; border-radius: 16px; }
    .ai-assistant-toggle { right: 20px; bottom: 20px; width: 60px; height: 60px; }
}

@media print { .ai-assistant-toggle, .ai-assistant-window { display: none !important; } }
