/*
 * Front page plans: a card per plan, then every feature compared. Colors follow the site (primary #6576ff,
 * text #364a63); muted text is a step darker than the theme's #8094ae so it passes contrast on white.
 */

/* The theme's root hides overflow to stop sideways scrolling; clip does the same without breaking the
   sticky comparison header and plan picker. */
.nk-app-root {
    overflow: clip;
}

.pt {
    --pt-ink: #364a63;
    --pt-text: #526484;
    --pt-muted: #5f7293;
    --pt-line: #e5e9f2;
    --pt-soft: #f5f6fa;
    --pt-primary: #6576ff;
    --pt-primary-ink: #4b5ad8;
    --pt-primary-soft: #f3f4ff;
    --pt-header: 74px;
}

.pt-head {
    max-width: 680px;
    margin: 0 auto 1.75rem;
}

.pt-lead {
    margin: .5rem auto 0;
    color: var(--pt-text);
    font-size: 1rem;
    line-height: 1.6;
}

/* Billing switch */

.pt .pt-cycles {
    display: flex;
    justify-content: center;
    gap: .25rem;
    width: max-content;
    margin: 0 auto 2rem;
    padding: .25rem;
    border: 1px solid var(--pt-line);
    border-radius: 999px;
    background: #fff;
}

.pt .pt-cycles .nav-link {
    margin: 0;
    padding: .5rem 1.25rem;
    border: 0;
    border-radius: 999px;
    color: var(--pt-text);
    font-weight: 500;
}

.pt .pt-cycles .nav-link.active {
    background: var(--pt-primary);
    color: #fff;
}

/* The theme's tabs underline the active tab; the switch shows it as the filled pill instead. */
.pt .pt-cycles .nav-link::before,
.pt .pt-cycles .nav-link::after {
    display: none;
}

/* The free plan: one wide card above the paid plans. */

.pt-free {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) minmax(0, 2fr) auto;
    gap: 1.5rem 2.5rem;
    align-items: center;
    margin-bottom: 2.5rem;
    padding: 1.5rem 2rem;
    border: 1px solid var(--pt-line);
    border-radius: 12px;
    background: var(--pt-soft);
    text-align: left;
}

.pt-free .pt-tagline {
    min-height: 0;
    margin-bottom: .5rem;
}

.pt .pt-free-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 1.5rem;
}

.pt-free-cta {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .375rem;
}

.pt-free-cta .pt-note {
    min-height: 0;
    margin: 0;
}

/* Paid plan cards */

/* Room for the "Most popular" badge, which sits on the featured card's top edge. */
.pt .tab-content {
    overflow: visible;
}

.pt-cards {
    padding-top: .75rem;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1.25rem;
    align-items: stretch;
}

.pt .pt-card {
    position: relative;
    /* The theme's .pricing cards hide overflow, which would cut the "Most popular" badge. */
    overflow: visible;
    display: flex;
    flex-direction: column;
    padding: 1.5rem 1.25rem;
    border: 1px solid var(--pt-line);
    border-radius: 12px;
    background: #fff;
    text-align: left;
}

.pt-card.is-featured {
    border: 2px solid var(--pt-primary);
    box-shadow: 0 12px 32px rgba(101, 118, 255, .14);
}

.pt-badge {
    position: absolute;
    top: 0;
    left: 50%;
    padding: .25rem .75rem;
    border-radius: 999px;
    background: var(--pt-primary);
    color: #fff;
    font-size: .75rem;
    font-weight: 600;
    white-space: nowrap;
    transform: translate(-50%, -50%);
}

.pt-name {
    margin: 0 0 .25rem;
    color: var(--pt-ink);
    font-size: 1.25rem;
    font-weight: 600;
}

.pt-tagline {
    margin: 0 0 1rem;
    color: var(--pt-muted);
    font-size: .875rem;
    line-height: 1.45;
}

.pt .pt-price {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: .25rem .375rem;
}

.pt .pt-price .pt-amount {
    color: var(--pt-ink);
    font-size: 2.25rem;
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -.02em;
}

.pt .pt-price .pt-was {
    flex-basis: 100%;
    color: var(--pt-muted);
    font-size: 1.375rem;
    font-weight: 600;
    text-decoration: line-through;
    text-decoration-color: #e85347;
    text-decoration-thickness: 2px;
}

