﻿.bg-logo {
    background-color: #FBECD6 !important;
}

#ddlIdioma {
    width: auto;
    display: inline-block;
}

/* Chatbot - Versão Melhorada */
#chatbot-assistente {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

#chatbot-icone {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: linear-gradient(135deg, #198754, #157347);
    color: white;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    box-shadow: 0 6px 20px rgba(25, 135, 84, 0.4);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 3px solid white;
    position: relative;
    overflow: hidden;
}

    #chatbot-icone:hover {
        transform: scale(1.1) rotate(5deg);
        box-shadow: 0 8px 25px rgba(25, 135, 84, 0.6);
    }

    #chatbot-icone::before {
        content: '';
        position: absolute;
        top: -50%;
        left: -50%;
        width: 200%;
        height: 200%;
        background: linear-gradient(45deg, transparent, rgba(255,255,255,0.1), transparent);
        transform: rotate(45deg);
        transition: all 0.5s ease;
    }

    #chatbot-icone:hover::before {
        animation: shine 1.5s ease;
    }

@keyframes shine {
    0% {
        transform: rotate(45deg) translateX(-100%);
    }

    100% {
        transform: rotate(45deg) translateX(100%);
    }
}

/* Janela do Chatbot Melhorada */
#chatbot-janelinha {
    display: none;
    flex-direction: column;
    width: 380px;
    height: 500px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 12px 40px rgba(0,0,0,0.15);
    overflow: hidden;
    margin-bottom: 15px;
    animation: slideUp 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid #e9ecef;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.95);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

#chatbot-header {
    background: linear-gradient(135deg, #198754, #157347);
    color: white;
    padding: 16px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
    font-size: 1.1rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

#chatbot-fechar {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

    #chatbot-fechar:hover {
        background: rgba(255,255,255,0.2);
        transform: scale(1.1);
    }

/* Área de Mensagens Melhorada */
#chatbot-mensagens {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    display: flex;
    flex-direction: column;
    gap: 16px;
    scrollbar-width: thin;
    scrollbar-color: #c1c1c1 transparent;
}

    #chatbot-mensagens::-webkit-scrollbar {
        width: 6px;
    }

    #chatbot-mensagens::-webkit-scrollbar-track {
        background: transparent;
    }

    #chatbot-mensagens::-webkit-scrollbar-thumb {
        background: #c1c1c1;
        border-radius: 3px;
    }

        #chatbot-mensagens::-webkit-scrollbar-thumb:hover {
            background: #a8a8a8;
        }

/* Mensagens Melhoradas */
.msg-usuario,
.msg-bot {
    display: flex;
    max-width: 85%;
    animation: messageAppear 0.3s ease-out;
}

@keyframes messageAppear {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.msg-usuario {
    justify-content: flex-end;
    align-self: flex-end;
}

.msg-bot {
    justify-content: flex-start;
    align-self: flex-start;
}

    .msg-usuario span,
    .msg-bot span {
        word-wrap: break-word;
        white-space: pre-wrap;
        padding: 12px 16px;
        border-radius: 18px;
        font-size: 14px;
        line-height: 1.5;
        box-shadow: 0 2px 8px rgba(0,0,0,0.1);
        position: relative;
    }

.msg-usuario span {
    background: linear-gradient(135deg, #198754, #157347);
    color: white;
    border-radius: 18px 18px 4px 18px;
    border: 1px solid #146c43;
}

.msg-bot span {
    background: white;
    color: #333;
    border-radius: 18px 18px 18px 4px;
    border: 1px solid #e5e5ea;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}

/* Área de Input Melhorada */
#chatbot-input-container {
    display: flex;
    border-top: 1px solid #e9ecef;
    background: white;
    padding: 16px;
    gap: 12px;
    align-items: center;
}

#chatbot-input {
    flex: 1;
    border: 2px solid #e9ecef;
    padding: 12px 16px;
    border-radius: 25px;
    font-size: 14px;
    outline: none;
    transition: all 0.3s ease;
    background: #f8f9fa;
}

/* Corrige a cor do texto no input do chatbot */
#chatbot-input {
    color: #212529 !important;
}

    #chatbot-input::placeholder {
        color: #6c757d !important;
    }

    #chatbot-input:focus {
        border-color: #198754;
        background: white;
        box-shadow: 0 0 0 3px rgba(25, 135, 84, 0.1);
    }

    #chatbot-input::placeholder {
        color: #6c757d;
    }

#chatbot-enviar {
    background: linear-gradient(135deg, #198754, #157347);
    border: none;
    color: white;
    padding: 12px 20px;
    border-radius: 25px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(25, 135, 84, 0.3);
    display: flex;
    align-items: center;
    gap: 8px;
}

    #chatbot-enviar:hover {
        transform: translateY(-2px);
        box-shadow: 0 6px 16px rgba(25, 135, 84, 0.4);
        background: linear-gradient(135deg, #157347, #146c43);
    }

    #chatbot-enviar:active {
        transform: translateY(0);
    }

