/* ========================================
   Privacy Policy Modal Styles
   ======================================== */

/* Modal Container */
.privacy-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 99999;
    display: none;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease-in-out;
}

/* Show modal with flex */
.privacy-modal.show {
    display: flex;
}

/* Modal Overlay (Dark Background) */
.privacy-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    cursor: pointer;
    animation: fadeIn 0.3s ease-in-out;
}

/* Modal Content Box */
.privacy-modal-content {
    position: relative;
    background-color: #fff;
    width: 90%;
    max-width: 900px;
    max-height: 85vh;
    border-radius: 10px;
    box-shadow: 0 5px 30px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    z-index: 100000;
    animation: slideUp 0.3s ease-out;
}

/* Modal Header */
.privacy-modal-header {
    padding: 20px 30px;
    border-bottom: 1px solid #ddd;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #f8f9fa;
    border-radius: 10px 10px 0 0;
}

.privacy-modal-header h2 {
    margin: 0;
    font-size: 24px;
    font-weight: 600;
    color: #333;
}

/* Close Button (X) */
.privacy-modal-close {
    background: none;
    border: none;
    font-size: 36px;
    color: #999;
    cursor: pointer;
    line-height: 1;
    padding: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    border-radius: 50%;
}

.privacy-modal-close:hover {
    color: #333;
    background-color: #e9ecef;
    transform: rotate(90deg);
}

/* Modal Body (Scrollable Content Area) */
.privacy-modal-body {
    padding: 30px;
    overflow-y: auto;
    flex: 1;
    line-height: 1.6;
}

/* Custom Scrollbar for Modal Body */
.privacy-modal-body::-webkit-scrollbar {
    width: 8px;
}

.privacy-modal-body::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.privacy-modal-body::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 10px;
}

.privacy-modal-body::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Modal Footer */
.privacy-modal-footer {
    padding: 20px 30px;
    border-top: 1px solid #ddd;
    text-align: center;
    background-color: #f8f9fa;
    border-radius: 0 0 10px 10px;
}

/* Close Button in Footer */
.btn-modal-close {
    background-color: #007bff;
    color: #fff;
    border: none;
    padding: 12px 30px;
    font-size: 16px;
    font-weight: 500;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0, 123, 255, 0.3);
}

.btn-modal-close:hover {
    background-color: #0056b3;
    box-shadow: 0 4px 10px rgba(0, 123, 255, 0.4);
    transform: translateY(-2px);
}

.btn-modal-close:active {
    transform: translateY(0);
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ========================================
   Responsive Design
   ======================================== */

/* Tablets (Portrait) */
@media (max-width: 768px) {
    .privacy-modal-content {
        width: 95%;
        max-height: 90vh;
    }
    
    .privacy-modal-header {
        padding: 15px 20px;
    }
    
    .privacy-modal-header h2 {
        font-size: 20px;
    }
    
    .privacy-modal-body {
        padding: 20px;
    }
    
    .privacy-modal-footer {
        padding: 15px 20px;
    }
    
    .btn-modal-close {
        padding: 10px 25px;
        font-size: 15px;
    }
}

/* Mobile Phones */
@media (max-width: 480px) {
    .privacy-modal-content {
        width: 98%;
        max-height: 95vh;
        border-radius: 8px;
    }
    
    .privacy-modal-header {
        padding: 12px 15px;
    }
    
    .privacy-modal-header h2 {
        font-size: 18px;
    }
    
    .privacy-modal-close {
        font-size: 30px;
        width: 35px;
        height: 35px;
    }
    
    .privacy-modal-body {
        padding: 15px;
        font-size: 14px;
    }
    
    .privacy-modal-footer {
        padding: 12px 15px;
    }
    
    .btn-modal-close {
        padding: 10px 20px;
        font-size: 14px;
        width: 100%;
    }
}

/* ========================================
   Prevent Background Scrolling
   ======================================== */

body.modal-open {
    overflow: hidden;
}

/* ========================================
   Right-to-Left (RTL) Support for Arabic
   ======================================== */

.privacy-modal[dir="rtl"] .privacy-modal-header {
    flex-direction: row-reverse;
}

.privacy-modal[dir="rtl"] .privacy-modal-body {
    text-align: right;
    direction: rtl;
}

/* Fade animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
    }
    to {
        opacity: 0;
    }
}