/* ========================================
   CONVERSION OPTIMIZATION - STICKY CTA
   Mobile-First Lead Generation Machine
   ======================================== */

/* Sticky Mobile CTA Bar - B2B Focus */
.sticky-cta-mobile {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, #10B981 0%, #059669 100%);
    padding: 1rem;
    box-shadow: 0 -4px 20px rgba(16, 185, 129, 0.4);
    z-index: 9999;
    display: none;
    animation: slideUp 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes slideUp {
    from { transform: translateY(100%); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.sticky-cta-content {
    max-width: 768px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.sticky-cta-text {
    flex: 1;
    color: white;
    font-weight: 600;
    font-size: 0.95rem;
    line-height: 1.4;
}

.sticky-cta-text strong {
    display: block;
    font-size: 1.1rem;
    margin-bottom: 0.25rem;
}

.sticky-cta-button {
    background: white;
    color: #10B981;
    border: none;
    padding: 0.875rem 1.5rem;
    border-radius: 0.75rem;
    font-weight: 700;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
    box-shadow: 0 4px 12px rgba(255, 255, 255, 0.3);
}

.sticky-cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 255, 255, 0.4);
}

.sticky-cta-button:active {
    transform: translateY(0);
}

/* Floating Action Button (FAB) */
.floating-action-button {
    position: fixed;
    bottom: 100px;
    right: 20px;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #6366F1 0%, #818CF8 100%);
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
    color: white;
    box-shadow: 0 4px 20px rgba(99, 102, 241, 0.4);
    z-index: 9998;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    animation: pulse-fab 2s infinite;
}

@keyframes pulse-fab {
    0%, 100% { 
        box-shadow: 0 4px 20px rgba(99, 102, 241, 0.4);
        transform: scale(1);
    }
    50% { 
        box-shadow: 0 6px 30px rgba(99, 102, 241, 0.6);
        transform: scale(1.05);
    }
}

.floating-action-button:hover {
    transform: scale(1.1);
    box-shadow: 0 8px 30px rgba(99, 102, 241, 0.6);
}

.floating-action-button svg {
    width: 28px;
    height: 28px;
}

/* Exit Intent Popup */
.exit-intent-popup {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(2, 6, 23, 0.85);
    backdrop-filter: blur(8px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.exit-intent-content {
    background: linear-gradient(135deg, #ffffff 0%, #F8FAFC 100%);
    border-radius: 1.5rem;
    padding: 2.5rem;
    max-width: 500px;
    width: 90%;
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideDown 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes slideDown {
    from { 
        transform: translateY(-50px);
        opacity: 0;
    }
    to { 
        transform: translateY(0);
        opacity: 1;
    }
}

.exit-intent-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #64748B;
    cursor: pointer;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.exit-intent-close:hover {
    background: #F1F5F9;
    color: #1E293B;
}

.exit-intent-header {
    text-align: center;
    margin-bottom: 2rem;
}

.exit-intent-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 1rem;
    background: linear-gradient(135deg, #10B981 0%, #059669 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.exit-intent-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: #1E1B4B;
    margin-bottom: 0.5rem;
    font-family: 'Rubik', sans-serif;
}

.exit-intent-subtitle {
    color: #64748B;
    font-size: 1rem;
    line-height: 1.5;
}

.exit-intent-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.exit-intent-input {
    padding: 1rem;
    border: 2px solid #E2E8F0;
    border-radius: 0.75rem;
    font-size: 1rem;
    font-family: 'Nunito Sans', sans-serif;
    transition: all 0.2s;
    background: white;
    color: #1E1B4B;
}

.exit-intent-input:focus {
    outline: none;
    border-color: #10B981;
    box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.1);
}

.exit-intent-input::placeholder {
    color: #94A3B8;
}

/* Select styling for exit popup */
.exit-intent-select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%2364748B' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 20px;
    padding-right: 3rem;
    cursor: pointer;
}

.exit-intent-select option {
    color: #1E1B4B;
    background: white;
    padding: 0.5rem;
}

.exit-intent-submit {
    background: linear-gradient(135deg, #10B981 0%, #059669 100%);
    color: white;
    border: none;
    padding: 1rem;
    border-radius: 0.75rem;
    font-weight: 700;
    font-size: 1.05rem;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.exit-intent-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4);
}

.exit-intent-benefit {
    margin-top: 1.5rem;
    padding: 1rem;
    background: #F0FDF4;
    border-radius: 0.75rem;
    border-left: 4px solid #10B981;
}

.exit-intent-benefit p {
    color: #065F46;
    font-size: 0.9rem;
    margin: 0;
}

.exit-intent-benefit strong {
    color: #047857;
}

/* Responsive breakpoints */
@media (max-width: 768px) {
    .sticky-cta-mobile {
        display: block;
    }
    
    .floating-action-button {
        display: flex;
    }
    
    .sticky-cta-content {
        flex-direction: column;
        text-align: center;
    }
    
    .sticky-cta-button {
        width: 100%;
    }
}

@media (min-width: 769px) {
    /* Desktop: show FAB only */
    .floating-action-button {
        display: flex;
    }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .sticky-cta-mobile,
    .floating-action-button,
    .exit-intent-popup,
    .exit-intent-content {
        animation: none;
    }
}
