/* Floating Chat Widget Stilləri */

/* Floating Button Animasiyası */
#chat-toggle-btn {
    animation: floatButton 3s ease-in-out infinite;
    box-shadow: 0 8px 24px rgba(99, 102, 241, 0.4);
}

#chat-toggle-btn:hover {
    animation: none;
    transform: scale(1.1);
}

@keyframes floatButton {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-8px);
    }
}

/* Chat Panel Animasiyası */
#chat-panel {
    animation: slideUp 0.3s ease-out;
    backdrop-filter: blur(10px);
}

#chat-panel.hidden {
    animation: slideDown 0.3s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes slideDown {
    from {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
    to {
        opacity: 0;
        transform: translateY(20px) scale(0.95);
    }
}

/* Mesajlar animasiyası */
#floating-chat-messages > div {
    animation: fadeInMessage 0.3s ease-out;
}

@keyframes fadeInMessage {
    from {
        opacity: 0;
        transform: translateY(5px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Scrollbar üslubu */
#floating-chat-messages::-webkit-scrollbar {
    width: 4px;
}

#floating-chat-messages::-webkit-scrollbar-track {
    background: transparent;
}

#floating-chat-messages::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 2px;
}

#floating-chat-messages::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Template düymələri hover effekti */
#chat-panel button[onclick*="sendQuickTemplate"] {
    transition: all 0.2s ease-in-out;
}

#chat-panel button[onclick*="sendQuickTemplate"]:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Input focus effekti */
#floating-chat-input:focus {
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

/* Bot avatarı pulse animasiyası */
#chat-panel .relative .absolute {
    animation: botPulse 2s ease-in-out infinite;
}

@keyframes botPulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

/* Header gradient animasiyası */
#chat-panel .bg-gradient-to-r {
    background-size: 200% 200%;
    animation: gradientShift 5s ease infinite;
}

@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

/* Mesaj balonları hover effekti */
#floating-chat-messages .bg-indigo-600,
#floating-chat-messages .bg-slate-100 {
    transition: all 0.2s ease-in-out;
}

/* Close button hover */
#chat-panel button[onclick="toggleFloatingChat()"]:hover {
    transform: rotate(90deg);
    transition: transform 0.3s ease;
}

/* Responsive dizayn */
@media (max-width: 640px) {
    #chat-panel {
        width: calc(100vw - 24px) !important;
        right: 12px !important;
        bottom: 80px !important;
        height: calc(100vh - 140px) !important;
    }
    
    #chat-toggle-btn {
        bottom: 16px !important;
        right: 16px !important;
        width: 56px !important;
        height: 56px !important;
    }
}

/* Loading state */
.typing-indicator {
    display: flex;
    gap: 4px;
    padding: 8px 12px;
}

.typing-indicator span {
    width: 6px;
    height: 6px;
    background: #94a3b8;
    border-radius: 50%;
    animation: typingDot 1.4s ease-in-out infinite;
}

.typing-indicator span:nth-child(2) {
    animation-delay: 0.2s;
}

.typing-indicator span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typingDot {
    0%, 60%, 100% {
        transform: translateY(0);
    }
    30% {
        transform: translateY(-8px);
    }
}

/* Chat Notification Toast */
#chat-notification {
    animation: slideDownNotification 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

#chat-notification.opacity-100 {
    animation: slideUpNotification 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes slideUpNotification {
    from {
        opacity: 0;
        transform: translateY(10px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes slideDownNotification {
    from {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
    to {
        opacity: 0;
        transform: translateY(10px) scale(0.95);
    }
}

/* Notification hover effekti */
#chat-notification:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.15) !important;
}
