﻿/* ==== ESTILO GLOBAL ==== */
body {
    background-color: #f3f4f6;
    margin: 0;
    padding: 20px;
    font-family: Arial, sans-serif;
}

/* ==== CONTAINER DO CHAT ==== */
.chatbot-container {
    position: fixed;
    top: 2em;
    left: 0;
    right: 0;
    margin: 0 auto;
    width: 100%;
    max-width: 400px;
    height: 50%;
    background: white;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.2);
    border-radius: 0 0 10px 10px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transform: translateY(100%);
    transition: transform 0.4s ease, opacity 0.4s ease;
}

/* iOS corrige foco */
.chatbot-ios-focused {
    top: 8em;
}

/* Estados do container */
.chatbot-container.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.chatbot-container.hiding {
    opacity: 0;
    transform: translateY(100%);
}

/* ==== CAIXA DO CHAT ==== */
.chatbot-box {
    background-color: #ffffff;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    border-radius: 10px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* ==== HEADER ==== */
/*.chatbot-header {
    padding: 15px;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #f9fafb;
}*/

.chatbot-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start; /* garante que o botão fique no topo */
    background-color: #f9fafb;
    padding: 15px;
    border-bottom: 1px solid #e0e0e0;
}

.chatbot-header-text {
    display: flex;
    flex-direction: column;
}

.chatbot-subtitle {
    font-size: 0.75rem;
    color: #666;
    margin-top: 4px;
    margin-bottom: 0;
}


.chatbot-title {
    font-size: 18px;
    font-weight: bold;
    color: #1f2937;
}

.chatbot-status {
    background-color: #10b981;
    color: white;
    font-size: 12px;
    padding: 3px 8px;
    border-radius: 12px;
}

/* ==== ÁREA DE MENSAGENS ==== */
.chatbot-messages {
    flex: 1;
    padding: 10px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
    background-color: #fafafa;
}

.chat-message {
    max-width: 70%;
    padding: 8px 12px;
    border-radius: 10px;
    font-size: 14px;
    color: white;
}

    .chat-message.sent {
        background-color: #3a0ca3;
        align-self: flex-end;
    }

    .chat-message.received {
        background-color: #6b7280;
        align-self: flex-start;
    }

    .chat-message.loading {
        font-style: italic;
        opacity: 0.6;
    }

/* ==== ÁREA DE INPUT ==== */
.chatbot-input-area {
    display: flex;
    gap: 8px;
    padding: 10px;
    border-top: 1px solid #e0e0e0;
    background-color: #f9fafb;
}

.chatbot-input {
    flex: 1;
    padding: 8px;
    font-size: 14px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    outline: none;
    background-color: white;
    color: black;
    transition: background-color 0.2s ease-in-out, color 0.2s ease-in-out;
}

    /* Estado de gravando no input */
    .chatbot-input.input-gravando {
        background-color: rgba(0, 123, 255, 0.1);
        color: #007bff;
    }

    /* Estado de cancelando no input */
    .chatbot-input.input-cancelando {
        background-color: rgba(255, 0, 0, 0.1);
        color: red;
        font-style: italic;
    }

/* ==== BOTÕES ==== */
.chatbot-send-button {
    background-color: #3a0ca3;
    color: white;
    border: none;
    padding: 8px 14px;
    border-radius: 8px;
    font-weight: bold;
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.2s ease-in-out;
}

    .chatbot-send-button:hover {
        background-color: #2563eb;
    }

#voiceButton {
    background-color: #3a0ca3;
    color: white;
    border: none;
    padding: 8px 14px;
    border-radius: 8px;
    font-weight: bold;
    font-size: 18px;
    cursor: pointer;
    transition: background-color 0.2s ease-in-out, transform 0.1s ease-in-out;
}

    /* Estado gravando no botão */
    #voiceButton.gravando {
        background-color: #2563eb;
        animation: pulsar 1s infinite;
    }

    /* Estado cancelando no botão */
    #voiceButton.cancelando {
        background-color: #ef4444;
        animation: none;
    }

/* Animação de pulsar */
@keyframes pulsar {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.1);
    }

    100% {
        transform: scale(1);
    }
}

/* ==== BOTÃO DE FECHAR ==== */
.close-btn-chatguide {
    position: absolute;
    right: 7px;
    top: 4px;
    background-color: #aaa3a3;
    border: none;
    border-radius: 50%;
    width: 26px;
    height: 26px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    transition: background-color 0.4s ease;
}

    .close-btn-chatguide:hover {
        background-color: #888383;
    }

    .close-btn-chatguide i {
        color: white;
        font-size: 15px;
    }



.play-audio-button {
    position: absolute;
    top: 50%;
    left: -50px;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    background-color: #3a0ca3;
    border: none;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    visibility: hidden;
    z-index: 2001;
}

    .play-audio-button i {
        font-size: 18px;
        color: white;
    }


.pause-audio-button {
    position: absolute;
    top: 50%;
    left: -50px;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    background-color: #3a0ca3;
    border: none;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    visibility: hidden;
    z-index: 2001;
}

    .pause-audio-button i {
        font-size: 18px;
        color: white;
    }

    .play-audio-button.hidden,
    .pause-audio-button.hidden {
        visibility: hidden;
    }

    .play-audio-button.visible,
    .pause-audio-button.visible {
        visibility: visible;
    }





