/**
 * ═══════════════════════════════════════════════════════════════
 * MAJAARH - EXIT INTENT BEHAVIORAL INTELLIGENCE
 * نظام الذكاء السلوكي لرسائل الخروج - CSS
 * ═══════════════════════════════════════════════════════════════
 */

/* Exit Modal Overlay */
.exit-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 999999;
    animation: fadeIn 0.3s ease;
}

.exit-modal-overlay.show {
    display: flex !important;
}

/* Exit Modal Backdrop */
.exit-modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(7, 9, 12, 0.95);
    backdrop-filter: blur(10px);
}

/* Exit Modal Content - Card Glass Premium */
.exit-modal-content {
    position: relative;
    max-width: 550px;
    width: 90%;
    z-index: 10000;
    background: linear-gradient(135deg, rgba(20, 25, 35, 0.98), rgba(15, 20, 30, 0.99));
    border: 1px solid rgba(255, 215, 0, 0.25);
    border-radius: 32px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.6),
                0 0 100px rgba(255, 215, 0, 0.15) inset;
    backdrop-filter: blur(20px);
    transform: scale(0.9);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* Light Mode Adjustments */
html.light .exit-modal-content,
[data-bs-theme="light"] .exit-modal-content {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.99));
    border: 1px solid rgba(227, 27, 35, 0.2);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15),
                0 0 100px rgba(227, 27, 35, 0.05) inset;
}

.exit-modal-overlay.show .exit-modal-content {
    transform: scale(1);
    opacity: 1;
}

/* Card Glass Premium Effect */
.card-glass-premium {
    background: linear-gradient(135deg, 
        rgba(20, 25, 35, 0.98), 
        rgba(15, 20, 30, 0.99)
    );
    border: 1px solid rgba(255, 215, 0, 0.25);
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.5),
        0 0 80px rgba(255, 215, 0, 0.08) inset,
        0 1px 0 rgba(255, 255, 255, 0.1) inset;
    backdrop-filter: blur(20px);
}

html.light .card-glass-premium,
[data-bs-theme="light"] .card-glass-premium {
    background: linear-gradient(135deg, 
        rgba(255, 255, 255, 0.98), 
        rgba(248, 250, 252, 0.99)
    );
    border: 1px solid rgba(227, 27, 35, 0.2);
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.1),
        0 0 80px rgba(227, 27, 35, 0.03) inset;
}

/* Exit Icon */
.exit-icon {
    width: 100px;
    height: 100px;
    margin: 0 auto;
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.12), rgba(255, 193, 7, 0.06));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

html.light .exit-icon,
[data-bs-theme="light"] .exit-icon {
    background: linear-gradient(135deg, rgba(227, 27, 35, 0.08), rgba(227, 27, 35, 0.04));
}

/* Exit Modal Close Button */
.exit-modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: rgba(255, 255, 255, 0.7);
    transition: all 0.3s ease;
    font-size: 1.2rem;
}

html.light .exit-modal-close,
[data-bs-theme="light"] .exit-modal-close {
    background: rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.1);
    color: rgba(0, 0, 0, 0.6);
}

.exit-modal-close:hover {
    background: rgba(255, 46, 46, 0.15);
    border-color: #ff2e2e;
    color: #ff2e2e;
    transform: rotate(90deg);
}

html.light .exit-modal-close:hover,
[data-bs-theme="light"] .exit-modal-close:hover {
    background: rgba(227, 27, 35, 0.1);
    border-color: #e31b23;
    color: #e31b23;
}

/* Text Styles */
.text-white {
    color: #ffffff !important;
}

html.light .text-white,
[data-bs-theme="light"] .text-white {
    color: #1f2937 !important;
}

.text-light {
    color: rgba(255, 255, 255, 0.9) !important;
}

html.light .text-light,
[data-bs-theme="light"] .text-light {
    color: rgba(31, 41, 55, 0.8) !important;
}

