/* ═════════════════════════════════════════════════════════════════
   İŞLETMEM DİJİTAL - AI ASISTAN STYLES
   ═════════════════════════════════════════════════════════════════ */

/* Yüzen Buton */
.ai-assistant-btn {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    border: none;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    transition: all 0.3s ease;
    z-index: 9998;
    animation: pulse-ai 2s infinite;
}

.ai-assistant-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.6);
}

.ai-assistant-btn.active {
    transform: scale(0.9);
}

@keyframes pulse-ai {
    0%, 100% {
        box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
    }
    50% {
        box-shadow: 0 4px 20px rgba(16, 185, 129, 0.7);
    }
}

/* AI Asistan Penceresi */
.ai-assistant-window {
    position: fixed;
    bottom: 100px;
    right: 24px;
    width: 380px;
    max-width: calc(100vw - 48px);
    height: 600px;
    max-height: calc(100vh - 140px);
    background: white;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    z-index: 9999;
    animation: slideUp 0.3s ease-out;
    overflow: hidden;
}

.ai-assistant-window.hidden {
    display: none;
}

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

/* Header */
.ai-assistant-header {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    padding: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-radius: 20px 20px 0 0;
}

.ai-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: white;
}

/* Chat Messages */
.ai-chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    background: #f9fafb;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.ai-chat-messages::-webkit-scrollbar {
    width: 6px;
}

.ai-chat-messages::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.ai-chat-messages::-webkit-scrollbar-thumb {
    background: #10b981;
    border-radius: 3px;
}

/* Message */
.ai-message {
    display: flex;
    gap: 8px;
    animation: fadeIn 0.3s ease-out;
}

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

.ai-message-bot {
    align-self: flex-start;
}

.ai-message-user {
    align-self: flex-end;
    flex-direction: row-reverse;
}

.ai-message-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 16px;
    flex-shrink: 0;
}

.ai-message-content {
    min-width: 100px;
    max-width: 85%;
    padding: 12px 16px;
    border-radius: 16px;
    font-size: 14px;
    line-height: 1.5;
    word-break: keep-all;
    overflow-wrap: normal;
    white-space: normal;
}

.ai-message-bot .ai-message-content {
    background: white;
    color: #1f2937;
    border-bottom-left-radius: 4px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.ai-message-user .ai-message-content {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    border-bottom-right-radius: 4px;
}

/* Typing Indicator */
.ai-typing-indicator {
    display: flex;
    gap: 4px;
    padding: 12px 16px;
    background: white;
    border-radius: 16px;
    border-bottom-left-radius: 4px;
}

.ai-typing-indicator span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #10b981;
    animation: typing 1.4s infinite;
}

.ai-typing-indicator span:nth-child(2) {
    animation-delay: 0.2s;
}

.ai-typing-indicator span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typing {
    0%, 60%, 100% {
        transform: translateY(0);
        opacity: 0.7;
    }
    30% {
        transform: translateY(-10px);
        opacity: 1;
    }
}

/* Redirect Suggestion */
.ai-redirect-suggestion {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px;
    background: #ecfdf5;
    border: 1px solid #10b981;
    border-radius: 12px;
    font-size: 13px;
    color: #059669;
    animation: fadeIn 0.3s ease-out;
}

.ai-redirect-btn {
    margin-left: auto;
    padding: 6px 12px;
    background: #10b981;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.ai-redirect-btn:hover {
    background: #059669;
    transform: scale(1.05);
}

/* Chat Input */
.ai-chat-input-wrapper {
    display: flex;
    gap: 8px;
    padding: 12px;
    background: white;
    border-top: 1px solid #e5e7eb;
}

#aiChatInput {
    flex: 1;
    padding: 10px 12px;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    font-size: 14px;
    font-family: inherit;
    resize: none;
    outline: none;
    transition: border-color 0.2s;
    max-height: 100px;
}

#aiChatInput:focus {
    border-color: #10b981;
}

.ai-send-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    flex-shrink: 0;
}

.ai-send-btn:hover {
    transform: scale(1.1);
}

.ai-send-btn:active {
    transform: scale(0.95);
}

/* Powered By */
.ai-powered-by {
    padding: 8px;
    text-align: center;
    font-size: 11px;
    color: #9ca3af;
    background: #f9fafb;
    border-top: 1px solid #e5e7eb;
}

.ai-powered-by strong {
    color: #10b981;
}

/* Mobile Responsive */
@media (max-width: 640px) {
    .ai-assistant-btn {
        width: 56px;
        height: 56px;
        bottom: 20px;
        right: 20px;
        font-size: 22px;
    }

    .ai-assistant-window {
        bottom: 85px;
        right: 10px;
        left: 10px;
        width: auto;
        max-width: none;
        height: 500px;
        max-height: 60vh;
    }

    .ai-message-content {
        max-width: 85%;
        font-size: 13px;
    }
}
