/**
 * Policy Modals Styles
 * File: assets/css/policy-modals.css
 */

/* Policy Modal Overlay */
.policy-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(6, 28, 57, 0.85);
    backdrop-filter: blur(4px);
    z-index: 9999;
    overflow-y: auto;
    padding: 20px;
}

.policy-modal.active {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 40px;
    padding-bottom: 40px;
}

/* Policy Modal Content */
.policy-modal-content {
    background: white;
    border-radius: 16px;
    max-width: 900px;
    width: 100%;
    max-height: calc(100vh - 80px);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3);
    animation: policyModalSlideUp 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

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

/* Policy Modal Header */
.policy-modal-header {
    padding: 2rem 2.5rem;
    border-bottom: 2px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, #061C39 0%, #0a2540 100%);
    border-radius: 16px 16px 0 0;
    flex-shrink: 0;
}

.policy-modal-header h2 {
    font-size: 1.75rem;
    color: white;
    font-family: 'Inter', sans-serif;
    font-weight: 700;
    margin: 0;
}

.policy-modal-close {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    font-size: 2rem;
    color: white;
    cursor: pointer;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: all 0.2s ease;
    line-height: 1;
}

.policy-modal-close:hover {
    background: rgba(255, 192, 0, 0.2);
    color: #FFC000;
    transform: rotate(90deg);
}

/* Policy Modal Body */
.policy-modal-body {
    padding: 2.5rem;
    color: #475569;
    line-height: 1.8;
    overflow-y: auto;
    flex: 1;
}

.policy-last-updated {
    color: #64748b;
    font-size: 0.95rem;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e2e8f0;
}

.policy-modal-body h3 {
    color: #061C39;
    margin-top: 2rem;
    margin-bottom: 0.75rem;
    font-size: 1.25rem;
    font-weight: 700;
    font-family: 'Inter', sans-serif;
}

.policy-modal-body h3:first-of-type {
    margin-top: 0;
}

.policy-modal-body p {
    margin-bottom: 1rem;
    color: #475569;
}

.policy-modal-body ul {
    margin-left: 1.5rem;
    margin-bottom: 1.5rem;
}

.policy-modal-body li {
    margin-bottom: 0.5rem;
    color: #475569;
}

.policy-modal-body strong {
    color: #061C39;
    font-weight: 600;
}

/* Policy Modal Footer */
.policy-modal-footer {
    padding: 1.5rem 2.5rem;
    border-top: 2px solid #e2e8f0;
    display: flex;
    justify-content: center;
    background: #f8fafc;
    border-radius: 0 0 16px 16px;
    flex-shrink: 0;
}

.policy-acknowledge-btn {
    padding: 0.875rem 2.5rem;
    background: #FFC000;
    color: #061C39;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 700;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    transition: all 0.3s ease;
}

.policy-acknowledge-btn:hover {
    background: #e6ac00;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 192, 0, 0.3);
}

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

.policy-modal-body::-webkit-scrollbar-track {
    background: #f1f5f9;
}

.policy-modal-body::-webkit-scrollbar-thumb {
    background: #FFC000;
    border-radius: 4px;
}

.policy-modal-body::-webkit-scrollbar-thumb:hover {
    background: #e6ac00;
}

/* Firefox scrollbar */
.policy-modal-body {
    scrollbar-width: thin;
    scrollbar-color: #FFC000 #f1f5f9;
}

/* Responsive Design */
@media (max-width: 768px) {
    .policy-modal {
        padding: 10px;
    }

    .policy-modal.active {
        padding-top: 20px;
        padding-bottom: 20px;
    }

    .policy-modal-content {
        max-height: calc(100vh - 40px);
    }

    .policy-modal-header {
        padding: 1.5rem;
    }

    .policy-modal-header h2 {
        font-size: 1.5rem;
    }

    .policy-modal-close {
        width: 36px;
        height: 36px;
        font-size: 1.75rem;
    }

    .policy-modal-body {
        padding: 1.5rem;
    }

    .policy-modal-body h3 {
        font-size: 1.15rem;
    }

    .policy-modal-footer {
        padding: 1.25rem 1.5rem;
    }

    .policy-acknowledge-btn {
        width: 100%;
        padding: 0.875rem 1.5rem;
    }
}

@media (max-width: 480px) {
    .policy-modal-header {
        padding: 1.25rem;
    }

    .policy-modal-header h2 {
        font-size: 1.25rem;
    }

    .policy-modal-body {
        padding: 1.25rem;
        font-size: 0.95rem;
    }

    .policy-modal-body h3 {
        font-size: 1.1rem;
        margin-top: 1.5rem;
    }

    .policy-modal-body ul {
        margin-left: 1.25rem;
    }
}

/* Animation for smooth transitions */
@media (prefers-reduced-motion: reduce) {
    .policy-modal-content {
        animation: none;
    }
    
    .policy-modal-close:hover,
    .policy-acknowledge-btn:hover {
        transform: none;
    }
}

/* Ensure proper z-index stacking */
#policyModalsContainer {
    position: relative;
    z-index: 9999;
}

/* Print styles - hide modals when printing */
@media print {
    .policy-modal {
        display: none !important;
    }
}
