/* Modern Pricing Section Styles */
.modern-pricing-section {
    padding: 60px 0;
    position: relative;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    overflow: hidden;
}

.background-orbs {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    z-index: 1;
}

.background-orbs .orb {
    position: absolute;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(151, 71, 255, 0.1), rgba(151, 71, 255, 0.05));
    animation: float 6s ease-in-out infinite;
}

.background-orbs .orb-1 {
    width: 300px;
    height: 300px;
    top: 10%;
    left: -150px;
    animation-delay: 0s;
}

.background-orbs .orb-2 {
    width: 200px;
    height: 200px;
    top: 60%;
    right: -100px;
    animation-delay: 2s;
}

.background-orbs .orb-3 {
    width: 150px;
    height: 150px;
    top: 80%;
    left: 20%;
    animation-delay: 4s;
}

@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(180deg); }
}

/* Section Header */
.modern-section-header {
    text-align: center;
    margin-bottom: 40px;
    position: relative;
    z-index: 2;
}

.modern-section-subtitle {
    display: inline-block;
    background: linear-gradient(135deg, #9747ff, #6366f1);
    color: white;
    padding: 8px 24px;
    border-radius: 50px;
    font-size: 0.875rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    margin-bottom: 16px;
    box-shadow: 0 4px 16px rgba(151, 71, 255, 0.2);
}

.modern-section-title {
    font-size: 2.5rem;
    font-weight: 800;
    color: #1a1a1a;
    line-height: 1.2;
    margin-bottom: 16px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

/* Billing Toggle */
.modern-billing-toggle {
    display: flex;
    justify-content: center;
    margin-bottom: 40px;
}

.billing-toggle-container {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    padding: 6px;
    border-radius: 50px;
    border: 1px solid rgba(151, 71, 255, 0.15);
    box-shadow: 0 8px 32px rgba(151, 71, 255, 0.1);
    position: relative;
}

.billing-toggle-label {
    font-size: 16px;
    font-weight: 600;
    color: #6b7280;
    transition: all 0.3s ease;
    cursor: pointer;
    padding: 12px 20px;
    border-radius: 25px;
    position: relative;
    z-index: 2;
}

.billing-toggle-label.active {
    color: #ffffff;
    background: linear-gradient(135deg, #9747ff, #6366f1);
    box-shadow: 0 4px 16px rgba(151, 71, 255, 0.3);
    transform: translateY(-1px);
}

.billing-toggle-label:not(.active):hover {
    color: #9747ff;
    background: rgba(151, 71, 255, 0.1);
}

.billing-toggle-wrapper {
    position: relative;
    width: 0;
    height: 0;
    display: none;
}

.billing-toggle-input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    pointer-events: none;
}

.billing-toggle-slider {
    display: none;
}

/* Modern Pricing Grid */
.modern-pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
    align-items: stretch;
}

/* Modern Pricing Cards */
.modern-pricing-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(151, 71, 255, 0.1);
    border-radius: 16px;
    padding: 24px 20px;
    position: relative;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 24px rgba(151, 71, 255, 0.06);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.modern-pricing-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(151, 71, 255, 0.02), rgba(151, 71, 255, 0.05));
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 0;
}

.modern-pricing-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 48px rgba(151, 71, 255, 0.12);
    border-color: rgba(151, 71, 255, 0.2);
}

.modern-pricing-card:hover::before {
    opacity: 1;
}

/* Recommended Card */
.modern-pricing-card.recommended {
    border: 2px solid #9747ff;
    box-shadow: 0 8px 40px rgba(151, 71, 255, 0.2);
    transform: translateY(-4px);
    padding-top: 60px; /* Increase top padding to accommodate badge inside card */
}

.modern-pricing-card.recommended::before {
    opacity: 1;
}

.modern-recommended-badge {
    position: absolute;
    top: 12px; /* Position badge inside the card */
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, #9747ff 0%, #6366f1 100%);
    color: white;
    padding: 8px 20px; /* Slightly larger padding for better visibility */
    border-radius: 20px; /* Make it fully rounded for modern look */
    font-size: 0.75rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center; /* Ensure content is centered within the badge */
    gap: 4px;
    z-index: 10;
    box-shadow: 0 4px 12px rgba(151, 71, 255, 0.3);
    text-align: center; /* Additional centering for text */
    white-space: nowrap; /* Prevent text wrapping */
}

