/* ==========================================================================
   PMPro Levels Page - Premium SaaS Design with Brand Pattern Integration
   ========================================================================== */

/* 
   Background Pattern Integration:
   - Main container uses your hero pattern with light overlay for readability
   - Featured cards use the pattern with blue gradient overlay
   - Regular cards show pattern subtly on hover
   - Title area has a subtle dotted pattern accent
   
   Pattern Opacity Levels:
   - Main background: rgba overlay at 0.95 opacity
   - Featured card pattern: blend-mode overlay with dot pattern at 0.4 opacity
   - Regular card hover: pattern at 0.02 opacity (very subtle)
   - Mobile: slightly more opaque overlays for better readability
*/

/* Target only the levels page specifically */
#pmpro_levels {
    background-image: url('https://ushiftpro.com/wp-content/uploads/2025/03/hero_bg_pattern-scaled.webp');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-blend-mode: overlay;
    background-color: rgba(248, 250, 252, 0.95); /* Light overlay to keep cards readable */
    padding: 4rem 2rem;
    margin: 2rem 0;
    border-radius: 2rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.05);
    font-family: 'Lexend', sans-serif;
    position: relative;
}

/* Add subtle pattern overlay for extra depth */
#pmpro_levels::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: radial-gradient(rgba(255, 255, 255, 0.1) 1px, transparent 0);
    background-size: 40px 40px;
    opacity: 0.3;
    border-radius: 2rem;
    pointer-events: none;
    z-index: 1;
}

/* Ensure content appears above the pattern */
#pmpro_levels > * {
    position: relative;
    z-index: 2;
}

/* Hide the default table and create card layout */
#pmpro_levels .pmpro_levels_table {
    display: none;
}

/* Create custom card container after table */
#pmpro_levels .pmpro_card_content::after {
    content: "";
    display: block;
    width: 100%;
}

/* Custom pricing cards layout */
.pmpro_custom_pricing_grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

.pmpro_pricing_card {
    background: white;
    border-radius: 1.5rem;
    padding: 2.5rem 2rem;
    position: relative;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 2px solid transparent;
    overflow: hidden;
}

.pmpro_pricing_card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #ff5e00, #ff7b32);
}

/* Add very subtle pattern to regular cards on hover */
.pmpro_pricing_card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    z-index: 1;
    border-radius: 1.5rem;
}

.pmpro_pricing_card:hover::after {
    opacity: 0.02; /* Very subtle on hover */
}

/* Ensure card content appears above pattern */
.pmpro_pricing_card > * {
    position: relative;
    z-index: 2;
}

.pmpro_pricing_card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12);
    border-color: #ff5e00;
}

/* Featured/Popular plan styling */
.pmpro_pricing_card.featured {
    background: linear-gradient(135deg, #1e40af, #1d4ed8);
    
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-blend-mode: overlay;
    color: white;
    transform: scale(1.05);
    border: none;
    position: relative;
    overflow: hidden;
}

.pmpro_pricing_card.featured::before {
    background: linear-gradient(90deg, #ff5e00, #ffd700);
    height: 6px;
}

/* Add subtle dot pattern to featured card */
.pmpro_pricing_card.featured::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: radial-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 0);
    background-size: 30px 30px;
    opacity: 0.4;
    pointer-events: none;
    z-index: 1;
}

/* Ensure featured card content appears above pattern */
.pmpro_pricing_card.featured > * {
    position: relative;
    z-index: 2;
}

