/* NASA-inspired WooCommerce Modal Styles - Full Effects on All Devices */
.wmp-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(0, 20, 50, 0.9), rgba(10, 10, 30, 0.95));
    backdrop-filter: blur(5px); /* Glassmorphism effect */
    z-index: 9998;
    opacity: 0;
    transition: opacity 0.6s ease, backdrop-filter 0.6s ease;
    display: none;
    overflow: hidden;
}

/* Cosmic particle background */
.wmp-modal-overlay::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 1px, transparent 1px);
    background-size: 20px 20px;
    animation: particle-drift 20s linear infinite;
    z-index: -1;
}

.wmp-modal-overlay.show {
    opacity: 1;
    display: block;
}

.wmp-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.7) rotateX(30deg);
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.1), rgba(200, 220, 255, 0.15));
    backdrop-filter: blur(15px); /* Glassmorphism for modal */
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 15px;
    box-shadow: 0 10px 50px rgba(0, 100, 255, 0.3), 
                0 0 20px rgba(0, 255, 255, 0.2),
                inset 0 0 10px rgba(255, 255, 255, 0.1);
    padding: 30px;
    max-width: 700px;
    width: 90%;
    z-index: 10000;
    opacity: 0;
    transition: all 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55), 
                opacity 0.5s ease, 
                transform 0.5s ease;
    perspective: 1000px;
}

/* Show state with dramatic entrance */
.wmp-modal.show {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1) rotateX(0deg);
    box-shadow: 0 15px 60px rgba(0, 100, 255, 0.5), 
                0 0 30px rgba(0, 255, 255, 0.3);
    animation: pulse-glow 2s ease-in-out infinite alternate;
}

/* Pulsing glow effect */
@keyframes pulse-glow {
    0% {
        box-shadow: 0 15px 60px rgba(0, 100, 255, 0.5), 
                    0 0 30px rgba(0, 255, 255, 0.3);
    }
    100% {
        box-shadow: 0 20px 80px rgba(0, 100, 255, 0.7), 
                    0 0 50px rgba(0, 255, 255, 0.5);
    }
}

/* Particle drift animation */
@keyframes particle-drift {
    0% {
        background-position: 0 0;
    }
    100% {
        background-position: 100px 100px;
    }
}

/* Close button with futuristic hover effect */
.wmp-modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: linear-gradient(45deg, #ff4d4d, #ff1a1a);
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    cursor: pointer;
    font-size: 20px;
    line-height: 40px;
    text-align: center;
    transition: all 0.3s ease;
    box-shadow: 0 0 10px rgba(255, 50, 50, 0.5);
    transform: rotate(0deg);
}

.wmp-modal-close:hover {
    background: linear-gradient(45deg, #ff1a1a, #cc0000);
    transform: rotate(90deg) scale(1.1);
    box-shadow: 0 0 20px rgba(255, 50, 50, 0.8), 
                0 0 30px rgba(255, 50, 50, 0.4);
}

.wmp-modal-close:active {
    transform: rotate(90deg) scale(0.9);
}

/* Modal content with subtle animation */
.wmp-modal-content {
    margin-top: 20px;
    font-size: 16px;
    line-height: 1.6;
    color: #e6f0ff;
    text-shadow: 0 0 5px rgba(255, 255, 255, 0.3);
    animation: content-fade-in 0.8s ease;
}

.wmp-modal-content h1,
.wmp-modal-content h2,
.wmp-modal-content h3 {
    color: #00ccff;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    text-shadow: 0 0 10px rgba(0, 204, 255, 0.5);
}

.wmp-modal-content a {
    color: #00ccff;
    text-decoration: none;
    transition: color 0.3s ease;
}

.wmp-modal-content a:hover {
    color: #66e6ff;
    text-shadow: 0 0 10px rgba(102, 230, 255, 0.7);
}

/* Content fade-in animation */
@keyframes content-fade-in {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Neon border effect */
.wmp-modal::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    border-radius: 15px;
    background: linear-gradient(45deg, #00ccff, #ff00ff, #00ccff);
    background-size: 400%;
    z-index: -1;
    filter: blur(5px);
    animation: neon-glow 4s ease-in-out infinite;
}

@keyframes neon-glow {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 400% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

/* Responsive adjustments - Size only, full effects preserved */
@media (max-width: 768px) {
    .wmp-modal {
        width: 95%;
        padding: 20px;
        max-width: 500px;
        border-radius: 15px; /* Keep full radius */
    }

    .wmp-modal-content {
        font-size: 14px;
    }

    .wmp-modal-close {
        top: 15px;
        right: 15px;
        width: 35px;
        height: 35px;
        font-size: 18px;
        line-height: 35px;
    }
}

@media (max-width: 480px) {
    .wmp-modal {
        padding: 15px;
        border-radius: 10px; /* Slight reduction for tiny screens */
    }

    .wmp-modal-content {
        font-size: 13px;
        margin-top: 15px;
    }

    .wmp-modal-close {
        top: 10px;
        right: 10px;
        width: 30px;
        height: 30px;
        font-size: 16px;
        line-height: 30px;
    }
}

/* High-DPI displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .wmp-modal {
        box-shadow: 0 10px 60px rgba(0, 100, 255, 0.4), 
                    0 0 25px rgba(0, 255, 255, 0.25);
    }

    .wmp-modal::before {
        filter: blur(4px);
    }
}