.opacity-75 {
    opacity: 0.85 !important;
}

.fw-bold {
    font-weight: 700 !important;
}

/* Button Styles */
.btn {
    padding: 12px 30px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 1rem;
    border: none;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-warning {
    background: linear-gradient(135deg, #ffd700, #ffb700);
    color: #000;
    box-shadow: 0 10px 30px rgba(255, 215, 0, 0.35);
}

.btn-warning:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(255, 215, 0, 0.5);
    color: #000;
}

.btn-lg {
    padding: 16px 40px;
    font-size: 1.1rem;
}

.btn-outline-light {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.25);
}

html.light .btn-outline-light,
[data-bs-theme="light"] .btn-outline-light {
    background: rgba(0, 0, 0, 0.03);
    color: #1f2937;
    border: 1px solid rgba(0, 0, 0, 0.15);
}

.btn-outline-light:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 215, 0, 0.6);
    color: #ffd700;
}

html.light .btn-outline-light:hover,
[data-bs-theme="light"] .btn-outline-light:hover {
    background: rgba(227, 27, 35, 0.08);
    border-color: rgba(227, 27, 35, 0.4);
    color: #e31b23;
}

.rounded-pill {
    border-radius: 50rem !important;
}

/* Grid Layout */
.d-grid {
    display: grid;
}

.gap-3 {
    gap: 1rem;
}

/* Spacing Utilities */
.p-5 {
    padding: 3rem !important;
}

.mb-3 {
    margin-bottom: 1rem !important;
}

.mb-4 {
    margin-bottom: 1.5rem !important;
}

.me-2 {
    margin-right: 0.5rem !important;
}

/* Text Alignment */
.text-center {
    text-align: center !important;
}

/* Color Classes */
.text-success {
    color: #28a745 !important;
}

.text-danger {
    color: #dc3545 !important;
}

.text-info {
    color: #17a2b8 !important;
}

.text-primary {
    color: #007bff !important;
}

.text-warning {
    color: #ffc107 !important;
}

.text-cyan {
    color: #00d4ff !important;
}

/* Animations */
.animate-pulse {
    animation: pulse-warning 2s infinite;
}

@keyframes pulse-warning {
    0% {
        transform: scale(1);
        filter: drop-shadow(0 0 0px rgba(255, 215, 0, 0));
    }
    50% {
        transform: scale(1.1);
        filter: drop-shadow(0 0 15px rgba(255, 215, 0, 0.5));
    }
    100% {
        transform: scale(1);
        filter: drop-shadow(0 0 0px rgba(255, 215, 0, 0));
    }
}

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

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

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

/* Responsive */
@media (max-width: 768px) {
    .exit-modal-content {
        padding: 40px 25px !important;
        border-radius: 24px;
        max-width: 95%;
    }
    
    .exit-icon {
        width: 80px;
        height: 80px;
        font-size: 2.5rem;
    }
    
    .exit-modal-content h2 {
        font-size: 1.5rem;
    }
    
    .exit-modal-content p {
        font-size: 1rem;
    }
    
    .btn-lg {
        padding: 14px 30px;
        font-size: 1rem;
    }
    
    .p-5 {
        padding: 2rem !important;
    }
}

/* Dark Mode Adjustments */
.dark .exit-modal-content,
.dark .card-glass-premium {
    background: linear-gradient(135deg, 
        rgba(10, 15, 25, 0.98), 
        rgba(5, 10, 20, 0.99)
    );
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.8);
}

/* Light Mode Backdrop */
html.light .exit-modal-backdrop,
[data-bs-theme="light"] .exit-modal-backdrop {
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(12px);
}

/* RTL Support */
[dir="rtl"] .exit-modal-close {
    right: auto;
    left: 20px;
}

[dir="rtl"] .me-2 {
    margin-right: 0 !important;
    margin-left: 0.5rem !important;
}
