.floki-chat-widget {
    position: fixed;
    bottom: 110px;
    right: 30px;
    z-index: 9998;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.chat-bubble {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #7F17D3 0%, #5c0f9d 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(127, 23, 211, 0.4);
    transition: all 0.3s ease;
    position: relative;
}

.chat-bubble:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 30px rgba(127, 23, 211, 0.6);
}

.chat-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    width: 24px;
    height: 24px;
    background: #ef4444;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    color: white;
    border: 2px solid white;
}

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

.chat-window {
    position: absolute;
    bottom: 80px;
    right: 0;
    width: 380px;
    height: 550px;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    opacity: 0;
    transform: scale(0.8) translateY(20px);
    pointer-events: none;
    transition: all 0.3s ease;
}

.floki-chat-widget.open .chat-window {
    opacity: 1;
    transform: scale(1) translateY(0);
    pointer-events: all;
}

.floki-chat-widget.open .chat-bubble {
    transform: scale(0.9);
}

.chat-header {
    background: linear-gradient(135deg, #7F17D3 0%, #5c0f9d 100%);
    padding: 1.25rem;
    border-radius: 16px 16px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: white;
}

.chat-header-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.chat-avatar {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
}

.chat-title {
    font-weight: 700;
    font-size: 1rem;
    margin-bottom: 0.25rem;
}

.chat-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
    opacity: 0.9;
}

.status-dot {
    width: 8px;
    height: 8px;
    background: #10b981;
    border-radius: 50%;
    animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.chat-close-btn {
    background: transparent;
    border: none;
    color: white;
    cursor: pointer;
    padding: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: background 0.2s ease;
}

.chat-close-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

.chat-messages {
    flex: 1;
    padding: 1.25rem;
    overflow-y: auto;
    background: #f5f5f5;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

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

.chat-messages::-webkit-scrollbar-track {
    background: transparent;
}

.chat-messages::-webkit-scrollbar-thumb {
    background: rgba(127, 23, 211, 0.3);
    border-radius: 3px;
}

.message {
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
}

.user-message {
    flex-direction: row-reverse;
}

.message-avatar {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, #7F17D3 0%, #5c0f9d 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 0.75rem;
    flex-shrink: 0;
}

.message-content {
    max-width: 75%;
}

.message-content p {
    background: white;
    padding: 0.75rem 1rem;
    border-radius: 12px;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    line-height: 1.5;
    color: #1a1a1a;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.user-message .message-content p {
    background: linear-gradient(135deg, #7F17D3 0%, #5c0f9d 100%);
    color: white;
}

.quick-replies {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

.quick-reply-btn {
    background: #7F17D3;
    color: white;
    border: none;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: left;
}

.quick-reply-btn:hover {
    background: #5c0f9d;
    transform: translateX(5px);
}

.chat-input-area {
    padding: 1rem;
    background: white;
    border-top: 1px solid #e5e5e5;
    display: flex;
    gap: 0.75rem;
    border-radius: 0 0 16px 16px;
}

.chat-input {
    flex: 1;
    padding: 0.75rem 1rem;
    border: 1px solid #e5e5e5;
    border-radius: 24px;
    font-size: 0.9rem;
    outline: none;
    transition: border-color 0.2s ease;
}

.chat-input:focus {
    border-color: #7F17D3;
}

.chat-send-btn {
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, #7F17D3 0%, #5c0f9d 100%);
    border: none;
    border-radius: 50%;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

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

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

.chat-form {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    background: white;
    padding: 1rem;
    border-radius: 12px;
}

.chat-form-input {
    padding: 0.75rem;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    font-size: 0.9rem;
    outline: none;
    transition: border-color 0.2s ease;
}

.chat-form-input:focus {
    border-color: #7F17D3;
}

.chat-form-submit {
    background: #7F17D3;
    color: white;
    border: none;
    padding: 0.75rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease;
}

.chat-form-submit:hover {
    background: #5c0f9d;
}

.chat-whatsapp-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background: #25D366;
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.chat-whatsapp-btn:hover {
    background: #128C7E;
    transform: translateY(-2px);
}

.chat-link-btn {
    display: block;
    background: #7F17D3;
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    text-align: center;
    transition: all 0.2s ease;
}

.chat-link-btn:hover {
    background: #5c0f9d;
}

@media (max-width: 768px) {
    .floki-chat-widget {
        bottom: 130px;
        right: 20px;
    }
    
    .chat-window {
        width: calc(100vw - 40px);
        height: 500px;
        right: -10px;
    }
    
    .chat-bubble {
        width: 55px;
        height: 55px;
    }
}
