/* SABITOU CHATBOT - CSS PREMIMUM */

#sabitou-chatbot-widget {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 380px;
    height: 600px;
    max-height: calc(100vh - 4rem);
    background: rgba(20, 20, 20, 0.9);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 1.5rem;
    display: flex;
    flex-direction: column;
    z-index: 10000;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    transform: translateY(120%) scale(0.9);
    opacity: 0;
    transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    pointer-events: none;
    overflow: hidden;
}

#sabitou-chatbot-widget.active {
    transform: translateY(0) scale(1);
    opacity: 1;
    pointer-events: all;
}

/* Header */
.chatbot-header {
    padding: 1.5rem;
    background: linear-gradient(90deg, var(--green), var(--green-dark));
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chatbot-profile {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.chatbot-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid var(--yellow);
    object-fit: cover;
}

.chatbot-info h4 {
    font-size: 1rem;
    margin: 0;
    color: white;
}

.chatbot-status {
    font-size: 0.75rem;
    opacity: 0.8;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.status-dot {
    width: 8px;
    height: 8px;
    background: #4ade80;
    border-radius: 50%;
}

#chatbot-close {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s;
}

#chatbot-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Messages Area */
#chatbot-messages {
    flex: 1;
    padding: 1.5rem;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    scrollbar-width: thin;
    scrollbar-color: var(--green) transparent;
}

#chatbot-messages::-webkit-scrollbar { width: 4px; }
#chatbot-messages::-webkit-scrollbar-thumb { background: var(--green); border-radius: 10px; }

.chat-msg-wrapper {
    display: flex;
    width: 100%;
    animation: slideInUp 0.4s ease-out forwards;
}

.chat-msg-wrapper.ai { justify-content: flex-start; }
.chat-msg-wrapper.user { justify-content: flex-end; }

.chat-bubble {
    padding: 0.8rem 1rem;
    border-radius: 1rem;
    font-size: 0.95rem;
    line-height: 1.5;
    max-width: 85%;
}

.chat-msg-wrapper.ai .chat-bubble {
    background: rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.9);
    border-bottom-left-radius: 0.2rem;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.chat-msg-wrapper.user .chat-bubble {
    background: var(--green);
    color: white;
    border-bottom-right-radius: 0.2rem;
}

/* Options / Buttons */
#chatbot-options {
    padding: 1rem 1.5rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    background: rgba(0, 0, 0, 0.2);
}

.chat-option-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--yellow);
    padding: 0.5rem 0.75rem;
    border-radius: 2rem;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s;
}

.chat-option-btn:hover {
    background: var(--yellow);
    color: var(--dark);
    transform: translateY(-2px);
}

/* Typing Indicator */
.typing span {
    width: 6px;
    height: 6px;
    background: var(--yellow);
    border-radius: 50%;
    display: inline-block;
    margin: 0 2px;
    animation: bounce 1.4s infinite ease-in-out both;
}

.typing span:nth-child(1) { animation-delay: -0.32s; }
.typing span:nth-child(2) { animation-delay: -0.16s; }

@keyframes bounce {
    0%, 80%, 100% { transform: scale(0); }
    40% { transform: scale(1.0); }
}

@keyframes slideInUp {
    from { transform: translateY(10px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.chat-link {
    color: var(--yellow);
    text-decoration: underline;
}

/* Mobile adjustments */
@media (max-width: 480px) {
    #sabitou-chatbot-widget {
        right: 1rem;
        left: 1rem;
        bottom: 1rem;
        width: auto;
        height: 80vh;
    }
}
