/**
 * WP Loyalty Level Up Popup Styles
 */

.wlr-level-up-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.wlr-level-up-overlay.wlr-popup-active {
    opacity: 1;
}

.wlr-level-up-modal {
    background: white;
    border-radius: 20px;
    max-width: 450px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    transform: translateY(-50px) scale(0.9);
    transition: all 0.3s ease;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.wlr-popup-active .wlr-level-up-modal {
    transform: translateY(0) scale(1);
}

.wlr-popup-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: 24px;
    color: #999;
    cursor: pointer;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
    z-index: 1;
}

.wlr-popup-close:hover {
    background: #f5f5f5;
    color: #333;
}

.wlr-popup-content {
    padding: 40px 30px 30px;
    text-align: center;
}

.wlr-popup-icon {
    margin-bottom: 20px;
}

.wlr-level-icon {
    display: inline-block;
    animation: icon-bounce 2s ease-in-out infinite;
}

#wlr-popup-level-image {
    width: 64px;
    height: 64px;
    object-fit: contain;
}

.wlr-crown-fallback {
    font-size: 64px;
    display: inline-block;
}

@keyframes icon-bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.wlr-popup-title {
    font-size: 28px;
    font-weight: 700;
    color: #333;
    margin: 0 0 20px 0;
    background: linear-gradient(91deg, #8A2BE2 7.08%, #FF69B4 92.92%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.wlr-popup-message p {
    font-size: 16px;
    color: #666;
    margin: 0 0 20px 0;
    line-height: 1.5;
}

.wlr-new-level-info {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-bottom: 30px;
}

.wlr-level-badge {
    background: linear-gradient(91deg, #8A2BE2 7.08%, #FF69B4 92.92%);
    color: white;
    padding: 8px 16px;
    border-radius: 25px;
    font-weight: 600;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.wlr-level-name {
    font-size: 24px;
    font-weight: 700;
    color: #333;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.wlr-popup-rewards {
    background: #f8f9fa;
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 30px;
    text-align: left;
}

.wlr-popup-rewards h3 {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin: 0 0 15px 0;
    text-align: center;
}

#wlr-level-benefits {
    list-style: none;
    padding: 0;
    margin: 0;
}

#wlr-level-benefits li {
    padding: 8px 0;
    font-size: 16px;
    color: #555;
    display: flex;
    align-items: center;
    gap: 10px;
}

#wlr-level-benefits li:before {
    content: '';
    width: 6px;
    height: 6px;
    background: linear-gradient(91deg, #8A2BE2 7.08%, #FF69B4 92.92%);
    border-radius: 50%;
    flex-shrink: 0;
}

.wlr-popup-cta {
    background: linear-gradient(91deg, #8A2BE2 7.08%, #FF69B4 92.92%) !important;
    color: white !important;
    border: none !important;
    padding: 15px 30px !important;
    border-radius: 25px !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    text-transform: uppercase !important;
    letter-spacing: 1px !important;
    box-shadow: 0 4px 15px rgba(138, 43, 226, 0.3) !important;
}

.wlr-popup-cta:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 20px rgba(138, 43, 226, 0.4) !important;
    opacity: 0.9 !important;
}

/* Responsive Design */
@media (max-width: 768px) {
    .wlr-level-up-modal {
        margin: 20px;
        width: calc(100% - 40px);
    }
    
    .wlr-popup-content {
        padding: 30px 20px 20px;
    }
    
    .wlr-popup-title {
        font-size: 24px;
    }
    
    .wlr-crown-icon {
        font-size: 48px;
    }
    
    .wlr-new-level-info {
        flex-direction: column;
        gap: 10px;
    }
    
    .wlr-level-name {
        font-size: 20px;
    }
    
    .wlr-popup-cta {
        padding: 12px 25px !important;
        font-size: 14px !important;
    }
}

/* Animation for entrance */
@keyframes slideInUp {
    from {
        transform: translateY(100px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.wlr-popup-active .wlr-popup-content {
    animation: slideInUp 0.5s ease-out;
}