/* =========================================
   PRICING & PLANS SECTION STYLES
   ========================================= */

/* Hide pricing section by default until feature flag is checked */
#pricing-section {
    display: none;
}

.pricing-section {
    padding: 30px 0;
    position: relative;
    z-index: 10;
}

.pricing-header-section {
    text-align: center;
    margin-bottom: 40px;
}

.pricing-title {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 15px;
    background: linear-gradient(135deg, #fff 0%, #e0e0e0 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

.pricing-subtitle {
    font-size: 1.2rem;
    color: var(--glass-text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

/* Toggle Switch Styles (Mobile Only) */
.pricing-toggle-container {
    display: none; /* Hidden on desktop by default */
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-bottom: 30px;
}

.toggle-label {
    font-size: 1.1rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.6);
    transition: color 0.3s;
    cursor: pointer;
}

.toggle-label.active {
    color: #fff;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

.toggle-label.free-label.active {
    color: #10b981;
    text-shadow: 0 0 15px rgba(16, 185, 129, 0.5);
}

.toggle-label.vip-label.active {
    color: #45e0f9;
    text-shadow: 0 0 15px rgba(69, 224, 249, 0.5);
}

.switch {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 34px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: .4s;
}

.slider:before {
    position: absolute;
    content: "";
    height: 26px;
    width: 26px;
    left: 4px;
    bottom: 3px;
    background-color: white;
    transition: .4s;
    box-shadow: 0 2px 5px rgba(0,0,0,0.3);
}

input:checked + .slider {
    background-color: rgba(16, 185, 129, 0.2);
    border-color: #10b981;
}

input:checked + .slider:before {
    transform: translateX(26px);
    background-color: #10b981;
    box-shadow: 0 0 15px rgba(16, 185, 129, 0.8);
}

/* Specific style for FREE state (unchecked) */
input:not(:checked) + .slider {
    background-color: rgba(16, 185, 129, 0.2);
    border-color: #10b981;
}

input:not(:checked) + .slider:before {
    background-color: #10b981;
    box-shadow: 0 0 15px rgba(16, 185, 129, 0.8);
}

/* Specific style for VIP state (unchecked - left side) */
input:not(:checked) + .slider {
    background-color: rgba(69, 224, 249, 0.3);
    border-color: #45e0f9;
}

input:not(:checked) + .slider:before {
    background-color: #45e0f9;
    box-shadow: 0 0 15px rgba(69, 224, 249, 0.8);
}

.slider.round {
    border-radius: 34px;
}

.slider.round:before {
    border-radius: 50%;
}

/* Pricing Grid / Flip Container */
.pricing-wrapper {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 15px;
    /* Desktop default: Grid */
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
}

.pricing-card-inner {
    display: contents; /* Desktop: Children behave as grid items */
}

/* Base Card Styles */
.pricing-card {
    background: var(--cs-glass-surface, rgba(255, 255, 255, 0.03));
    backdrop-filter: blur(var(--cs-glass-blur, 12px));
    -webkit-backdrop-filter: blur(var(--cs-glass-blur, 12px));
    border-radius: 24px;
    border: 1px solid var(--cs-glass-border, rgba(255, 255, 255, 0.08));
    padding: 40px 30px;
    display: flex;
    flex-direction: column;
    position: relative;
    transition: all 0.4s ease;
    overflow: hidden;
    height: 100%;
    min-height: 550px; /* Ensure equal height */
}

.pricing-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.4);
}

/* FREE Card Styles - Matching badge-regular green */
.pricing-card.free-card {
    border-top: 4px solid #10b981;
}

.pricing-card.free-card .pricing-icon {
    color: #10b981;
    filter: drop-shadow(0 0 10px rgba(16, 185, 129, 0.3));
}

.pricing-card.free-card .pricing-btn {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1) 0%, rgba(16, 185, 129, 0.2) 100%);
    border: 1px solid #10b981;
    color: #10b981;
}

.pricing-card.free-card .pricing-btn:hover {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: #fff;
    box-shadow: 0 0 20px rgba(16, 185, 129, 0.4);
}

/* VIP Card Styles */
.pricing-card.vip-card {
    border-top: 4px solid #45e0f9;
    background: linear-gradient(145deg, rgba(69, 224, 249, 0.05) 0%, rgba(0, 0, 0, 0.2) 100%);
}

