/* Terms and Conditions Modal */
.terms-modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 9999;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.terms-modal-overlay.active {
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
}

.terms-modal {
    background: white;
    border-radius: 12px;
    max-width: 800px;
    width: 90%;
    max-height: 85vh;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.terms-modal-overlay.active .terms-modal {
    transform: scale(1);
}

.terms-modal-header {
    background: linear-gradient(135deg, #0a4d68 0%, #05668d 100%);
    color: white;
    padding: 25px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.terms-modal-header h2 {
    margin: 0;
    font-size: 24px;
    font-weight: 700;
}

.terms-modal-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    font-size: 28px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.terms-modal-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

.terms-modal-content {
    padding: 30px;
    overflow-y: auto;
    max-height: calc(85vh - 100px);
}

.terms-modal-content h3 {
    color: #0a4d68;
    font-size: 20px;
    margin-top: 25px;
    margin-bottom: 15px;
    font-weight: 600;
}

.terms-modal-content h3:first-child {
    margin-top: 0;
}

.terms-modal-content p {
    color: #333;
    line-height: 1.8;
    margin-bottom: 15px;
    font-size: 15px;
}

.terms-modal-content ul {
    margin: 15px 0;
    padding-right: 25px;
}

.terms-modal-content li {
    color: #555;
    line-height: 1.8;
    margin-bottom: 10px;
}

/* RTL Support */
[dir="rtl"] .terms-modal-content ul {
    padding-right: 0;
    padding-left: 25px;
}

/* Responsive */
@media (max-width: 768px) {
    .terms-modal {
        width: 95%;
        max-height: 90vh;
    }
    
    .terms-modal-header {
        padding: 20px;
    }
    
    .terms-modal-header h2 {
        font-size: 20px;
    }
    
    .terms-modal-content {
        padding: 20px;
    }
    
    .terms-modal-content h3 {
        font-size: 18px;
    }
    
    .terms-modal-content p {
        font-size: 14px;
    }
}

/* Scrollbar styling */
.terms-modal-content::-webkit-scrollbar {
    width: 8px;
}

.terms-modal-content::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.terms-modal-content::-webkit-scrollbar-thumb {
    background: #0a4d68;
    border-radius: 10px;
}

.terms-modal-content::-webkit-scrollbar-thumb:hover {
    background: #05668d;
}
