/* Testy Chat Widget Styles */
.testy-chat-container {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.testy-chat-trigger {
    width: 65px;
    height: 65px;
    border-radius: 50%;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    box-shadow: 0 10px 25px rgba(99, 102, 241, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 2px solid rgba(255, 255, 255, 0.2);
    overflow: hidden;
    padding: 0;
}

.testy-chat-trigger:hover {
    transform: scale(1.1);
}

.testy-chat-window {
    width: 380px;
    height: 550px;
    background: #0f172a;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 1.5rem;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
    display: none;
    flex-direction: column;
    overflow: hidden;
    margin-bottom: 1rem;
    backdrop-filter: blur(20px);
}

.testy-chat-window.active {
    display: flex;
    animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.testy-chat-header {
    padding: 1.25rem;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(139, 92, 246, 0.1));
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    gap: 1rem;
}

.testy-avatar-img {
    width: 45px;
    height: 45px;
    border-radius: 12px;
    object-fit: cover;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.testy-header-info h3 {
    font-family: 'Outfit', sans-serif;
    font-size: 1.1rem;
    font-weight: 700;
    margin: 0;
    color: #f8fafc;
}

.testy-header-info span {
    font-size: 0.75rem;
    color: #94a3b8;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.testy-header-info span::before {
    content: '';
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #10b981;
}

.testy-chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* Custom Scrollbar */
.testy-chat-messages::-webkit-scrollbar {
    width: 6px;
}
.testy-chat-messages::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}

.chat-bubble {
    max-width: 85%;
    padding: 0.75rem 1rem;
    border-radius: 1rem;
    font-size: 0.95rem;
    line-height: 1.5;
    word-wrap: break-word;
}

.chat-bubble.testy {
    align-self: flex-start;
    background: rgba(30, 41, 59, 0.7);
    color: #e2e8f0;
    border-bottom-left-radius: 0.25rem;
}

.chat-bubble.user {
    align-self: flex-end;
    background: #6366f1;
    color: white;
    border-bottom-right-radius: 0.25rem;
}

.testy-chat-input-area {
    padding: 1.25rem;
    background: rgba(15, 23, 42, 0.5);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.testy-input-group {
    display: flex;
    gap: 0.5rem;
    background: rgba(30, 41, 59, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 0.75rem;
    padding: 0.5rem;
}

.testy-input-group input {
    flex: 1;
    background: transparent;
    border: none;
    color: white;
    padding: 0.5rem;
    outline: none;
    font-size: 0.9rem;
}

.testy-send-btn {
    background: #6366f1;
    border: none;
    color: white;
    width: 35px;
    height: 35px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.testy-send-btn:hover {
    background: #4f46e5;
}

/* Typing Indicator */
.typing-indicator {
    display: flex;
    gap: 4px;
    padding: 4px 8px;
}

.typing-dot {
    width: 4px;
    height: 4px;
    background: #94a3b8;
    border-radius: 50%;
    animation: bounce 1.4s infinite ease-in-out;
}

@keyframes bounce {
    0%, 80%, 100% { transform: scale(0); }
    40% { transform: scale(1.0); }
}

.typing-dot:nth-child(2) { animation-delay: 0.2s; }
.typing-dot:nth-child(3) { animation-delay: 0.4s; }

/* Modal de Email */
.email-gate {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.95);
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    text-align: center;
    backdrop-filter: blur(5px);
}

.email-gate h4 {
    margin-bottom: 1rem;
    font-family: 'Outfit', sans-serif;
}

.email-gate p {
    font-size: 0.85rem;
    color: #94a3b8;
    margin-bottom: 1.5rem;
}

.email-gate input {
    width: 100%;
    padding: 0.75rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 0.5rem;
    color: white;
    margin-bottom: 1rem;
}

.btn-email-submit {
    width: 100%;
    padding: 0.75rem;
    background: #6366f1;
    border: none;
    color: white;
    border-radius: 0.5rem;
    font-weight: 600;
    cursor: pointer;
}



@media (max-width: 480px) {
    .testy-chat-window {
        width: calc(100vw - 2rem);
        right: 1rem;
        bottom: 5.5rem;
        height: 450px;
    }
}
