/* Vidorev Chatbot Styles */
:root {
    --chatbot-primary: #FF0000;
    --chatbot-dark: #1a1a1a;
    --chatbot-darker: #0d0d0d;
    --chatbot-light: #2a2a2a;
    --chatbot-text: #ffffff;
    --chatbot-text-secondary: #b0b0b0;
    --chatbot-border: #333333;
}

/* Container do chatbot */
.vidorev-chatbot-container {
    position: fixed;
    z-index: 9999;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
}

.vidorev-chatbot-container.position-bottom-right {
    bottom: 20px;
    right: 20px;
}

.vidorev-chatbot-container.position-bottom-left {
    bottom: 20px;
    left: 20px;
}

/* Botão flutuante */
.vidorev-chatbot-button {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--chatbot-primary);
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    position: relative;
}

.vidorev-chatbot-button:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 16px rgba(255, 0, 0, 0.5);
}

.vidorev-chatbot-button svg {
    width: 28px;
    height: 28px;
    fill: white;
}

/* Badge de notificação */
.vidorev-chatbot-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #00ff00;
    color: #000;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: bold;
}

/* Janela do chat */
.vidorev-chatbot-window {
    display: none;
    width: 380px;
    height: 550px;
    background: var(--chatbot-dark);
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6);
    flex-direction: column;
    overflow: hidden;
    margin-bottom: 10px;
    animation: slideUp 0.3s ease;
}

.vidorev-chatbot-window.active {
    display: flex;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Cabeçalho */
.vidorev-chatbot-header {
    background: linear-gradient(135deg, var(--chatbot-primary) 0%, #cc0000 100%);
    padding: 20px;
    color: white;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.vidorev-chatbot-header-content {
    display: flex;
    align-items: center;
    gap: 12px;
}

.vidorev-chatbot-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.vidorev-chatbot-title {
    font-size: 16px;
    font-weight: 600;
    margin: 0;
}

.vidorev-chatbot-status {
    font-size: 12px;
    opacity: 0.9;
    margin-top: 2px;
}

.vidorev-chatbot-status-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    background: #00ff00;
    border-radius: 50%;
    margin-right: 5px;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.vidorev-chatbot-close {
    background: transparent;
    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: background 0.2s;
}

.vidorev-chatbot-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Corpo do chat */
.vidorev-chatbot-body {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    background: var(--chatbot-darker);
}

.vidorev-chatbot-body::-webkit-scrollbar {
    width: 6px;
}

.vidorev-chatbot-body::-webkit-scrollbar-track {
    background: var(--chatbot-dark);
}

.vidorev-chatbot-body::-webkit-scrollbar-thumb {
    background: var(--chatbot-light);
    border-radius: 3px;
}

/* Mensagens */
.vidorev-chatbot-message {
    display: flex;
    margin-bottom: 16px;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.vidorev-chatbot-message.user {
    justify-content: flex-end;
}

.vidorev-chatbot-message-content {
    max-width: 75%;
    padding: 12px 16px;
    border-radius: 18px;
    font-size: 14px;
    line-height: 1.5;
    word-wrap: break-word;
}

.vidorev-chatbot-message.bot .vidorev-chatbot-message-content {
    background: var(--chatbot-light);
    color: var(--chatbot-text);
    border-bottom-left-radius: 4px;
}

.vidorev-chatbot-message.user .vidorev-chatbot-message-content {
    background: var(--chatbot-primary);
    color: white;
    border-bottom-right-radius: 4px;
}

.vidorev-chatbot-message-content a {
    color: #4db8ff;
    text-decoration: none;
    border-bottom: 1px solid #4db8ff;
}

.vidorev-chatbot-message-content a:hover {
    color: #66c2ff;
}

.vidorev-chatbot-timestamp {
    font-size: 11px;
    color: var(--chatbot-text-secondary);
    margin-top: 4px;
    text-align: right;
}

/* Indicador de digitação */
.vidorev-chatbot-typing {
    display: none;
    padding: 12px 16px;
    background: var(--chatbot-light);
    border-radius: 18px;
    width: fit-content;
    margin-bottom: 16px;
}

.vidorev-chatbot-typing.active {
    display: block;
}

.vidorev-chatbot-typing span {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--chatbot-text-secondary);
    margin-right: 4px;
    animation: typing 1.4s infinite;
}

.vidorev-chatbot-typing span:nth-child(2) {
    animation-delay: 0.2s;
}

.vidorev-chatbot-typing span:nth-child(3) {
    animation-delay: 0.4s;
    margin-right: 0;
}

@keyframes typing {
    0%, 60%, 100% { transform: translateY(0); }
    30% { transform: translateY(-10px); }
}

/* Rodapé / Input */
.vidorev-chatbot-footer {
    padding: 16px;
    background: var(--chatbot-dark);
    border-top: 1px solid var(--chatbot-border);
}

.vidorev-chatbot-input-wrapper {
    display: flex;
    gap: 10px;
    align-items: center;
}

.vidorev-chatbot-input {
    flex: 1;
    background: var(--chatbot-light);
    border: 1px solid var(--chatbot-border);
    border-radius: 24px;
    padding: 12px 16px;
    color: var(--chatbot-text);
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s;
}

.vidorev-chatbot-input:focus {
    border-color: var(--chatbot-primary);
}

.vidorev-chatbot-input::placeholder {
    color: var(--chatbot-text-secondary);
}

.vidorev-chatbot-send {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--chatbot-primary);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.vidorev-chatbot-send:hover {
    background: #cc0000;
    transform: scale(1.05);
}

.vidorev-chatbot-send:disabled {
    background: var(--chatbot-light);
    cursor: not-allowed;
    transform: scale(1);
}

.vidorev-chatbot-send svg {
    width: 20px;
    height: 20px;
    fill: white;
}

/* Sugestões rápidas */
.vidorev-chatbot-suggestions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.vidorev-chatbot-suggestion {
    background: var(--chatbot-light);
    border: 1px solid var(--chatbot-border);
    color: var(--chatbot-text);
    padding: 8px 14px;
    border-radius: 16px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
}

.vidorev-chatbot-suggestion:hover {
    background: var(--chatbot-primary);
    border-color: var(--chatbot-primary);
}

/* Responsivo */
@media (max-width: 480px) {
    .vidorev-chatbot-window {
        width: calc(100vw - 40px);
        height: calc(100vh - 120px);
        max-height: 600px;
    }
    
    .vidorev-chatbot-container.position-bottom-right,
    .vidorev-chatbot-container.position-bottom-left {
        left: 20px;
        right: 20px;
    }
}

/* Animações de atenção */
@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.vidorev-chatbot-button.attention {
    animation: bounce 2s infinite;
}
