/* Exit Intent Modal Styles */
:root {
    --z-modal: 10000;
    --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

/* Exit Intent Modal */
.exit-intent-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: var(--z-modal);
    display: none;
}

.exit-intent-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.75);
    animation: fadeIn 0.3s ease;
}

.exit-intent-content {
    position: relative;
    max-width: 540px;
    margin: 10vh auto;
    background: white;
    padding: 40px 32px;
    border-radius: 20px;
    text-align: center;
    box-shadow: var(--shadow-2xl);
    animation: slideInUp 0.4s ease;
    border: 3px solid #7c3aed;
}

.exit-intent-close {
    position: absolute;
    top: 16px;
    right: 20px;
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    line-height: 1;
    color: #9ca3af;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.exit-intent-close:hover {
    background: #f3f4f6;
    color: #374151;
}

.exit-intent-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.exit-intent-content h3 {
    font-size: 28px;
    font-weight: 700;
    color: #0a2038;
    margin-bottom: 12px;
    line-height: 1.3;
}

.exit-intent-content p {
    font-size: 18px;
    color: #6b7280;
    margin-bottom: 24px;
    line-height: 1.5;
}

.exit-intent-benefits {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 32px;
    text-align: left;
    max-width: 360px;
    margin-left: auto;
    margin-right: auto;
}

.benefit-item {
    font-size: 16px;
    color: #374151;
    font-weight: 500;
}

.exit-intent-cta {
    width: 100%;
    margin-bottom: 16px;
    padding: 16px 24px;
    font-size: 18px;
    font-weight: 700;
    background: #7c3aed;
    border: none;
    border-radius: 12px;
    color: white;
    text-decoration: none;
    display: inline-block;
    transition: all 0.2s ease;
}

.exit-intent-cta:hover {
    background: #6d28d9;
    transform: translateY(-1px);
    box-shadow: 0 12px 24px rgba(124, 58, 237, 0.4);
    text-decoration: none;
    color: white;
}

.exit-intent-dismiss {
    background: none;
    border: none;
    color: #9ca3af;
    font-size: 14px;
    cursor: pointer;
    text-decoration: underline;
    transition: color 0.2s ease;
}

.exit-intent-dismiss:hover {
    color: #6b7280;
}

/* Floating Audit Button */
#floating-audit-btn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
    animation: slideInFromRight 0.5s ease, pulse 2s infinite 3s;
}

.floating-audit-button {
    background: linear-gradient(135deg, #7c3aed 0%, #a855f7 100%);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 16px;
    cursor: pointer;
    box-shadow: 0 8px 25px rgba(124, 58, 237, 0.4);
    transition: all 0.3s ease;
    white-space: nowrap;
}

.floating-audit-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 35px rgba(124, 58, 237, 0.5);
    background: linear-gradient(135deg, #6d28d9 0%, #9333ea 100%);
}

.floating-audit-button:active {
    transform: translateY(0);
}

/* Alternative booking link styles */
.alternative-booking {
    text-align: center;
    margin-top: 12px;
}

.btn-link {
    background: none;
    border: none;
    color: #7c3aed;
    font-size: 14px;
    cursor: pointer;
    text-decoration: underline;
    padding: 8px 0;
    transition: color 0.2s ease;
}

.btn-link:hover {
    color: #6d28d9;
    text-decoration: none;
}

/* Persistent floating help button */
#persistent-help-btn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9998;
    animation: fadeIn 0.5s ease-in-out;
}

.persistent-help-button {
    background: linear-gradient(135deg, #7c3aed 0%, #6d28d9 100%);
    color: white;
    border: none;
    border-radius: 50px;
    padding: 12px 20px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 8px 25px rgba(124, 58, 237, 0.3);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    font-family: inherit;
}

.persistent-help-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 35px rgba(124, 58, 237, 0.4);
    background: linear-gradient(135deg, #6d28d9 0%, #5b21b6 100%);
}

.persistent-help-button:active {
    transform: translateY(0);
}

.persistent-help-button .help-icon {
    font-size: 16px;
}

/* Hide persistent button when exit intent modal is shown */
.exit-intent-modal[style*="display: block"] ~ #persistent-help-btn {
    display: none;
}

/* Hide persistent button when floating audit button is shown */
#floating-audit-btn ~ #persistent-help-btn {
    display: none;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes slideInFromRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes pulse {
    0%, 100% {
        box-shadow: 0 8px 25px rgba(124, 58, 237, 0.4);
    }
    50% {
        box-shadow: 0 8px 25px rgba(124, 58, 237, 0.6), 0 0 0 8px rgba(124, 58, 237, 0.1);
    }
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .exit-intent-content {
        margin: 5vh 20px;
        padding: 32px 24px;
        max-width: none;
    }
    
    .exit-intent-content h3 {
        font-size: 24px;
    }
    
    .exit-intent-content p {
        font-size: 16px;
    }
    
    .exit-intent-benefits {
        margin-bottom: 24px;
    }
    
    .benefit-item {
        font-size: 14px;
    }
    
    .floating-audit-button {
        padding: 10px 16px !important;
        font-size: 14px !important;
    }
    
    #floating-audit-btn {
        bottom: 15px;
        right: 15px;
    }

    #persistent-help-btn {
        bottom: 15px;
        right: 15px;
    }
    
    .persistent-help-button {
        padding: 10px 16px;
        font-size: 13px;
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    .exit-intent-modal *,
    #floating-audit-btn * {
        animation: none !important;
        transition: none !important;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .exit-intent-content {
        border: 4px solid #000;
    }
    
    .exit-intent-cta {
        border: 2px solid #000;
    }
}