/* A promotion (the first-year offer or a sale): what it saves, above the price. */
.pt-save {
    display: inline-block;
    align-self: flex-start;
    margin: 0 0 .5rem;
    padding: .25rem .625rem;
    border-radius: 999px;
    background: var(--pt-primary-soft);
    color: var(--pt-primary-ink);
    font-size: .75rem;
    font-weight: 700;
    letter-spacing: .02em;
    line-height: 1.3;
    /* One line on every card, so the prices below stay level. */
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* A running sale (Halloween, Black Friday…) reads apart from the first-year offer, in the sale band's indigo. */
.pt-save.is-sale {
    background: #141c3d;
    color: #fff;
}

.pt-save.is-empty,
.pt .pt-price .pt-was.is-empty {
    visibility: hidden;
}

.pt .pt-price .pt-period,
.pt .pt-period {
    color: var(--pt-muted);
    font-size: .875rem;
}

.pt-note {
    min-height: 2.6em;
    margin: .375rem 0 1rem;
    color: var(--pt-muted);
    font-size: .8125rem;
    line-height: 1.3;
}

.pt-cta {
    display: flex;
    flex-direction: column;
    gap: .5rem;
    margin-bottom: 1.25rem;
}

.pt-cta .btn {
    margin: 0;
}

.pt-trial {
    color: var(--pt-primary-ink);
    font-size: .8125rem;
    text-align: center;
}

.pt-includes {
    margin: 0 0 .5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--pt-line);
    color: var(--pt-ink);
    font-size: .8125rem;
    font-weight: 600;
}

.pt-highlights {
    margin: 0;
    padding: 0;
    list-style: none;
}

.pt-highlights li {
    display: flex;
    gap: .5rem;
    padding: .25rem 0;
    color: var(--pt-text);
    font-size: .875rem;
    line-height: 1.4;
}

.pt-highlights .icon {
    flex: none;
    margin-top: .2em;
    color: var(--pt-primary);
    font-size: .875rem;
}

/* Feature comparison */

.pt-compare {
    margin-top: 4rem;
}

.pt-compare-head {
    max-width: 680px;
    margin: 0 auto 1.5rem;
    text-align: center;
}

.pt-compare-title {
    margin: 0;
    color: var(--pt-ink);
    font-size: 1.75rem;
    font-weight: 500;
}

.pt-compare-head .icon {
    vertical-align: -.1em;
    color: var(--pt-primary);
}

.pt-picker {
    display: none;
}

.pt-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    color: var(--pt-text);
    font-size: .9375rem;
}

.pt-table thead th {
    position: sticky;
    top: var(--pt-header);
    z-index: 3;
    padding: .875rem .75rem;
    border-bottom: 2px solid var(--pt-line);
    background: #fff;
    color: var(--pt-ink);
    font-weight: 600;
    text-align: center;
}

.pt-table thead th.pt-feature-col {
    text-align: left;
}

.pt-table thead th.is-featured {
    color: var(--pt-primary-ink);
}

.pt-table tbody th,
.pt-table td {
    padding: .75rem;
    border-bottom: 1px solid var(--pt-line);
    vertical-align: middle;
}

.pt-table tbody th {
    color: var(--pt-ink);
    font-weight: 400;
    text-align: left;
}

.pt-table td {
    width: 13%;
    text-align: center;
}

.pt-table td.is-featured,
.pt-table thead th.is-featured {
    background: var(--pt-primary-soft);
}

