/**
 * Policy Modal Styles
 * Responsive modal for privacy policy and terms & conditions
 * 
 * Copyright (c) 2026 Nexsage Technologies Private Limited
 */

/* Modal Overlay */
.policy-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    display: none;
    justify-content: center;
    align-items: center;
    animation: fadeIn 0.2s ease-out;
}

.policy-modal.active {
    display: flex;
}

.policy-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(7, 21, 51, 0.9);
    backdrop-filter: blur(4px);
    cursor: pointer;
}

/* Modal Content Container */
.policy-modal-content {
    position: relative;
    width: 90%;
    max-width: 700px;
    max-height: 85vh;
    background: #0a1633;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    animation: slideUp 0.3s ease-out;
    border: 1px solid rgba(15, 208, 199, 0.2);
}

/* Modal Header */
.policy-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 28px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    flex-shrink: 0;
}

.policy-modal-header h2 {
    margin: 0;
    font-size: 24px;
    font-weight: 600;
    color: #f4f7ff;
}

.policy-modal-close {
    background: transparent;
    border: none;
    color: #b9c3d8;
    cursor: pointer;
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: all 0.2s ease;
    margin: -8px -8px -8px 16px;
}

.policy-modal-close:hover {
    background: rgba(255, 255, 255, 0.05);
    color: #0fd0c7;
}

.policy-modal-close:focus {
    outline: 2px solid #0fd0c7;
    outline-offset: 2px;
}

/* Modal Body */
.policy-modal-body {
    padding: 28px;
    overflow-y: auto;
    flex: 1;
    color: #e5e9f2;
    line-height: 1.7;
}

#policyModalContent h3 {
    color: #0fd0c7;
    font-size: 18px;
    font-weight: 600;
    margin: 24px 0 12px 0;
}

#policyModalContent h3:first-child {
    margin-top: 0;
}

#policyModalContent p {
    margin: 0 0 16px 0;
    color: #d1d8e6;
}

#policyModalContent ul {
    margin: 0 0 16px 0;
    padding-left: 24px;
}

#policyModalContent li {
    margin-bottom: 8px;
    color: #d1d8e6;
}

#policyModalContent ul li::marker {
    color: #0fd0c7;
}

/* Scrollbar Styling */
.policy-modal-body::-webkit-scrollbar {
    width: 8px;
}

.policy-modal-body::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 4px;
}

.policy-modal-body::-webkit-scrollbar-thumb {
    background: rgba(15, 208, 199, 0.3);
    border-radius: 4px;
}

.policy-modal-body::-webkit-scrollbar-thumb:hover {
    background: rgba(15, 208, 199, 0.5);
}

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

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

/* Mobile Responsive */
@media (max-width: 768px) {
    .policy-modal-content {
        width: 95%;
        max-height: 90vh;
        border-radius: 8px;
    }

    .policy-modal-header {
        padding: 20px;
    }

    .policy-modal-header h2 {
        font-size: 20px;
    }

    .policy-modal-body {
        padding: 20px;
    }

    #policyModalContent h3 {
        font-size: 16px;
    }
}

/* Accessibility: Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
    .policy-modal,
    .policy-modal-content {
        animation: none;
    }
}
