.chat-widget {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
    font-family: 'Poppins', sans-serif;
}

.chat-button {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: white;
    color: white;
    border: none;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease;
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
    padding: 0;
    overflow: hidden;
}

.chat-button img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 5px;
}

.chat-button:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

.chat-container {
    position: fixed;
    bottom: 90px;
    right: 20px;
    width: 350px;
    height: 500px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    display: none;
    flex-direction: column;
    overflow: visible;
}

.chat-container.active {
    display: flex;
}

.chat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    background-color: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
}

.chat-icon {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    margin-right: 8px;
    vertical-align: middle;
}

.chat-header span {
    display: flex;
    align-items: center;
    font-weight: bold;
    color: #333;
}

.chat-controls {
    display: flex;
    gap: 8px;
    align-items: center;
}

.chat-controls button {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.2em;
    padding: 4px;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.chat-controls button:hover {
    background-color: rgba(0, 0, 0, 0.1);
}

.human-transfer {
    color: #dc3545 !important;
    transition: all 0.3s ease;
}

.human-transfer:hover {
    background-color: rgba(220, 53, 69, 0.1) !important;
    transform: scale(1.1);
}

.reset-personality {
    color: #666;
}

.reset-personality:hover {
    color: #333;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 10px;
    background-color: #f8f9fa;
}

.message {
    margin-bottom: 10px;
    padding: 8px 12px;
    border-radius: 15px;
    max-width: 80%;
    word-wrap: break-word;
    line-height: 1.4;
    font-size: 15px;
}

.message.user {
    background-color: #007bff;
    color: white;
    margin-left: auto;
    border-bottom-right-radius: 5px;
}

.message.bot {
    background-color: white;
    color: #333;
    border: 1px solid #dee2e6;
    margin-right: auto;
    border-bottom-left-radius: 5px;
}

.message a {
    color: inherit;
    text-decoration: underline;
}

.message.user a {
    color: #fff;
}

.chat-input {
    display: flex;
    align-items: center;
    padding: 10px;
    background-color: white;
    border-top: 1px solid #dee2e6;
    position: relative;
    overflow: visible;
}

.chat-input input {
    flex: 1;
    border: 1px solid #dee2e6;
    border-radius: 20px;
    padding: 8px 12px;
    margin-right: 8px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.3s;
}

.chat-input input:focus {
    border-color: #007bff;
}

.chat-input button {
    background: #007bff;
    color: white;
    border: none;
    border-radius: 20px;
    padding: 8px 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    font-size: 14px;
    font-weight: 500;
    min-width: 80px;
    height: 35px;
}

.chat-input button:hover {
    background: #0056b3;
    transform: translateY(-1px);
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.chat-input button:active {
    transform: translateY(0);
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

/* Estilo específico para o botão de enviar */
.send-button {
    background: #007bff !important;
    color: white !important;
    border: none !important;
    border-radius: 20px !important;
    padding: 8px 16px !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: all 0.3s ease !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    min-width: 80px !important;
    height: 35px !important;
}

.send-button:hover {
    background: #0056b3 !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2) !important;
}

.send-button:active {
    transform: translateY(0) !important;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2) !important;
}

.emoji-button {
    background: #fff !important;
    color: #007bff !important;
    border: 2px solid #007bff !important;
    border-radius: 50% !important;
    width: 35px !important;
    height: 35px !important;
    padding: 0 !important;
    min-width: 35px !important;
    font-size: 20px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: all 0.2s !important;
    margin-right: 8px;
}

.emoji-button:hover, .emoji-button:focus {
    background: #007bff !important;
    color: #fff !important;
    border-color: #0056b3 !important;
    box-shadow: 0 2px 8px rgba(0,123,255,0.15) !important;
    transform: scale(1.1) !important;
    outline: none !important;
}

.emoji-picker {
    position: absolute;
    bottom: 100%;
    left: 10px;
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    display: none;
    z-index: 1001;
    max-width: 320px;
    min-width: 200px;
    min-height: 120px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s;
}

.emoji-picker.active {
    display: block;
    opacity: 1;
    pointer-events: auto;
}

.emoji-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 5px;
}

.emoji-item {
    cursor: pointer;
    padding: 6px;
    border-radius: 4px;
    text-align: center;
    font-size: 24px;
    transition: background-color 0.2s;
}

.emoji-item:hover {
    background-color: #f8f9fa;
}

.typing-indicator {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    background-color: white;
    border: 1px solid #dee2e6;
    border-radius: 15px;
    margin-bottom: 10px;
    margin-right: auto;
    border-bottom-left-radius: 5px;
    max-width: 80%;
}

.typing-dots {
    display: flex;
    gap: 4px;
}

.typing-dots span {
    width: 8px;
    height: 8px;
    background-color: #6c757d;
    border-radius: 50%;
    animation: typing 1.4s infinite ease-in-out;
}

.typing-dots span:nth-child(1) {
    animation-delay: -0.32s;
}

.typing-dots span:nth-child(2) {
    animation-delay: -0.16s;
}

@keyframes typing {
    0%, 80%, 100% {
        transform: scale(0.8);
        opacity: 0.5;
    }
    40% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Estilos para mensagens de sistema */
.message.system {
    background-color: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
    text-align: center;
    font-style: italic;
    margin: 10px auto;
    max-width: 90%;
}

/* Estilos para links de download */
.download-link {
    display: inline-block;
    background-color: #28a745;
    color: white;
    padding: 8px 16px;
    border-radius: 4px;
    text-decoration: none;
    margin: 4px 0;
    transition: all 0.3s ease;
    font-weight: 500;
    cursor: pointer;
}

.download-link:hover {
    background-color: #218838;
    transform: translateY(-1px);
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

/* Responsividade */
@media (max-width: 480px) {
    .chat-container {
        width: calc(100vw - 40px);
        right: 20px;
        left: 20px;
    }
    
    .emoji-picker {
        max-width: calc(100vw - 60px);
    }
    
    .emoji-grid {
        grid-template-columns: repeat(6, 1fr);
    }
    
    .emoji-item {
        font-size: 22px;
    }
}

/* Emojis dentro das mensagens maiores que o texto */
.message .emoji {
    font-size: 22px;
    line-height: 1;
} 