/* --- REVOLUT STYLE PRICING TABLE --- */

.pricing-table-wrapper {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin-bottom: 40px;
    border-radius: 20px;
    background: rgba(10, 15, 30, 0.4);
    border: 1px solid rgba(91, 138, 255, 0.1);
    backdrop-filter: blur(10px);
    /* Add padding to top to accommodate sticking out badges if we want,
       BUT sticky-notes style usually requires overflow visible. 
       Since we need overflow-x scroll, we cannot have overflow visible.
       So the badge MUST be inside the container.
    */
    padding-top: 0;
}

.pricing-table th.is-featured::before {
    content: 'Recommandé';
    position: absolute;
    /* Move it DOWN so it is inside the header, not straddling the top edge */
    top: 12px;
    left: 50%;
    transform: translateX(-50%);
    background: #5b8aff;
    color: #fff;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 12px;
    text-transform: uppercase;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.pricing-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 900px;
    /* Ensure it doesn't squash on mobile */
    table-layout: fixed;
}

.pricing-table th,
.pricing-table td {
    padding: 20px 24px;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    vertical-align: middle;
}

.pricing-table th {
    padding-top: 65px;
    /* Increased further to prevent badge overlap */
    padding-bottom: 30px;
    background: rgba(5, 8, 20, 0.3);
    position: relative;
    vertical-align: top;
}

.pricing-table th.is-featured {
    background: rgba(91, 138, 255, 0.08);
    border-top: 1px solid rgba(91, 138, 255, 0.3);
}



.pricing-table .feature-col {
    width: 200px;
    text-align: left;
    background: transparent;
    border-right: 1px solid rgba(255, 255, 255, 0.05);
}

.pricing-table .feature-label {
    text-align: left;
    font-weight: 600;
    color: rgba(243, 244, 247, 0.8);
    border-right: 1px solid rgba(255, 255, 255, 0.05);
}

.plan-name {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 10px;
    color: #fff;
}

.plan-price {
    font-size: 1.8rem;
    font-weight: 700;
    color: #5b8aff;
    margin-bottom: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.plan-price .period {
    font-size: 0.85rem;
    color: rgba(243, 244, 247, 0.5);
    font-weight: 400;
}

.plan-detail {
    font-size: 0.85rem;
    color: rgba(243, 244, 247, 0.6);
    margin-bottom: 20px;
    min-height: 40px;
    /* Aligns buttons */
}

.check-icon {
    color: #4ade80;
    font-weight: bold;
    font-size: 1.2rem;
}

.cross-icon {
    color: rgba(243, 244, 247, 0.2);
    font-size: 1.2rem;
}

/* Custom Plan Banner */
.custom-plan-banner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
    background: rgba(91, 138, 255, 0.05);
    border: 1px solid rgba(91, 138, 255, 0.25);
    border-radius: 20px;
    padding: 40px;
    margin-top: 10px;
    width: 100%;
    /* Force full width to prevent crushing */
    box-sizing: border-box;
}

.custom-plan-content {
    flex: 1;
    min-width: 300px;
}

.custom-plan-content h3 {
    font-size: 1.8rem;
    color: #fff;
    margin-bottom: 10px;
}

.custom-plan-content p {
    color: rgba(243, 244, 247, 0.7);
    margin-bottom: 20px;
}

.custom-features {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 24px;
    list-style: none;
    padding: 0;
}

.custom-features li {
    position: relative;
    padding-left: 20px;
    color: rgba(243, 244, 247, 0.9);
    font-size: 0.95rem;
}

.custom-features li::before {
    content: '•';
    color: #5b8aff;
    position: absolute;
    left: 0;
    font-weight: bold;
}

.custom-plan-action {
    text-align: center;
    min-width: 200px;
}

.custom-plan-action .price {
    font-size: 1.6rem;
    font-weight: 700;
    color: #5b8aff;
    margin-bottom: 16px;
}

@media (max-width: 900px) {

    .pricing-table td {
        padding: 15px 10px;
        font-size: 0.9rem;
    }

    .pricing-table th {
        padding: 60px 10px 15px;
        /* Increased top padding to 60px for badge space */
        font-size: 0.9rem;
    }

    .pricing-table .feature-col {
        width: 140px;
        /* Removed sticky positioning to avoid the scrolling 'mask' effect */
        /* position: sticky; */
        /* left: 0; */
        background: transparent;
        /* z-index: 2; */
        border-right: 1px solid rgba(91, 138, 255, 0.2);
    }

    .custom-plan-banner {
        flex-direction: column;
        text-align: center;
        padding: 30px 20px;
        margin-top: 40px;
        /* Force separation */
        border-top: 1px solid rgba(255, 255, 255, 0.1);
        background: rgba(10, 15, 30, 0.4) !important;
        /* Ensure it looks distinct */
        border-radius: 20px;
    }

    .custom-features {
        justify-content: center;
    }
}

/* --- MOBILE TABS & TOGGLE --- */

.pricing-desktop-view {
    display: block;
}

.pricing-mobile-view {
    display: none;
}

/* Mobile Tabs Container */
.pricing-mobile-tabs-container {
    display: flex;
    overflow-x: auto;
    gap: 10px;
    padding: 5px 5px 20px 5px;
    margin-bottom: 20px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.pricing-mobile-tabs-container::-webkit-scrollbar {
    display: none;
}

/* Mobile Tab Button */
.pricing-mobile-tab {
    background: rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.6);
    padding: 10px 20px;
    border-radius: 30px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    white-space: nowrap;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.pricing-mobile-tab.is-active {
    background: #5b8aff;
    color: #fff;
    border-color: #5b8aff;
    box-shadow: 0 4px 12px rgba(91, 138, 255, 0.3);
}

/* Mobile Card */
.pricing-mobile-card {
    display: none;
    animation: fadeIn 0.3s ease-out;
}

.pricing-mobile-card.is-active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.mobile-card-header {
    background: rgba(10, 15, 30, 0.6);
    border: 1px solid rgba(91, 138, 255, 0.2);
    border-radius: 20px;
    padding: 30px 20px;
    text-align: center;
    margin-bottom: 20px;
    position: relative;
    backdrop-filter: blur(10px);
}

.mobile-card-header.is-featured {
    background: rgba(91, 138, 255, 0.1);
    border-color: rgba(91, 138, 255, 0.4);
}

.mobile-featured-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: #5b8aff;
    color: #fff;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 12px;
    text-transform: uppercase;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.mobile-card-features {
    background: rgba(10, 15, 30, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    padding: 20px;
}

.feature-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 0.9rem;
}

.feature-row:last-child {
    border-bottom: none;
}

.feature-row .f-label {
    color: rgba(243, 244, 247, 0.7);
    text-align: left;
}

.feature-row .f-value {
    color: #fff;
    font-weight: 600;
    text-align: right;
}

@media (max-width: 900px) {
    .pricing-desktop-view {
        display: none;
    }

    .pricing-mobile-view {
        display: block;
        width: 100%;
        overflow-x: hidden;
    }

    /* Fix overlap issue by forcing block display on parent */
    .pricing__grid {
        display: block !important;
        width: 100% !important;
    }

    /* Constrain custom banner width */
    .custom-plan-banner {
        width: 100% !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        box-sizing: border-box;
    }
}