.modern-recommended-badge svg {
    width: 12px;
    height: 12px;
}

/* Card Header */
.pricing-card-header {
    text-align: center;
    margin-bottom: 16px;
    position: relative;
    z-index: 2;
}

.plan-name {
    font-size: 1.125rem;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 4px;
}

.plan-description {
    font-size: 0.8rem;
    color: #6b7280;
    line-height: 1.3;
    margin: 0;
}

/* Price Display */
.pricing-card-price {
    text-align: center;
    margin-bottom: 20px;
    position: relative;
    z-index: 2;
}

.price-display {
    margin-bottom: 6px;
}

.price-display.billed-yearly-label,
.price-display.billed-lifetime-label {
    display: none;
}

.price-value {
    font-size: 2rem;
    font-weight: 800;
    color: #1a1a1a;
    line-height: 1;
}

.price-value.special {
    font-size: 1.75rem;
    background: linear-gradient(135deg, #9747ff, #6366f1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.price-period {
    font-size: 0.875rem;
    color: #6b7280;
    font-weight: 500;
}

/* Features Section */
.pricing-card-features {
    margin-bottom: 20px;
    position: relative;
    z-index: 2;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.features-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 12px;
    text-align: center;
}

.features-list {
    list-style: none;
    padding: 0;
    margin: 0;
    flex-grow: 1;
}

.feature-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 8px 0;
    transition: all 0.2s ease;
    font-size: 0.85rem;
    color: #4b5563;
    line-height: 1.5;
}

.feature-item:hover {
    background: rgba(151, 71, 255, 0.02);
    border-radius: 6px;
    padding-left: 4px;
    padding-right: 4px;
}

.feature-text {
    flex: 1;
    margin: 0;
    padding: 0;
}

.feature-icon {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-top: 2px;
}

.feature-item.feature-enabled .feature-icon {
    background: rgba(34, 197, 94, 0.15);
    color: #9c50ff; /* Set explicit color for currentColor inheritance */
}

.feature-item.feature-disabled .feature-icon {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444; /* Set explicit color for currentColor inheritance */
}

.feature-item:not(.feature-enabled):not(.feature-disabled) .feature-icon {
    background: rgba(151, 71, 255, 0.15);
    color: #9c50ff; /* Set explicit color for currentColor inheritance */
}

.feature-icon svg {
    width: 12px !important;
    height: 12px !important;
    stroke-width: 2.5;
    flex-shrink: 0;
}

/* Default enabled features (tick icons) - purple color */
.feature-item.feature-enabled .feature-icon svg,
.feature-item:not(.feature-enabled):not(.feature-disabled) .feature-icon svg {
    fill: #9c50ff !important;
    color: #9c50ff !important;
}

/* Disabled features (X icons) - red color */
.feature-item.feature-disabled .feature-icon svg {
    fill: #ef4444 !important;
    color: #ef4444 !important;
}

/* Additional specificity to override any inherited colors */
.modern-pricing-card .feature-item.feature-enabled .feature-icon svg,
.modern-pricing-card .feature-item:not(.feature-enabled):not(.feature-disabled) .feature-icon svg {
    fill: #9c50ff !important;
    color: #9c50ff !important;
}

.modern-pricing-card .feature-item.feature-disabled .feature-icon svg {
    fill: #ef4444 !important;
    color: #ef4444 !important;
}

/* Target path elements directly to override currentColor */
.feature-item.feature-enabled .feature-icon svg path,
.feature-item:not(.feature-enabled):not(.feature-disabled) .feature-icon svg path,
.modern-pricing-card .feature-item.feature-enabled .feature-icon svg path,
.modern-pricing-card .feature-item:not(.feature-enabled):not(.feature-disabled) .feature-icon svg path {
    fill: #9c50ff !important;
}

.feature-item.feature-disabled .feature-icon svg path,
.modern-pricing-card .feature-item.feature-disabled .feature-icon svg path {
    fill: #ef4444 !important;
}

/* Force override any global SVG styles with maximum specificity */
.modern-pricing-section .modern-pricing-card .pricing-card-features .features-list .feature-item.feature-enabled .feature-icon svg,
.modern-pricing-section .modern-pricing-card .pricing-card-features .features-list .feature-item:not(.feature-enabled):not(.feature-disabled) .feature-icon svg {
    fill: #9c50ff !important;
    color: #9c50ff !important;
}

