/* AXM Popup Manager Styles */

/* Overlay */
.axm-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 999998;
    backdrop-filter: blur(2px);
}

/* Modal Style */
.axm-popup-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 999999;
    max-width: 90%;
    max-height: 90%;
    width: 500px;
    overflow-y: auto;
}

/* Fullscreen Style */
.axm-popup-fullscreen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
}

/* Popup Content */
.axm-popup-content {
    background-color: #ffffff;
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
    position: relative;
    padding: 30px;
    width: 100%;
    box-sizing: border-box;
}

.axm-popup-fullscreen .axm-popup-content {
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
}

/* Close Button */
.axm-popup-close {
    position: absolute;
    top: 15px;
    right: 20px;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    line-height: 1;
    padding: 5px;
    color: inherit;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.2s ease;
}

.axm-popup-close:hover {
    background-color: rgba(0, 0, 0, 0.1);
}

.axm-popup-close:focus {
    outline: 2px solid #007cba;
    outline-offset: 2px;
}

/* Title */
.axm-popup-title {
    font-size: 1.4em;
    font-weight: bold;
    margin-bottom: 15px;
    padding-right: 30px; /* Space for close button */
}

/* Body */
.axm-popup-body {
    line-height: 1.6;
}

.axm-popup-body p:last-child {
    margin-bottom: 0;
}

/* Body scroll lock */
body.axm-popup-active {
    overflow: hidden;
}

/* Responsive */
@media (max-width: 768px) {
    .axm-popup-modal {
        width: 95%;
        max-width: 95%;
    }
    
    .axm-popup-content {
        padding: 20px;
        border-radius: 4px;
    }
    
    .axm-popup-fullscreen {
        padding: 10px;
    }
    
    .axm-popup-title {
        font-size: 1.2em;
        padding-right: 25px;
    }
    
    .axm-popup-close {
        top: 10px;
        right: 15px;
        font-size: 20px;
        width: 25px;
        height: 25px;
    }
}

/* Animation */
.axm-popup-overlay,
.axm-popup-modal,
.axm-popup-fullscreen {
    opacity: 0;
    transition: opacity 0.3s ease;
}

.axm-popup-overlay.axm-popup-visible,
.axm-popup-modal.axm-popup-visible,
.axm-popup-fullscreen.axm-popup-visible {
    opacity: 1;
}

.axm-popup-modal {
    transform: translate(-50%, -50%) scale(0.9);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.axm-popup-modal.axm-popup-visible {
    transform: translate(-50%, -50%) scale(1);
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .axm-popup-overlay {
        background-color: rgba(0, 0, 0, 0.9);
    }
    
    .axm-popup-close:hover {
        background-color: rgba(0, 0, 0, 0.2);
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .axm-popup-overlay,
    .axm-popup-modal,
    .axm-popup-fullscreen,
    .axm-popup-close {
        transition: none;
    }
}