.pmpro_pricing_card.featured .pmpro_card_badge {
    position: absolute;
    top: -12px;
    right: 2rem;
    background: #ff5e00;
    color: white;
    padding: 0.5rem 1.5rem;
    border-radius: 2rem;
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Level name styling */
.pmpro_pricing_card .level_name {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: #1a202c;
    font-family: 'Poppins', sans-serif;
}

.pmpro_pricing_card.featured .level_name {
    color: white;
}

/* Price styling */
.pmpro_pricing_card .level_price {
    margin: 1.5rem 0;
}

.pmpro_pricing_card .price_amount {
	font-size: 1.5rem;
    font-weight: 800;
    color: #ffffff;
    font-family: 'Poppins', sans-serif;
    line-height: 1;
}

.pmpro_pricing_card.featured .price_amount {
    color: #ffffff;
}

.pmpro_pricing_card .price_currency {
    font-size: 1.5rem;
    color: #6b7280;
    margin-right: 0.25rem;
}

.pmpro_pricing_card.featured .price_currency {
    color: rgba(255, 255, 255, 0.8);
}

.pmpro_pricing_card .price_period {
    font-size: 1.3rem;
    color: #6b7280;
    margin-left: 0.5rem;
}

.pmpro_pricing_card.featured .price_period {
    color: rgba(255, 255, 255, 0.8);
}

/* Expiration/billing info */
.pmpro_pricing_card .level_expiration {
    font-size: 0.875rem;
    color: #6b7280;
    margin-bottom: 2rem;
    font-style: italic;
}

.pmpro_pricing_card.featured .level_expiration {
    color: rgba(255, 255, 255, 0.7);
}

/* Features list (if you want to add features) */
.pmpro_pricing_features {
    list-style: none;
    padding: 0;
    margin: 2rem 0;
}

.pmpro_pricing_features li {
    padding: 0.5rem 0;
    display: flex;
    align-items: center;
    color: #4b5563;
    font-size: 0.95rem;
}

.pmpro_pricing_card.featured .pmpro_pricing_features li {
    color: rgba(255, 255, 255, 0.9);
}

.pmpro_pricing_features li::before {
    content: "✓";
    display: inline-block;
    width: 1.25rem;
    height: 1.25rem;
    background: #10b981;
    color: white;
    border-radius: 50%;
    text-align: center;
    font-size: 0.75rem;
    line-height: 1.25rem;
    margin-right: 0.75rem;
    font-weight: bold;
}

/* Enhanced buttons */
.pmpro_pricing_card .pmpro_btn {
    width: 100%;
    padding: 1rem 2rem;
    border-radius: 0.75rem;
    font-weight: 600;
    font-size: 1rem;
    text-decoration: none;
    text-align: center;
    transition: all 0.3s ease;
    display: block;
    margin-top: 2rem;
    border: none;
    cursor: pointer;
    font-family: 'Lexend', sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.pmpro_pricing_card .pmpro_btn-select {
    background: linear-gradient(135deg, #ff5e00, #ff7b32);
    color: white;
    box-shadow: 0 4px 14px rgba(255, 94, 0, 0.3);
}

.pmpro_pricing_card .pmpro_btn-select:hover {
    background: linear-gradient(135deg, #e55300, #ff5e00);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 94, 0, 0.4);
}

.pmpro_pricing_card.featured .pmpro_btn-select {
    background: white;
    color: #1e40af;
    font-weight: 700;
}

.pmpro_pricing_card.featured .pmpro_btn-select:hover {
    background: #f8fafc;
    transform: translateY(-2px);
}

.pmpro_pricing_card .pmpro_btn-outline {
    background: transparent;
    color: #6b7280;
    border: 2px solid #e5e7eb;
}

.pmpro_pricing_card .pmpro_btn-outline:hover {
    background: #f9fafb;
    border-color: #d1d5db;
}

.pmpro_pricing_card.featured .pmpro_btn-outline {
    background: transparent;
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.pmpro_pricing_card.featured .pmpro_btn-outline:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.5);
}

/* Section header improvements */
#pmpro_levels .pmpro_section_content {
    background: transparent !important;
    position: relative;
}

.pmpro_level_group .pmpro_card_title {
    text-align: center;
    font-size: 2.5rem;
    font-weight: 700;
    color: #1a202c;
    margin-bottom: 1rem;
    font-family: 'Lexend', sans-serif;
    position: relative;
    padding: 2rem 0;
}

/* Add subtle pattern behind title */
.pmpro_level_group .pmpro_card_title::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 200px;
    height: 100px;
    background-image: radial-gradient(rgba(255, 94, 0, 0.05) 2px, transparent 0);
    background-size: 20px 20px;
    z-index: -1;
    border-radius: 50%;
}

.pmpro_level_group .pmpro_card_title::after {
    content: '';
    display: block;
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, #ff5e00, #ff7b32);
    margin: 1rem auto 2rem;
    border-radius: 2px;
}

/* Add a subtitle if you want */
.pmpro_pricing_subtitle {
    text-align: center;
    font-size: 1.125rem;
    color: #6b7280;
    margin-bottom: 3rem;
    font-family: 'Lexend', sans-serif;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    #pmpro_levels {
        padding: 2rem 1rem;
        margin: 1rem 0;
        border-radius: 1rem;
        background-color: rgba(248, 250, 252, 0.98); /* Slightly more opaque on mobile for better readability */
    }
    
    #pmpro_levels::before {
        opacity: 0.2; /* Slightly less prominent on mobile */
        border-radius: 1rem;
    }
    
    .pmpro_custom_pricing_grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        margin-top: 2rem;
    }
    
    .pmpro_pricing_card.featured {
        transform: none;
        background-color: rgba(30, 64, 175, 0.95); /* Ensure good contrast on mobile */
    }
    
    .pmpro_pricing_card:hover::after {
        opacity: 0.01; /* Even more subtle on mobile */
    }
    
    .pmpro_pricing_card .price_amount {
        font-size: 1.5rem;
    }
    
    .pmpro_level_group .pmpro_card_title {
        font-size: 2rem;
    }
}

