/* Premium page (/pricing), on the site design system (tg.css). Only --tg-* tokens and
   .tg-premium-* classes; tg.css loads after this file, so anything here that adjusts a
   shared component is scoped under .tg-premium to win on specificity, never by order. */

/* ===== Hero ========================================================== */

.tg-section.tg-premium-hero {
    padding-bottom: calc(var(--tg-section) * 0.45);
}

.tg-premium-hero-actions {
    justify-content: center;
}

.tg-premium-hero-chips {
    justify-content: center;
}

/* ===== Plans ========================================================= */

.tg-premium .tg-premium-plans {
    grid-template-columns: repeat(auto-fit, minmax(min(250px, 100%), 1fr));
    gap: var(--tg-space-4);
}

.tg-premium .tg-premium-plan {
    gap: var(--tg-space-3);
}

.tg-premium-plan-top {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: var(--tg-space-2);
    min-height: 32px;
}

.tg-premium .tg-premium-plan-for {
    color: var(--tg-text);
}

.tg-premium .tg-premium-plan .tg-plan-price {
    margin-top: var(--tg-space-2);
    flex-wrap: wrap;
}

.tg-premium .tg-premium-plan-terms {
    color: var(--tg-text-soft);
    font-size: var(--tg-size-small);
}

.tg-premium .tg-premium-plan-equiv {
    margin-top: calc(-1 * var(--tg-space-2));
    color: var(--tg-text-faint);
    font-size: var(--tg-size-small);
}

.tg-premium .tg-premium-plan .tg-ticks {
    padding-block: var(--tg-space-3) var(--tg-space-2);
    border-top: 1px solid var(--tg-line);
    font-size: 0.95rem;
}

/* Buttons line up along the bottom of the row however long each card is. tg.css's
   `.tg-card > .tg-btn` (later, same weight as `.tg-plan .tg-btn`) would otherwise put each
   one straight under its list, so this is scoped to win. */
.tg-premium .tg-premium-plan > .tg-btn {
    align-self: stretch;
    margin-top: auto;
}

.tg-premium .tg-premium-plan-note {
    color: var(--tg-text-faint);
    font-size: var(--tg-size-small);
}

/* Lifetime is the plan billing-config.json highlights. A firmer border and a lift, no motion. */
.tg-premium .tg-premium-plan--featured {
    box-shadow: var(--tg-shadow-lift), 0 0 0 1px rgb(244 183 64 / 30%) inset;
}

.tg-premium-plans-foot {
    max-width: 70ch;
    margin: var(--tg-space-5) auto 0;
    color: var(--tg-text-faint);
    font-size: var(--tg-size-small);
    text-align: center;
}

/* ===== Comparison ===================================================== */

.tg-premium .tg-premium-compare .tg-card p.tg-small {
    margin-top: auto;
    color: var(--tg-text-faint);
}

.tg-premium-every {
    margin-top: var(--tg-space-5);
}

.tg-premium-table-scroll {
    max-width: 100%;
    overflow-x: auto;
}

.tg-premium-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
}

.tg-premium-table :is(th, td) {
    padding: 10px 8px;
    border-bottom: 1px solid var(--tg-line);
    text-align: left;
    vertical-align: middle;
}

.tg-premium-table thead th {
    position: sticky;
    top: 0;
    background: var(--tg-surface-1);
    color: var(--tg-text-faint);
    font-family: var(--tg-font-display);
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.tg-premium-table thead th:not(:first-child),
.tg-premium-table td {
    width: 76px;
    text-align: center;
}

.tg-premium-table tbody th[scope='row'] {
    color: var(--tg-text);
    font-weight: 500;
}

.tg-premium-table-group th {
    padding-top: var(--tg-space-5);
    color: #ffffff;
    font-family: var(--tg-font-display);
    font-weight: 600;
}

.tg-premium-table tbody:first-of-type .tg-premium-table-group th {
    padding-top: var(--tg-space-3);
}

/* A tick for "included", a short dash for "not included". The words are in the cell for
   screen readers (.tg-visually-hidden); the marks are decoration. */
.tg-premium-table td::before {
    content: '';
    display: inline-block;
}

.tg-premium-table td[data-has='yes']::before {
    width: 14px;
    height: 8px;
    border-left: 2px solid var(--tg-success);
    border-bottom: 2px solid var(--tg-success);
    transform: translateY(-2px) rotate(-45deg);
}

.tg-premium-table tbody:last-of-type td[data-has='yes']::before {
    border-color: var(--tg-premium);
}

.tg-premium-table td[data-has='no']::before {
    width: 10px;
    height: 2px;
    border-radius: 2px;
    background: var(--tg-text-faint);
    opacity: 0.6;
}

@media (max-width: 480px) {
    .tg-premium-table {
        font-size: var(--tg-size-small);
    }

    .tg-premium-table :is(th, td) {
        padding: 9px 4px;
    }

    .tg-premium-table thead th {
        font-size: 0.72rem;
        letter-spacing: 0;
    }

    .tg-premium-table thead th:not(:first-child),
    .tg-premium-table td {
        width: 58px;
    }

    .tg-premium .tg-premium-every .tg-faq-body {
        padding-inline: 12px;
    }
}

/* ===== Trial ========================================================== */

.tg-premium .tg-premium-trial {
    display: grid;
    gap: var(--tg-space-5);
    align-items: center;
    grid-template-columns: minmax(0, 1fr) auto;
    padding: clamp(24px, 4vw, 48px);
}

.tg-premium .tg-premium-trial .tg-h2 {
    margin: 0;
    font-size: clamp(1.5rem, 1.6vw + 0.9rem, 2.1rem);
}

.tg-premium .tg-premium-trial p {
    max-width: 58ch;
}

@media (max-width: 820px) {
    .tg-premium .tg-premium-trial {
        grid-template-columns: minmax(0, 1fr);
    }
}

/* ===== FAQ and the small print ======================================== */

.tg-premium .tg-faq-body a,
.tg-premium-legal a {
    color: #c6d1ff;
}

.tg-premium-legal {
    display: grid;
    gap: var(--tg-space-3);
    margin-top: var(--tg-space-6);
}

.tg-premium-legal p {
    margin: 0;
}

/* ===== Phones ========================================================= */

@media (max-width: 600px) {
    .tg-premium-hero-actions .tg-btn {
        width: 100%;
    }

    .tg-premium-hero-chips li {
        font-size: 0.8rem;
    }
}
