/* Package cards (monthly / 3 months / lifetime), shared by the homepage and
   the subscribe page. Stacked on phones, side by side from 900px. */
.plan-cards {
    gap: 1.25rem;
}

.plan-cards:not(.hidden) {
    display: grid;
}

@media (min-width: 900px) {
    .plan-cards {
        grid-template-columns: repeat(var(--plan-count, 3), minmax(0, 1fr));
    }
}

/* Stacked cards don't need equal price boxes, and the recommended 3 months
   comes first, then the long package, monthly last */
@media (max-width: 899px) {
    .plan-cards .plan-card__price {
        min-height: 0;
    }

    .plan-card[data-plan="quarterly"] {
        order: 1;
    }

    .plan-card[data-plan="lifetime"],
    .plan-card[data-plan="semiannual"] {
        order: 2;
    }

    .plan-card[data-plan="monthly"] {
        order: 3;
    }
}

.plan-card {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: .85rem;
    padding: 1.6rem 1.25rem 1.25rem;
    color: #fff;
    text-align: center;
    background: rgba(255, 255, 255, .03);
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: 1rem;
    transition: border-color .18s ease, transform .18s ease;
}

.plan-card:hover {
    border-color: color-mix(in oklch, oklch(0.9 0.18 124.92) 55%, transparent);
    transform: translateY(-3px);
}

.plan-card.is-featured {
    background: color-mix(in oklch, oklch(0.9 0.18 124.92) 7%, transparent);
    border-color: oklch(0.9 0.18 124.92);
}

.plan-card__tag {
    position: absolute;
    top: -.85rem;
    left: 50%;
    transform: translateX(-50%);
    padding: .2rem .85rem;
    color: #111;
    background: oklch(0.9 0.18 124.92);
    border-radius: 999px;
    font-size: .75rem;
    font-weight: 800;
    white-space: nowrap;
}

.plan-card__name {
    margin: 0;
    font-size: 1.4rem;
    font-weight: 800;
}

.plan-card__hint {
    margin: -.6rem 0 0;
    color: #9ca3af;
    font-size: .85rem;
}

.plan-card__price {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: .2rem;
    /* Same height in every card so the feature lists line up */
    min-height: 9.25rem;
    padding: .8rem .75rem;
    background: rgba(0, 0, 0, .28);
    border: 1px solid rgba(255, 255, 255, .1);
    border-radius: .75rem;
}

.plan-card__amount {
    color: #9ca3af;
    font-size: .85rem;
}

.plan-card__amount b {
    color: oklch(0.9 0.18 124.92);
    font-size: 2.1rem;
    line-height: 1.15;
}

.plan-card__amount--usd b {
    font-size: 1.5rem;
}

/* Upgrade to lifetime: what the days left took off the price */
.plan-upgrade {
    color: oklch(0.9 0.18 124.92);
    font-size: .78rem;
    font-weight: 700;
    line-height: 1.6;
}

/* Price before the discount, struck through above the price */
.plan-was {
    color: #9ca3af;
    font-size: 1rem;
    font-weight: 700;
    text-decoration: line-through;
    text-decoration-color: #f87171;
    text-decoration-thickness: 2px;
}

.plan-card__per-month {
    color: #9ca3af;
    font-size: .78rem;
}

.plan-badge {
    display: inline-block;
    padding: .1rem .5rem;
    color: #111;
    background: oklch(0.9 0.18 124.92);
    border-radius: 999px;
    font-size: .7rem;
    font-weight: 800;
    white-space: nowrap;
}

.plan-card__features {
    margin: 0;
    padding: 0;
    list-style: none;
    text-align: right;
}

.plan-card__features li {
    display: flex;
    align-items: center;
    gap: .6rem;
    padding: .45rem 0;
    color: #d1d5db;
    border-bottom: 1px solid rgba(255, 255, 255, .07);
    font-size: .85rem;
}

.plan-card__features svg {
    flex: none;
    width: 1.1rem;
    height: 1.1rem;
    color: oklch(0.9 0.18 124.92);
}

/* Seat counter of the limited lifetime offer */
.plan-seats {
    display: flex;
    flex-direction: column;
    gap: .35rem;
    padding: .55rem .75rem;
    background: color-mix(in oklch, oklch(0.9 0.18 124.92) 6%, transparent);
    border: 1px dashed color-mix(in oklch, oklch(0.9 0.18 124.92) 50%, transparent);
    border-radius: .75rem;
}

.plan-seats__row {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: .25rem .5rem;
    white-space: nowrap;
    color: #e5e7eb;
    font-size: .85rem;
    font-weight: 700;
}

.plan-seats__row b {
    color: oklch(0.9 0.18 124.92);
    font-size: 1.1rem;
}

.plan-seats__row .plan-seats__sold {
    color: #9ca3af;
    font-size: .75rem;
    font-weight: 400;
    white-space: nowrap;
}

.plan-seats__bar {
    height: .45rem;
    overflow: hidden;
    background: rgba(255, 255, 255, .08);
    border-radius: 999px;
}

.plan-seats__bar span {
    display: block;
    height: 100%;
    background: oklch(0.9 0.18 124.92);
    border-radius: inherit;
}

/* Counter sits right above the card's button */
.plan-card .plan-seats {
    margin-top: auto;
}

.plan-card .plan-seats + .plan-card__cta {
    margin-top: 0;
}

.plan-card__cta {
    margin-top: auto;
    padding: .75rem 1rem;
    color: oklch(0.9 0.18 124.92);
    background: transparent;
    border: 1px solid oklch(0.9 0.18 124.92);
    border-radius: .75rem;
    font-family: inherit;
    font-weight: 800;
    cursor: pointer;
    transition: background-color .18s ease, color .18s ease;
}

.plan-card__cta:hover,
.plan-card.is-featured .plan-card__cta {
    color: #111;
    background: oklch(0.9 0.18 124.92);
}

.plan-card__cta:focus-visible {
    outline: 2px solid oklch(0.9 0.18 124.92);
    outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
    .plan-card,
    .plan-card__cta {
        transition: none;
    }
}
