/* Chat Widget */
.chat-button {
    position: fixed;
    bottom: 80px;
    right: 20px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: #8a2be2;
    color: white;
    border: none;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
    cursor: pointer;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.chat-button:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
    background-color: #7b1fa2;
}

.chat-button i {
    font-size: 24px;
}

.chat-widget {
    position: fixed;
    bottom: 150px;
    right: 20px;
    width: 350px;
    height: 500px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.2);
    display: none;
    flex-direction: column;
    z-index: 1000;
    overflow: hidden;
    transition: all 0.3s ease;
}

.chat-widget.active {
    display: flex;
}

.chat-header {
    background: #8a2be2;
    color: white;
    padding: 15px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.chat-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
}

.chat-title i {
    font-size: 20px;
}

.chat-close {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    font-size: 20px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.chat-body {
    flex: 1;
    padding: 15px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.chat-message {
    max-width: 80%;
    padding: 10px 15px;
    border-radius: 12px;
    margin-bottom: 5px;
    line-height: 1.4;
    color: #000;
}

.chat-message.bot {
    background: #f0f2f5;
    align-self: flex-start;
    border-bottom-left-radius: 4px;
    color: #000 !important;
}

.chat-message.bot .message-content {
    color: #000 !important;
}

.chat-message.user {
    background: #8a2be2;
    color: white;
    align-self: flex-end;
    border-bottom-right-radius: 4px;
}

.message-content {
    word-wrap: break-word;
}

.chat-input {
    padding: 15px;
    border-top: 1px solid #eee;
    display: flex;
    gap: 10px;
    background: white;
}

.chat-input input {
    flex: 1;
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 20px;
    outline: none;
    font-size: 14px;
}

.chat-input input:focus {
    border-color: #8a2be2;
}

.chat-input button {
    background: #8a2be2;
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.chat-input button:hover {
    transform: scale(1.1);
    background: #7b1fa2;
}

/* Botão do WhatsApp */
.btn-success {
    background-color: #25D366;
    border-color: #25D366;
    color: white;
    padding: 10px 20px;
    border-radius: 20px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-success:hover {
    background-color: #128C7E;
    border-color: #128C7E;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.2);
}

/* Responsividade */
@media (max-width: 576px) {
    .chat-widget {
        width: calc(100% - 40px);
        height: calc(100% - 100px);
        bottom: 140px;
    }

    .chat-button {
        width: 50px;
        height: 50px;
        bottom: 70px;
    }

    .chat-button i {
        font-size: 20px;
    }
}

/* Scrollbar personalizada */
.chat-body::-webkit-scrollbar {
    width: 6px;
}

.chat-body::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.chat-body::-webkit-scrollbar-thumb {
    background: #8a2be2;
    border-radius: 3px;
}

.chat-body::-webkit-scrollbar-thumb:hover {
    background: #7b1fa2;
}

/* Indicador de digitação */
.typing-indicator {
    background: #fff;
    padding: 10px 15px;
    border-radius: 15px;
    margin-bottom: 10px;
    width: fit-content;
    border: 1px solid #e0e0e0;
}

.typing-indicator .message-content {
    display: flex;
    gap: 5px;
}

.typing-indicator span {
    width: 8px;
    height: 8px;
    background: #8a2be2;
    border-radius: 50%;
    display: inline-block;
    animation: typing 1s infinite;
}

.typing-indicator span:nth-child(2) {
    animation-delay: 0.2s;
}

.typing-indicator span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typing {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-5px);
    }
} 