/* Indicador de Digitando Melhorado */
.digitando {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background: white;
    border-radius: 18px 18px 18px 4px;
    border: 1px solid #e5e5ea;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
    max-width: fit-content;
}

    .digitando span {
        display: inline-block;
        width: 8px;
        height: 8px;
        background: #198754;
        border-radius: 50%;
        animation: digitar 1.4s infinite ease-in-out both;
    }

        .digitando span:nth-child(1) {
            animation-delay: -0.32s;
        }

        .digitando span:nth-child(2) {
            animation-delay: -0.16s;
        }

        .digitando span:nth-child(3) {
            animation-delay: 0s;
        }

@keyframes digitar {
    0%, 80%, 100% {
        transform: scale(0);
        opacity: 0.5;
    }

    40% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Badge de notificação */
#chatbot-notificacao {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #dc3545;
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.1);
    }

    100% {
        transform: scale(1);
    }
}

/* Estados do Chatbot */
#chatbot-assistente.offline #chatbot-icone {
    background: linear-gradient(135deg, #6c757d, #495057);
    opacity: 0.7;
}

    #chatbot-assistente.offline #chatbot-icone:hover {
        background: linear-gradient(135deg, #495057, #343a40);
    }

/* Responsividade Melhorada */
@media (max-width: 480px) {
    #chatbot-janelinha {
        width: calc(100vw - 40px);
        height: 70vh;
        bottom: 80px;
        right: 20px;
        left: 20px;
        margin: 0 auto;
    }

    #chatbot-icone {
        width: 60px;
        height: 60px;
    }

    #chatbot-mensagens {
        padding: 16px;
        gap: 12px;
    }

    .msg-usuario span,
    .msg-bot span {
        padding: 10px 14px;
        font-size: 13px;
    }
}

@media (max-height: 600px) {
    #chatbot-janelinha {
        height: 60vh;
    }
}

/* Modo escuro (opcional) */
@media (prefers-color-scheme: dark) {
    #chatbot-janelinha {
        background: #2d3748;
        border-color: #4a5568;
    }

    #chatbot-mensagens {
        background: linear-gradient(135deg, #1a202c 0%, #2d3748 100%);
    }

    .msg-bot span {
        background: #4a5568;
        color: #e2e8f0;
        border-color: #718096;
    }

    #chatbot-input {
        background: #4a5568;
        border-color: #718096;
        color: #e2e8f0;
    }

        #chatbot-input:focus {
            border-color: #48bb78;
            box-shadow: 0 0 0 3px rgba(72, 187, 120, 0.1);
        }
}


/* Contêiner do switch de idioma com estilo de badge */
.idioma-badge {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border: 2px solid #198754;
    border-radius: 25px;
    padding: 8px 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

    .idioma-badge:hover {
        background: linear-gradient(135deg, #e9ecef, #d1e7dd);
        border-color: #157347;
        box-shadow: 0 4px 12px rgba(25, 135, 84, 0.2);
        transform: translateY(-1px);
    }

    /* Ajuste para o switch dentro do badge */
    .idioma-badge .switch {
        position: relative;
        display: inline-block;
        width: 48px;
        height: 24px;
    }

        .idioma-badge .switch input {
            opacity: 0;
            width: 0;
            height: 0;
        }

    .idioma-badge .slider {
        position: absolute;
        cursor: pointer;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background-color: #198754;
        transition: .3s;
        border-radius: 12px;
    }

        .idioma-badge .slider:before {
            position: absolute;
            content: "";
            height: 18px;
            width: 18px;
            left: 3px;
            bottom: 3px;
            background-color: white;
            transition: .3s;
            border-radius: 50%;
        }

    .idioma-badge input:checked + .slider {
        background-color: #dc3545;
    }

        .idioma-badge input:checked + .slider:before {
            transform: translateX(24px);
        }

/* Estilos dos badges do usuário e logout */
.user-badge,
.logout-badge {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border: 2px solid #dee2e6;
    border-radius: 25px;
    padding: 8px 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
}

    .user-badge:hover {
        background: linear-gradient(135deg, #e9ecef, #dee2e6);
        border-color: #1976d2;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
        transform: translateY(-1px);
    }

    .logout-badge:hover {
        background: linear-gradient(135deg, #fff5f5, #ffe3e3);
        border-color: #dc3545;
        box-shadow: 0 4px 12px rgba(220, 53, 69, 0.2);
        transform: translateY(-1px);
    }

.user-name {
    font-size: 1.1rem;
    font-weight: 600;
    color: #2c3e50;
    letter-spacing: 0.5px;
}

.logout-text {
    font-size: 1.1rem;
    font-weight: 600;
    color: #dc3545;
    letter-spacing: 0.5px;
}

.user-badge i {
    font-size: 1.3rem;
    color: #1976d2;
}

.logout-badge i {
    font-size: 1.3rem;
    color: #dc3545;
}

.logout-badge a {
    color: inherit;
    text-decoration: none;
    display: flex;
    align-items: center;
}

/* Responsividade */
@@media (max-width: 768px) {
    .user-badge,
    .logout-badge {
        padding: 6px 12px;
    }

    .user-name,
    .logout-text {
        font-size: 1rem;
    }

    .user-badge i,
    .logout-badge i {
        font-size: 1.1rem;
    }
}

@@media (max-width: 576px) {
    .ms-auto.d-flex.align-items-center {
        flex-direction: column;
        gap: 10px;
    }

    .user-badge {
        margin-right: 0 !important;
    }
}