.modern-pricing-section .modern-pricing-card .pricing-card-features .features-list .feature-item.feature-disabled .feature-icon svg {
    fill: #ef4444 !important;
    color: #ef4444 !important;
}

/* Also target path elements directly with maximum specificity */
.modern-pricing-section .modern-pricing-card .pricing-card-features .features-list .feature-item.feature-enabled .feature-icon svg path,
.modern-pricing-section .modern-pricing-card .pricing-card-features .features-list .feature-item:not(.feature-enabled):not(.feature-disabled) .feature-icon svg path {
    fill: #9c50ff !important;
}

.modern-pricing-section .modern-pricing-card .pricing-card-features .features-list .feature-item.feature-disabled .feature-icon svg path {
    fill: #ef4444 !important;
}

/* Ensure icon containers have correct color for currentColor inheritance */
.modern-pricing-section .modern-pricing-card .pricing-card-features .features-list .feature-item.feature-enabled .feature-icon,
.modern-pricing-section .modern-pricing-card .pricing-card-features .features-list .feature-item:not(.feature-enabled):not(.feature-disabled) .feature-icon {
    color: #9c50ff !important;
}

.modern-pricing-section .modern-pricing-card .pricing-card-features .features-list .feature-item.feature-disabled .feature-icon {
    color: #ef4444 !important;
}
.modern-pricing-section .feature-item.feature-enabled .feature-icon svg,
.modern-pricing-section .feature-item:not(.feature-enabled):not(.feature-disabled) .feature-icon svg {
    fill: #9c50ff !important;
    color: #9c50ff !important;
}

.modern-pricing-section .feature-item.feature-disabled .feature-icon svg {
    fill: #ef4444 !important;
    color: #ef4444 !important;
}

.modern-pricing-section .feature-item.feature-enabled .feature-icon svg path,
.modern-pricing-section .feature-item:not(.feature-enabled):not(.feature-disabled) .feature-icon svg path {
    fill: #9c50ff !important;
}

.modern-pricing-section .feature-item.feature-disabled .feature-icon svg path {
    fill: #ef4444 !important;
}

.feature-item strong {
    color: #1a1a1a;
    font-weight: 600;
}

/* Card Action */
.pricing-card-action {
    position: relative;
    z-index: 2;
    margin-top: auto;
}

.modern-button {
    width: 100%;
    padding: 12px 24px;
    border: none;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.875rem;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.modern-button.primary {
    background: linear-gradient(135deg, #9747ff 0%, #6366f1 100%);
    color: white;
    box-shadow: 0 4px 16px rgba(151, 71, 255, 0.3);
}

.modern-button.primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(151, 71, 255, 0.4);
}

.modern-button.secondary {
    background: rgba(151, 71, 255, 0.1);
    color: #9747ff;
    border: 1px solid rgba(151, 71, 255, 0.2);
}

.modern-button.secondary:hover {
    background: rgba(151, 71, 255, 0.15);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(151, 71, 255, 0.2);
}

.modern-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

.button-icon {
    width: 16px;
    height: 16px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .modern-pricing-section {
        padding: 60px 0;
    }
    
    .modern-section-title {
        font-size: 2rem;
    }
    
    .modern-pricing-grid {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 0 16px;
    }
    
    .billing-toggle-container {
        gap: 4px;
        padding: 4px;
    }
    
    .billing-toggle-label {
        padding: 10px 16px;
        font-size: 14px;
    }
    
    .modern-pricing-card {
        padding: 20px 16px;
    }
    
    .modern-pricing-card.recommended {
        padding-top: 56px; /* Adjust top padding for mobile */
    }
    
    .modern-recommended-badge {
        top: 10px; /* Adjust badge position for mobile */
        padding: 6px 16px; /* Smaller padding on mobile */
        font-size: 0.7rem; /* Slightly smaller font on mobile */
        left: 50%; /* Ensure it stays centered on mobile */
        transform: translateX(-50%); /* Ensure center transform is maintained */
    }
    
    .plan-name {
        font-size: 1rem;
    }
    
    .price-value {
        font-size: 1.75rem;
    }
    
    .price-value.special {
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    .modern-section-header {
        margin-bottom: 40px;
    }
    
    .modern-billing-toggle {
        margin-bottom: 40px;
    }
    
    .modern-pricing-grid {
        padding: 0 12px;
    }
}
