/*
 * /tseny/ mobile containment fix (v7)
 * Keeps the pricing page inside the viewport and makes wide price tables
 * horizontally scrollable inside their own container.
 */

.pricing-page__table-scroll {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    margin: 24px 0;
    border: 1px solid rgba(0, 0, 0, 0.05);
    border-radius: 20px;
    box-sizing: border-box;
}

.pricing-page__table-scroll > table {
    margin: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
}

@media (max-width: 767px) {
    body.tp-pricing-page {
        max-width: 100%;
        overflow-x: hidden;
    }

    body.tp-pricing-page .pricing-page {
        width: 100%;
        max-width: 100%;
        min-width: 0;
        margin: 0 auto;
        padding: 28px 16px 110px;
        overflow: hidden;
        box-sizing: border-box;
    }

    body.tp-pricing-page .pricing-page__content {
        width: 100%;
        max-width: 100%;
        min-width: 0;
        overflow: hidden;
        box-sizing: border-box;
    }

    body.tp-pricing-page .pricing-page__content h1 {
        max-width: 100%;
        margin: 0 0 20px;
        font-size: 25px;
        line-height: 1.25;
        overflow-wrap: break-word;
        word-break: normal;
    }

    body.tp-pricing-page .pricing-page__content .inner-p,
    body.tp-pricing-page .pricing-page__content .inner-p *,
    body.tp-pricing-page .pricing-content-card,
    body.tp-pricing-page .pricing-content-card * {
        max-width: 100%;
        min-width: 0;
        box-sizing: border-box;
    }

    body.tp-pricing-page .pricing-page__content .inner-p {
        width: 100%;
        overflow-wrap: break-word;
        word-break: normal;
        white-space: normal !important;
    }

    body.tp-pricing-page .pricing-page__content .inner-p a,
    body.tp-pricing-page .pricing-page__content .inner-p strong,
    body.tp-pricing-page .pricing-page__content .inner-p em,
    body.tp-pricing-page .pricing-page__content .inner-p span {
        white-space: normal !important;
        overflow-wrap: break-word;
    }

    body.tp-pricing-page .pricing-content-card {
        display: flex;
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        min-height: 0;
        margin: 0 0 16px !important;
        padding: 22px 20px;
        overflow: hidden;
    }

    body.tp-pricing-page .pricing-content-card h2 {
        font-size: 20px;
        line-height: 1.3;
        overflow-wrap: break-word;
    }

    body.tp-pricing-page .pricing-content-card ul,
    body.tp-pricing-page .pricing-page__content ul {
        width: 100%;
        max-width: 100%;
        margin: 0;
        padding-left: 18px;
        box-sizing: border-box;
    }

    body.tp-pricing-page .pricing-content-card li,
    body.tp-pricing-page .pricing-page__content li {
        max-width: 100%;
        overflow-wrap: break-word;
        word-break: normal;
    }

    body.tp-pricing-page .pricing-page__table-scroll {
        width: 100%;
        max-width: 100%;
        margin: 20px 0;
        overflow-x: auto;
        overflow-y: hidden;
        overscroll-behavior-x: contain;
    }

    body.tp-pricing-page .pricing-page__table-scroll > table {
        display: table !important;
        width: max-content !important;
        min-width: 100%;
        max-width: none !important;
        white-space: nowrap;
    }

    body.tp-pricing-page .pricing-page__table-scroll th,
    body.tp-pricing-page .pricing-page__table-scroll td {
        padding: 10px 9px;
        font-size: 12px;
        line-height: 18px;
        white-space: nowrap;
    }

    /* The fixed mobile bar must always use the viewport, not a wide table. */
    body.tp-pricing-page #footer-bar {
        left: 0;
        right: 0;
        width: 100vw;
        max-width: 100vw;
        box-sizing: border-box;
    }

    body.tp-pricing-page #footer-bar .inner {
        width: 100%;
        max-width: 100%;
        display: flex;
    }

    body.tp-pricing-page #footer-bar .inner > div {
        flex: 0 0 33.333333%;
        width: 33.333333%;
        max-width: 33.333333%;
        min-width: 0;
    }
}