/* Animation for cards appearing */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.pmpro_pricing_card {
    animation: fadeInUp 0.6s ease-out forwards;
}

.pmpro_pricing_card:nth-child(2) {
    animation-delay: 0.1s;
}

.pmpro_pricing_card:nth-child(3) {
    animation-delay: 0.2s;
}

/* Hide original table on small screens message */
#pmpro_levels .pmpro_card_content p {
    display: none;
}

/* Optional: Floating pattern animation (uncomment to enable) */
/*
@keyframes floatingPattern {
    0%, 100% { 
        background-position: 0% 0%; 
    }
    50% { 
        background-position: 100% 100%; 
    }
}

#pmpro_levels::before {
    animation: floatingPattern 20s ease-in-out infinite;
}

.pmpro_pricing_card.featured::after {
    animation: floatingPattern 15s ease-in-out infinite reverse;
}
*/

/* Money back guarantee or similar badges */
.pmpro_guarantee_badge {
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    background: #10b981;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 2rem;
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
}

/* Current level indicator */
.pmpro_pricing_card.current_level {
    border: 2px solid #10b981;
}

.pmpro_pricing_card.current_level::before {
    background: linear-gradient(90deg, #10b981, #34d399);
}

.pmpro_pricing_card.current_level .level_name::after {
    content: " (Current)";
    color: #10b981;
    font-size: 0.875rem;
    font-weight: 500;
}





/* Sales Price Container */
.pmpro_pricing_card .level_price {
    margin: 1.5rem 0;
    position: relative;
}

/* Original Price (Strikethrough) */
.pmpro_pricing_card .price_original {
    display: block;
    font-size: 1.1rem;
    color: #9ca3af;
    text-decoration: line-through;
    font-weight: 500;
    margin-bottom: 0.5rem;
    font-family: 'Poppins', sans-serif;
    opacity: 0.8;
}

.pmpro_pricing_card.featured .price_original {
    color: rgba(255, 255, 255, 0.6);
}

/* Sale Price Container */
.pmpro_pricing_card .price_sale {
/*     display: flex; */
    align-items: baseline;
/*     gap: 0.25rem; */
}

/* Update existing price styles to work with sale structure */
.pmpro_pricing_card .price_sale .price_currency {
    font-size: 1.5rem;
    color: #6b7280;
    margin-right: 0.25rem;
}

.pmpro_pricing_card.featured .price_sale .price_currency {
    color: rgba(255, 255, 255, 0.8);
}

.pmpro_pricing_card .price_sale .price_amount {
    font-size: 1.5rem;
    font-weight: 800;
    color: #1f2937;
    font-family: 'Lexend', sans-serif;
    line-height: 1;
}

.pmpro_pricing_card.featured .price_sale .price_amount {
    color: #ffffff;
}

.pmpro_pricing_card .price_sale .price_period {
    font-size: 1.1rem;
    color: #6b7280;
    margin-left: 0.5rem;
}

.pmpro_pricing_card.featured .price_sale .price_period {
    color: rgba(255, 255, 255, 0.8);
}

/* Savings Badge */
.pmpro_pricing_card .price_savings {
    display: inline-block;
    background: #f3f4f6;
    color: #374151;
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-top: 0.5rem;
}

.pmpro_pricing_card.featured .price_savings {
    background: rgba(255, 255, 255, 0.15);
    color: #e5e7eb;
    backdrop-filter: blur(10px);
}

/* Discount Percentage Badge */
.pmpro_pricing_card .price_discount_percent {
    position: absolute;
    top: -12px;
    right: -12px;
    background: #dc2626;
    color: white;
    padding: 0.5rem;
    border-radius: 50%;
    font-size: 0.75rem;
    font-weight: 700;
    min-width: 2.5rem;
    min-height: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    box-shadow: 0 2px 10px rgba(220, 38, 38, 0.2);
}

.pmpro_pricing_card.featured .price_discount_percent {
    background: #ff5e00;
    box-shadow: 0 2px 10px rgba(255, 94, 0, 0.3);
}

/* Hide sale elements when no sale is active */
.pmpro_pricing_card:not(.has_sale) .price_original,
.pmpro_pricing_card:not(.has_sale) .price_savings,
.pmpro_pricing_card:not(.has_sale) .price_discount_percent {
    display: none;
}

/* When no sale, make regular price layout work */
.pmpro_pricing_card:not(.has_sale) .level_price {
    display: flex;
    align-items: baseline;
    gap: 0.25rem;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .pmpro_pricing_card .price_sale .price_amount {
        font-size: 1.5rem;
    }
    
    .pmpro_pricing_card .price_original {
        font-size: 1rem;
    }
    
    .pmpro_pricing_card .price_discount_percent {
        top: -8px;
        right: -8px;
        min-width: 2rem;
        min-height: 2rem;
        font-size: 0.7rem;
    }
}



