/* Chat Bot - Design Moderno e Funcional */

/* Botão flutuante horizontal - foto pequena */
.chat-toggle {
    position: fixed;
    bottom: 30px;
    right: 30px;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px 25px;
    background: linear-gradient(135deg, #00d4ff, #0099cc);
    color: white;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 600;
    box-shadow: 0 8px 25px rgba(0, 212, 255, 0.4);
    transition: all 0.3s ease;
    z-index: 1000;
    backdrop-filter: blur(10px);
}

.chat-toggle:hover {
    background: linear-gradient(135deg, #0099cc, #007acc);
    transform: translateY(-3px);
    box-shadow: 0 12px 35px rgba(0, 212, 255, 0.5);
}

.chat-toggle img {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid white;
    flex-shrink: 0;
}

/* Janela do chat - design elegante */
.chat-bot {
    position: fixed;
    bottom: 95px;
    right: 30px;
    width: 400px;
    height: 550px;
    background: rgba(15, 20, 25, 0.85);
    border: 1px solid rgba(0, 212, 255, 0.4);
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6);
    transform: translateY(20px);
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    z-index: 999;
    display: flex;
    flex-direction: column;
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
}

.chat-bot.active {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
}

/* Garantir que nenhuma imagem interfira na janela do chat */
.chat-bot img {
    display: none !important;
}

.chat-bot .message img {
    display: block !important;
    max-width: 100px;
    height: auto;
    border-radius: 8px;
}

/* Header bonito */
.chat-header {
    background: linear-gradient(135deg, #00d4ff, #0099cc);
    color: white;
    padding: 20px 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-radius: 20px 20px 0 0;
    box-shadow: 0 2px 10px rgba(0, 212, 255, 0.3);
}

.chat-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.close-chat {
    background: rgba(255, 255, 255, 0.25);
    border: none;
    color: white;
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.3);
    line-height: 1;
}

.close-chat:hover {
    background: rgba(255, 255, 255, 0.4);
    transform: scale(1.1);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
}

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

/* Área de mensagens bem estilizada */
.chat-messages {
    flex: 1;
    padding: 25px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 18px;
    background: linear-gradient(180deg, rgba(15, 20, 25, 0.6) 0%, rgba(15, 20, 25, 0.8) 100%);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

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

.chat-messages::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}

.chat-messages::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #00d4ff, #0099cc);
    border-radius: 3px;
}

/* Mensagens estilizadas */
.message {
    max-width: 75%;
    animation: slideIn 0.4s ease-out;
}

.message.user-message {
    align-self: flex-end;
}

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

.message-content {
    padding: 16px 20px;
    border-radius: 20px;
    font-size: 15px;
    line-height: 1.5;
    word-wrap: break-word;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.user-message .message-content {
    background: linear-gradient(135deg, #00d4ff, #0099cc);
    color: white;
    border-bottom-right-radius: 5px;
}

.bot-message .message-content {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-bottom-left-radius: 5px;
}

/* Indicador de digitação elegante */
.typing-indicator {
    display: flex;
    gap: 6px;
    padding: 15px 0;
    align-items: center;
}

.typing-dot {
    width: 10px;
    height: 10px;
    background: linear-gradient(135deg, #00d4ff, #0099cc);
    border-radius: 50%;
    animation: typing 1.6s infinite ease-in-out;
}

.typing-dot:nth-child(1) {
    animation-delay: 0s;
}

.typing-dot:nth-child(2) {
    animation-delay: 0.3s;
}

.typing-dot:nth-child(3) {
    animation-delay: 0.6s;
}

@keyframes typing {

    0%,
    80%,
    100% {
        transform: scale(0.8);
        opacity: 0.5;
    }

    40% {
        transform: scale(1.2);
        opacity: 1;
    }
}

/* Input área super estilizada */
.chat-input-container {
    padding: 20px 25px;
    border-top: 1px solid rgba(0, 212, 255, 0.3);
    display: flex;
    gap: 15px;
    align-items: center;
    background: rgba(15, 20, 25, 0.7);
    border-radius: 0 0 20px 20px;
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
}

#chatInput {
    flex: 1;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(0, 212, 255, 0.3);
    border-radius: 25px;
    padding: 15px 20px;
    color: white;
    font-size: 15px;
    outline: none;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

#chatInput:focus {
    border-color: #00d4ff;
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.2);
}

#chatInput::placeholder {
    color: rgba(255, 255, 255, 0.6);
    font-style: italic;
}

/* Botão de envio super estilizado */
#sendChatBtn {
    background: linear-gradient(135deg, #00d4ff, #0099cc);
    border: none;
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    font-size: 18px;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(0, 212, 255, 0.4);
    position: relative;
}

#sendChatBtn::before {
    content: '→';
    font-size: 20px;
    font-weight: bold;
    transform: rotate(-45deg);
}

#sendChatBtn:hover {
    background: linear-gradient(135deg, #0099cc, #007acc);
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(0, 212, 255, 0.5);
}

#sendChatBtn:active {
    transform: scale(0.95);
}

#sendChatBtn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* Animações */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsivo */
@media (max-width: 768px) {
    .chat-bot {
        width: 90vw;
        height: 70vh;
        right: 5vw;
        bottom: 85px;
    }

    .chat-toggle {
        right: 20px;
        bottom: 20px;
        padding: 12px 20px;
        font-size: 14px;
    }

    .chat-toggle img {
        width: 16px;
        height: 16px;
    }
}

@media (max-width: 480px) {
    .chat-bot {
        width: 95vw;
        height: 80vh;
        right: 2.5vw;
        bottom: 75px;
    }

    .chat-toggle {
        right: 15px;
        bottom: 15px;
        padding: 10px 18px;
        font-size: 13px;
    }

    .chat-toggle img {
        width: 14px;
        height: 14px;
    }
}