/* DevLure - CSS para Sistema de Conversão */
/* Implementado em 15/06/2025 */

/* ===== POP-UP DE CAPTURA DE LEADS ===== */
.lead-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.lead-popup-overlay.show {
    opacity: 1;
    visibility: visible;
}

.lead-popup {
    background: white;
    border-radius: 15px;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    transform: scale(0.8);
    transition: transform 0.3s ease;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.lead-popup-overlay.show .lead-popup {
    transform: scale(1);
}

.lead-popup-close {
    position: absolute;
    top: 15px;
    right: 20px;
    background: none;
    border: none;
    font-size: 24px;
    color: #999;
    cursor: pointer;
    z-index: 10;
    transition: color 0.3s ease;
}

.lead-popup-close:hover {
    color: #333;
}

.lead-popup-content {
    padding: 40px 30px 30px;
    text-align: center;
}

.lead-popup-icon {
    font-size: 48px;
    margin-bottom: 20px;
}

.lead-popup h3 {
    color: #333;
    margin-bottom: 15px;
    font-weight: 700;
}

.lead-popup p {
    color: #666;
    margin-bottom: 25px;
    line-height: 1.6;
}

.lead-popup-form .form-control {
    border-radius: 8px;
    border: 2px solid #e9ecef;
    padding: 12px 15px;
    font-size: 16px;
    transition: border-color 0.3s ease;
}

.lead-popup-form .form-control:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

.lead-popup-form .btn {
    padding: 12px 20px;
    font-weight: 600;
    border-radius: 8px;
    font-size: 16px;
}

/* ===== CTAs FLUTUANTES ===== */
.floating-cta {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
    animation: pulse 2s infinite;
}

.btn-floating {
    border-radius: 50px;
    padding: 15px 25px;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.btn-floating:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.btn-floating i {
    font-size: 20px;
}

/* ===== BANNER DE URGÊNCIA ===== */
.urgency-banner {
    position: sticky;
    top: 0;
    z-index: 1030;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    animation: slideDown 0.5s ease;
}

@keyframes slideDown {
    from {
        transform: translateY(-100%);
    }
    to {
        transform: translateY(0);
    }
}

/* ===== CTAs DE SCROLL ===== */
.scroll-cta {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-top: 1px solid #dee2e6;
    border-bottom: 1px solid #dee2e6;
}

.cta-box {
    border: 2px solid transparent;
    background: linear-gradient(white, white) padding-box,
                linear-gradient(135deg, #007bff, #28a745) border-box;
    transition: all 0.3s ease;
}

.cta-box:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

/* ===== SISTEMA DE BUSCA ===== */
.search-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    min-width: 300px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1000;
}

.search-dropdown.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.search-box {
    padding: 15px;
}

.search-box input {
    border-radius: 6px;
    border: 1px solid #dee2e6;
    padding: 10px 15px;
    width: 100%;
    font-size: 14px;
}

.search-results {
    max-height: 300px;
    overflow-y: auto;
    margin-top: 10px;
}

.search-result-item {
    display: block;
    padding: 10px 15px;
    border-bottom: 1px solid #f8f9fa;
    text-decoration: none;
    color: #333;
    transition: background-color 0.3s ease;
}

.search-result-item:hover {
    background-color: #f8f9fa;
    text-decoration: none;
    color: #007bff;
}

.search-result-item:last-child {
    border-bottom: none;
}

/* ===== CHAT AO VIVO ===== */
.chat-widget {
    position: fixed;
    bottom: 80px;
    right: 20px;
    z-index: 1000;
}

.chat-toggle {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #007bff, #0056b3);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 24px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 123, 255, 0.3);
    transition: all 0.3s ease;
    position: relative;
}

.chat-toggle:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(0, 123, 255, 0.4);
}

.chat-notification {
    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: 600;
    animation: bounce 1s infinite;
}

.chat-window {
    position: absolute;
    bottom: 70px;
    right: 0;
    width: 350px;
    height: 500px;
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px) scale(0.9);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.chat-window.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.chat-header {
    background: linear-gradient(135deg, #007bff, #0056b3);
    color: white;
    padding: 15px 20px;
    border-radius: 15px 15px 0 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.chat-agent {
    display: flex;
    align-items: center;
    gap: 10px;
}

.chat-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: white;
    padding: 5px;
}

.chat-close {
    background: none;
    border: none;
    color: white;
    font-size: 18px;
    cursor: pointer;
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

.chat-close:hover {
    opacity: 1;
}

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

.chat-message {
    margin-bottom: 15px;
}

.chat-message.bot .message-content {
    background: white;
    color: #333;
    padding: 12px 15px;
    border-radius: 15px 15px 15px 5px;
    max-width: 80%;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.chat-message.user .message-content {
    background: #007bff;
    color: white;
    padding: 12px 15px;
    border-radius: 15px 15px 5px 15px;
    max-width: 80%;
    margin-left: auto;
    text-align: right;
}

.message-time {
    font-size: 11px;
    color: #999;
    margin-top: 5px;
}

.chat-message.user .message-time {
    text-align: right;
}

.chat-quick-actions {
    padding: 15px 20px;
    border-top: 1px solid #e9ecef;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.quick-action {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 20px;
    padding: 8px 15px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: left;
}

.quick-action:hover {
    background: #007bff;
    color: white;
    border-color: #007bff;
}

.chat-input {
    padding: 15px 20px;
    border-top: 1px solid #e9ecef;
    display: flex;
    gap: 10px;
    align-items: center;
}

.chat-input input {
    flex: 1;
    border: 1px solid #dee2e6;
    border-radius: 20px;
    padding: 10px 15px;
    font-size: 14px;
    outline: none;
}

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

.chat-input button {
    background: #007bff;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    color: white;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.chat-input button:hover {
    background: #0056b3;
}

/* ===== ANIMAÇÕES ===== */
@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}

.pulse-animation {
    animation: pulse 2s infinite;
}

/* ===== RESPONSIVIDADE ===== */
@media (max-width: 768px) {
    .lead-popup {
        width: 95%;
        margin: 20px;
    }
    
    .lead-popup-content {
        padding: 30px 20px 20px;
    }
    
    .chat-window {
        width: 300px;
        height: 450px;
    }
    
    .search-dropdown {
        min-width: 250px;
        right: -50px;
    }
    
    .floating-cta {
        bottom: 100px;
    }
    
    .scroll-cta .btn {
        display: block;
        width: 100%;
        margin-bottom: 10px;
    }
}

@media (max-width: 480px) {
    .chat-window {
        width: calc(100vw - 40px);
        right: -10px;
    }
    
    .search-dropdown {
        min-width: 200px;
        right: -100px;
    }
    
    .btn-floating span {
        display: none;
    }
    
    .btn-floating {
        width: 60px;
        height: 60px;
        border-radius: 50%;
        padding: 0;
        justify-content: center;
    }
}

/* ===== MELHORIAS DE ACESSIBILIDADE ===== */
.lead-popup:focus-within {
    outline: 2px solid #007bff;
    outline-offset: 2px;
}

.chat-toggle:focus {
    outline: 2px solid #007bff;
    outline-offset: 2px;
}

.quick-action:focus {
    outline: 2px solid #007bff;
    outline-offset: 2px;
}

/* ===== ESTADOS DE LOADING ===== */
.loading {
    position: relative;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #007bff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

