/* CSS Premium para Chatbot 7/24 */
:root {
    --chat-primary: #1e3a8a; /* Azul corporativo oscuro */
    --chat-primary-light: #3b82f6;
    --chat-bg: rgba(255, 255, 255, 0.85);
    --chat-text: #1f2937;
    --chat-radius: 24px;
}

#chat724-widget {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 99999;
    font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

#chat724-button {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--chat-primary-light), var(--chat-primary));
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    cursor: pointer;
    box-shadow: 0 10px 25px rgba(59, 130, 246, 0.4);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.3s;
    border: none;
}

#chat724-button:hover {
    transform: scale(1.1) rotate(10deg);
    box-shadow: 0 15px 35px rgba(59, 130, 246, 0.5);
}

#chat724-window {
    position: absolute;
    bottom: 80px;
    right: 0;
    width: 380px;
    height: 550px;
    background: var(--chat-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: var(--chat-radius);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform: scale(0);
    transform-origin: bottom right;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.4s;
    opacity: 0;
    pointer-events: none;
}

#chat724-window.open {
    transform: scale(1);
    opacity: 1;
    pointer-events: all;
}

#chat724-header {
    background: linear-gradient(135deg, var(--chat-primary), #0f172a);
    color: white;
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

#chat724-header-title {
    display: flex;
    align-items: center;
    gap: 12px;
}

#chat724-avatar {
    width: 40px;
    height: 40px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--chat-primary);
    font-size: 20px;
}

#chat724-header-text h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
}

#chat724-header-text p {
    margin: 0;
    font-size: 12px;
    opacity: 0.8;
}

#chat724-close {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    transition: opacity 0.2s;
}

#chat724-close:hover {
    opacity: 0.7;
}

#chat724-body {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.chat724-message {
    max-width: 80%;
    padding: 12px 16px;
    border-radius: 20px;
    font-size: 14px;
    line-height: 1.5;
    animation: fadeIn 0.3s ease forwards;
}

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

.chat724-message.bot {
    background: rgba(255, 255, 255, 0.9);
    align-self: flex-start;
    border-bottom-left-radius: 4px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    color: var(--chat-text);
}

.chat724-message.user {
    background: linear-gradient(135deg, var(--chat-primary-light), var(--chat-primary));
    color: white;
    align-self: flex-end;
    border-bottom-right-radius: 4px;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.2);
}

#chat724-footer {
    padding: 15px;
    background: rgba(255, 255, 255, 0.8);
    display: flex;
    align-items: center;
    gap: 8px;
    position: relative;
    border-top: 1px solid rgba(255, 255, 255, 0.5);
    flex-wrap: wrap;
}

#chat724-file-preview {
    width: 100%;
    font-size: 12px;
    color: #0b253c;
    background: rgba(43, 192, 228, 0.1);
    padding: 5px 10px;
    border-radius: 8px;
    display: none;
    margin-bottom: 5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    box-sizing: border-box;
}

#chat724-attach {
    background: none;
    border: none;
    color: #666;
    font-size: 20px;
    cursor: pointer;
    transition: color 0.3s ease;
    padding: 0 5px;
    display: flex;
    align-items: center;
    justify-content: center;
}

#chat724-attach:hover {
    color: #2bc0e4;
}

#chat724-input {
    flex: 1;
    border: 1px solid rgba(0, 0, 0, 0.1);
    background: rgba(255, 255, 255, 0.8);
    padding: 12px 16px;
    border-radius: 20px;
    outline: none;
    font-size: 14px;
    transition: box-shadow 0.2s, background 0.2s;
}

#chat724-input:focus {
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.3);
    background: white;
}

#chat724-send {
    background: var(--chat-primary);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.2s;
}

#chat724-send:hover {
    transform: scale(1.1);
}

/* Typing indicator */
.chat724-typing {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.9);
    align-self: flex-start;
    border-radius: 20px;
    border-bottom-left-radius: 4px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    width: fit-content;
}

.chat724-typing span {
    width: 6px;
    height: 6px;
    background: var(--chat-primary-light);
    border-radius: 50%;
    animation: typing 1.4s infinite ease-in-out;
}

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

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

@media (max-width: 480px) {
    #chat724-window {
        width: calc(100vw - 40px);
        right: -10px;
        bottom: 70px;
        height: 60vh;
    }
}