.pt-table .pt-group th {
    padding: .75rem;
    border-top: 1.5rem solid #fff;
    border-bottom: 1px solid var(--pt-line-strong, #dbdfea);
    background: var(--pt-soft);
    color: #101924;
    font-size: .875rem;
    font-weight: 700;
    letter-spacing: .05em;
    text-transform: uppercase;
}

.pt-yes {
    color: var(--pt-primary);
    font-size: 1.125rem;
}

.pt-no {
    color: #b7c2d0;
}

.pt-text {
    color: var(--pt-ink);
    font-size: .875rem;
    font-weight: 500;
}

/* Feature explanations: always in the page; shown on hover, focus or tap. */

.pt-feature {
    position: relative;
    display: inline;
}

.pt-last {
    white-space: nowrap;
}

.pt-tip {
    display: inline-grid;
    place-items: center;
    width: 1.375rem;
    height: 1.375rem;
    margin: -.25rem 0 -.25rem .25rem;
    padding: 0;
    vertical-align: -.05em;
    border: 0;
    border-radius: 50%;
    background: none;
    color: var(--pt-muted);
    cursor: help;
}

.pt-tip:hover,
.pt-tip:focus-visible {
    color: var(--pt-primary-ink);
}

.pt-tip:focus-visible {
    outline: 2px solid var(--pt-primary);
    outline-offset: 1px;
}

.pt-tip-text {
    position: absolute;
    top: calc(100% + .5rem);
    left: 0;
    z-index: 4;
    width: max-content;
    max-width: min(300px, 80vw);
    padding: .5rem .75rem;
    border-radius: 6px;
    background: #1f2b3a;
    box-shadow: 0 8px 24px rgba(31, 43, 58, .2);
    color: #fff;
    font-size: .8125rem;
    font-weight: 400;
    line-height: 1.45;
    opacity: 0;
    pointer-events: none;
    transform: translateY(-2px);
    transition: opacity .15s ease, transform .15s ease, visibility .15s;
    visibility: hidden;
}

.pt-feature:hover .pt-tip-text,
.pt-last:has(.pt-tip:focus-visible) + .pt-tip-text,
.pt-feature.is-open .pt-tip-text {
    opacity: 1;
    transform: none;
    visibility: visible;
}

@media (prefers-reduced-motion: reduce) {
    .pt-tip-text {
        transition: none;
    }
}

/* Four cards in a row: three lines for every tagline, so the prices line up. */
@media (min-width: 1200px) {
    .pt-cards .pt-tagline {
        min-height: 4.35em;
    }
}

/* Narrower screens */

@media (max-width: 1199.98px) {
    .pt-cards {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .pt-free {
        grid-template-columns: minmax(0, 1fr) auto;
    }

    .pt-free-list {
        grid-column: 1 / -1;
        grid-row: 2;
    }
}

@media (max-width: 991.98px) {

    .pt-tagline,
    .pt-note {
        min-height: 0;
    }
}

/* More AI credits: the WPIDE AI add-on, under the plan cards. */
.pt-ai {
    margin: 3rem auto 0;
    padding: 2rem;
    border: 1px solid var(--pt-line);
    border-radius: 16px;
    background: var(--pt-soft);
}

.pt-ai-head {
    max-width: 640px;
    margin: 0 auto 1.5rem;
    text-align: center;
}

.pt-ai-title {
    margin: 0 0 .5rem;
    color: var(--pt-ink);
    font-size: 1.5rem;
    font-weight: 700;
}

.pt-ai-lead {
    margin: 0;
    color: var(--pt-text);
    font-size: .9375rem;
}

.pt-ai-cards {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1rem;
}

.pt-ai-card {
    display: flex;
    flex-direction: column;
    padding: 1.25rem;
    border: 1px solid var(--pt-line);
    border-radius: 12px;
    background: #fff;
}

.pt-ai-card.is-featured {
    border: 2px solid var(--pt-primary);
}

.pt-ai-name {
    margin: 0;
    color: var(--pt-ink);
    font-size: 1.0625rem;
    font-weight: 700;
}

.pt-ai-credits {
    margin: .25rem 0 .75rem;
    color: var(--pt-text);
    font-size: .875rem;
}

.pt-ai-price {
    margin: 0 0 1rem;
    color: var(--pt-muted);
    font-size: .875rem;
}

.pt-ai-price b {
    color: var(--pt-ink);
    font-size: 1.5rem;
    font-weight: 700;
}

.pt-ai-price small {
    display: block;
    margin-top: .125rem;
    font-size: .8125rem;
}

.pt-ai-card .pt-ai-buy {
    margin-top: auto;
}

@media (max-width: 991.98px) {
    .pt-ai-cards {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 575.98px) {
    .pt-ai {
        padding: 1.25rem;
    }

    .pt-ai-cards {
        grid-template-columns: 1fr;
    }
}

/* Phones: one card per row, and the comparison shows one plan beside the features. */
@media (max-width: 767.98px) {
    .pt-cards {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .pt-free {
        grid-template-columns: 1fr;
        padding: 1.25rem;
    }

    .pt .pt-free-list {
        grid-template-columns: 1fr;
    }

    .pt-free-cta {
        align-items: stretch;
        text-align: center;
    }

    .pt-picker {
        position: sticky;
        top: var(--pt-header);
        z-index: 5;
        display: flex;
        gap: .25rem;
        margin: 0 -16px 1rem;
        padding: .5rem 16px;
        overflow-x: auto;
        background: #fff;
        scrollbar-width: none;
    }

    .pt-pick {
        flex: none;
        padding: .375rem .875rem;
        border: 1px solid var(--pt-line);
        border-radius: 999px;
        background: #fff;
        color: var(--pt-text);
        font-size: .875rem;
        font-weight: 500;
    }

    .pt-pick.is-active {
        border-color: var(--pt-primary);
        background: var(--pt-primary);
        color: #fff;
    }

    .pt-table thead {
        display: none;
    }

    .pt-table td {
        width: 34%;
    }

    .pt-table[data-pt-show="free"] [data-pt-col]:not([data-pt-col="free"]),
    .pt-table[data-pt-show="basic"] [data-pt-col]:not([data-pt-col="basic"]),
    .pt-table[data-pt-show="plus"] [data-pt-col]:not([data-pt-col="plus"]),
    .pt-table[data-pt-show="pro"] [data-pt-col]:not([data-pt-col="pro"]),
    .pt-table[data-pt-show="top"] [data-pt-col]:not([data-pt-col="top"]) {
        display: none;
    }

    .pt-table td.is-featured {
        background: none;
    }
}