.pricing-card.vip-card .pricing-icon {
    color: #45e0f9;
    filter: drop-shadow(0 0 10px rgba(69, 224, 249, 0.3));
}

.pricing-card.vip-card .pricing-btn {
    background: linear-gradient(135deg, #45e0f9 0%, #0085c3 100%);
    color: #000;
    box-shadow: 0 4px 20px rgba(69, 224, 249, 0.3);
    border: none;
}

.pricing-card.vip-card .pricing-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(69, 224, 249, 0.5);
}

.popular-badge {
    position: absolute;
    top: 20px;
    left: -35px;
    background: linear-gradient(90deg, #45e0f9, #0085c3);
    color: #000;
    font-weight: 800;
    font-size: 0.8rem;
    padding: 5px 40px;
    transform: rotate(-45deg);
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
    z-index: 2;
}

/* Content Styles */
.pricing-icon {
    font-size: 3rem;
    margin-bottom: 20px;
    text-align: center;
}

.pricing-plan-name {
    font-size: 1.8rem;
    font-weight: 800;
    text-align: center;
    margin-bottom: 10px;
    color: #fff;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.pricing-price {
    font-size: 2.5rem;
    font-weight: 800;
    text-align: center;
    margin-bottom: 10px;
    color: #fff;
}

.pricing-price span {
    font-size: 1rem;
    font-weight: 400;
    color: rgba(255,255,255,0.6);
}

.pricing-desc {
    text-align: right;
    color: rgba(255,255,255,0.7);
    margin-bottom: 30px;
    font-size: 0.95rem;
    min-height: 44px; /* Alignment */
}

.pricing-features {
    list-style: none;
    padding: 0;
    margin: 0 0 30px 0;
    flex-grow: 1;
    text-align: right;
}

.pricing-features li {
    display: flex;
    align-items: flex-start;
    margin-bottom: 15px;
    color: #eaf8ff;
    font-size: 0.95rem;
    line-height: 1.4;
}

.pricing-features li i {
    margin-left: 10px;
    color: #22c55e;
    font-size: 1.1rem;
    flex-shrink: 0;
    margin-top: 3px;
}

.pricing-features li.disabled {
    color: rgba(255,255,255,0.3);
    text-decoration: line-through;
}

.pricing-features li.disabled i {
    color: rgba(255,255,255,0.2);
}

.pricing-btn {
    width: 100%;
    padding: 15px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 1.1rem;
    text-align: center;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    display: inline-block;
    margin-top: auto;
}

.pricing-disclaimer {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.5);
    font-style: italic;
    margin-top: 15px;
    text-align: right;
    line-height: 1.4;
}

/* =========================================
   MOBILE FLIP ANIMATION
   ========================================= */
@media (max-width: 768px) {
    .pricing-toggle-container {
        display: flex;
    }

    .pricing-section {
        padding-left: 0;
        padding-right: 0;
    }

    .pricing-wrapper {
        display: block; /* Remove grid */
        perspective: 1000px; /* Enable 3D space */
        height: 650px; /* Fixed height for flip container */
        position: relative;
        padding: 0 5px; /* Minimal padding on mobile - closer to edge */
        max-width: 100%; /* Full width on mobile */
    }

    .pricing-card-inner {
        display: block; /* Remove contents display */
        position: relative;
        width: 100%;
        height: 100%;
        text-align: center;
        transition: transform 0.8s;
        transform-style: preserve-3d;
    }

    /* Flip Class applied by JS */
    .pricing-wrapper.flipped .pricing-card-inner {
        transform: rotateY(180deg);
    }

    .pricing-card {
        position: absolute;
        width: 100%;
        height: 100%;
        backface-visibility: hidden; /* Hide back side */
        -webkit-backface-visibility: hidden;
        top: 0;
        left: 0;
    }

    .pricing-card:hover {
        transform: none; /* Disable hover lift on mobile */
    }

    /* Front Side (FREE) */
    .pricing-card.free-card {
        z-index: 2;
        transform: rotateY(0deg);
    }

    /* Back Side (VIP) */
    .pricing-card.vip-card {
        transform: rotateY(180deg);
        z-index: 1;
    }
}
