/* Pricing page. Scoped to .pricing-page so nothing leaks into other pages
   (pricing.css is still used by law-enforcement.hbs and is left alone). */

.pricing-page {
    --accent: #6A0DAD;
    --accent-light: #cdb3e6;
    --panel: #26262C;
    --panel-2: #202026;
    --line: #3a3a42;
    --muted: #b0b0b0;

    max-width: 1060px;
    margin: 0 auto;
    padding: 24px 20px 56px;
    color: #fff;
    text-align: center;
}

.pricing-page h1 {
    font-size: 2.2rem;
    margin: 12px 0 8px;
}

.pricing-page h2 {
    font-size: 1.6rem;
    margin: 0 0 18px;
}

.plans-sub {
    color: var(--muted);
    margin: 0 0 36px;
}

/* ---------- plans ---------- */
.plans {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 22px;
    align-items: stretch;
    margin-bottom: 18px;
}

.plan {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 30px 22px 24px;
    transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}

.plan:hover {
    transform: translateY(-4px);
    border-color: rgba(155, 89, 182, .6);
    box-shadow: 0 14px 30px rgba(0, 0, 0, .35);
}

.plan.is-featured {
    border-color: var(--accent);
    background: linear-gradient(180deg, rgba(106, 13, 173, .18), var(--panel) 55%);
    box-shadow: 0 10px 34px rgba(106, 13, 173, .28);
}

.plan-badge {
    position: absolute;
    top: -13px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--accent);
    color: #fff;
    font-size: .78rem;
    font-weight: bold;
    letter-spacing: .04em;
    text-transform: uppercase;
    padding: 5px 14px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, .35);
    white-space: nowrap;
}

.pricing-page .plan-name {
    font-size: 1.15rem;
    font-weight: normal;
    color: var(--muted);
    margin: 0 0 6px;
}

.plan-credits {
    display: block;
    font-size: 2.6rem;
    line-height: 1.1;
    font-weight: bold;
    color: #fff;
}

.plan-price {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--accent-light);
    margin: 10px 0 2px;
}

.plan-unit {
    color: var(--muted);
    font-size: .92rem;
    margin: 0 0 14px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px 8px;
    justify-content: center;
    align-items: center;
}

.plan-save {
    background: rgba(46, 160, 67, .16);
    border: 1px solid rgba(46, 160, 67, .45);
    color: #7ee08f;
    font-size: .78rem;
    font-weight: bold;
    padding: 2px 8px;
    border-radius: 999px;
}

.plan-desc {
    color: #aaa;
    font-size: .95rem;
    line-height: 1.45;
    margin: 0 0 22px;
    /* pushes every button to the same line whatever the text length */
    flex: 1;
}

.plan-buy {
    display: block;
    width: 100%;
    box-sizing: border-box;
    padding: 12px 20px;
    border-radius: 9px;
    background: transparent;
    border: 1px solid var(--accent);
    color: #fff;
    font-weight: bold;
    text-decoration: none;
    transition: background .2s ease, box-shadow .2s ease, transform .2s ease;
}

.plan.is-featured .plan-buy {
    background: var(--accent);
}

.plan-buy:hover,
.plan-buy:focus-visible {
    background: #7d29d2;
    box-shadow: 0 6px 18px rgba(106, 13, 173, .45);
    outline: none;
}

.plans-note {
    color: var(--muted);
    font-size: .92rem;
    margin: 0 0 30px;
}

.plans-note a {
    color: #b79ad6;
    font-weight: bold;
}

/* ---------- special access ---------- */
.special {
    max-width: 760px;
    margin: 0 auto 56px;
    text-align: left;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 12px;
    overflow: hidden;
}

.special[open] {
    border-color: var(--accent);
}

.special summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 16px 20px;
    cursor: pointer;
    list-style: none;
    font-weight: bold;
}

.special summary::-webkit-details-marker {
    display: none;
}

.special summary:hover {
    background: rgba(106, 13, 173, .12);
}

.special summary:focus-visible {
    outline: 2px solid var(--accent-light);
    outline-offset: -2px;
}

.special-chevron {
    color: var(--accent-light);
    flex: none;
    transition: transform .25s ease;
}

.special[open] .special-chevron {
    transform: rotate(180deg);
}

.special-list {
    display: grid;
    gap: 10px;
    padding: 0 16px 16px;
}

.special-item {
    display: flex;
    gap: 14px;
    align-items: center;
    background: var(--panel-2);
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 12px 16px 12px 12px;
    color: #ddd;
    text-decoration: none;
    line-height: 1.4;
    cursor: pointer;
    transition: border-color .2s ease, background .2s ease, transform .2s ease;
}

.special-item:hover,
.special-item:focus-visible {
    border-color: var(--accent);
    background: #2a2a33;
    outline: none;
}

.special-item:focus-visible {
    box-shadow: 0 0 0 2px var(--accent-light);
}

/* The icon sits in a fixed square tile, so a wide or narrow glyph can never look stretched */
.special-icon {
    box-sizing: border-box;
    flex: none;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 10px;
    background: rgba(106, 13, 173, .2);
    border: 1px solid rgba(106, 13, 173, .45);
    color: var(--accent-light);
}

.special-icon svg {
    display: block;
    width: 22px;
    height: 22px;
    flex: none;
}

.special-body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

/* link-coloured and underlined so it reads as a link at a glance */
.special-name {
    color: #c9aef0;
    font-weight: bold;
    text-decoration: underline;
    text-decoration-color: rgba(201, 174, 240, .45);
    text-underline-offset: 3px;
}

.special-item:hover .special-name {
    color: #fff;
    text-decoration-color: currentColor;
}

.special-desc {
    color: var(--muted);
    font-size: .92rem;
}

.special-go {
    flex: none;
    width: 20px;
    height: 20px;
    color: var(--accent-light);
    transition: transform .2s ease;
}

.special-item:hover .special-go,
.special-item:focus-visible .special-go {
    transform: translateX(4px);
    color: #fff;
}

/* ---------- comparison ---------- */
.compare {
    margin-bottom: 56px;
}

.compare-scroll {
    overflow-x: auto;
    border: 1px solid var(--line);
    border-radius: 12px;
}

.compare-table {
    width: 100%;
    min-width: 560px;
    border-collapse: collapse;
    text-align: left;
}

.compare-table th,
.compare-table td {
    padding: 15px 18px;
    border-bottom: 1px solid var(--line);
    vertical-align: top;
    line-height: 1.45;
}

.compare-table tbody tr:last-child > * {
    border-bottom: 0;
}

.compare-table thead th {
    background: var(--panel-2);
    color: #ddd;
    font-size: .9rem;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.compare-table tbody th {
    color: #fff;
    font-weight: bold;
    white-space: nowrap;
}

.compare-table td {
    color: #ccc;
}

.compare-table .is-none {
    color: #888;
}

.compare-table .col-premium {
    background: rgba(106, 13, 173, .13);
}

.compare-table thead .col-premium {
    background: rgba(106, 13, 173, .3);
    color: #fff;
}

.compare-table .more {
    display: inline-block;
    margin-left: 6px;
    background: rgba(106, 13, 173, .25);
    border: 1px solid rgba(106, 13, 173, .5);
    color: var(--accent-light);
    font-size: .8rem;
    font-weight: bold;
    padding: 1px 8px;
    border-radius: 999px;
    white-space: nowrap;
}

/* ---------- benefits ---------- */
.benefits {
    max-width: 760px;
    margin: 0 auto 56px;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 26px 26px 20px;
    text-align: left;
}

.benefits h2 {
    text-align: center;
    font-size: 1.4rem;
}

.benefits ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.benefits li {
    position: relative;
    padding: 9px 0 9px 32px;
    color: #ddd;
    line-height: 1.5;
}

.benefits li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 12px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: rgba(106, 13, 173, .25) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23cdb3e6' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12 5 5 9-10'/%3E%3C/svg%3E") center / 12px no-repeat;
    border: 1px solid rgba(106, 13, 173, .55);
    box-sizing: border-box;
}

.benefits strong {
    color: #fff;
    text-shadow: 0 0 8px rgba(106, 13, 173, .7);
}

/* ---------- showcase ---------- */
.showcase-image {
    display: block;
    max-width: min(100%, 780px);
    height: auto;
    margin: 0 auto;
    border-radius: 12px;
    border: 1px solid var(--line);
    box-shadow: 0 10px 30px rgba(0, 0, 0, .4);
}

.showcase-note {
    margin: 12px 0 0;
    color: #aaa;
    font-size: .92rem;
}

/* ---------- narrow screens ---------- */
@media (max-width: 860px) {
    .plans {
        grid-template-columns: minmax(0, 420px);
        justify-content: center;
        gap: 26px;
    }

    .pricing-page h1 {
        font-size: 1.8rem;
    }

    .plans-note {
        line-height: 1.7;
    }
}

/* Phones: a three-column table would hide the Premium column behind a sideways
   scroll, so each row becomes a small card with labelled lines instead. */
@media (max-width: 600px) {
    .compare-scroll {
        border: 0;
        overflow: visible;
    }

    .compare-table,
    .compare-table tbody,
    .compare-table tr,
    .compare-table th,
    .compare-table td {
        display: block;
        min-width: 0;
        width: auto;
    }

    .compare-table thead {
        /* visually hidden, still read by screen readers */
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip: rect(0 0 0 0);
    }

    .compare-table tbody tr {
        background: var(--panel);
        border: 1px solid var(--line);
        border-radius: 12px;
        margin-bottom: 14px;
        overflow: hidden;
    }

    .compare-table tbody th {
        background: var(--panel-2);
        white-space: normal;
        border-bottom: 1px solid var(--line);
    }

    .compare-table td {
        border-bottom: 1px solid var(--line);
    }

    .compare-table tbody tr td:last-child {
        border-bottom: 0;
    }

    .compare-table td::before {
        content: attr(data-label);
        display: block;
        margin-bottom: 3px;
        color: #9b9ba7;
        font-size: .75rem;
        font-weight: bold;
        text-transform: uppercase;
        letter-spacing: .04em;
    }

    /* a blank cell would otherwise leave a lone label */
    .compare-table td:empty {
        display: none;
    }

    .compare-table .col-premium::before {
        color: var(--accent-light);
    }
}

@media (max-width: 480px) {
    .pricing-page {
        padding: 16px 14px 40px;
    }

    .compare-table th,
    .compare-table td {
        padding: 12px;
    }

    .benefits {
        padding: 20px 16px 14px;
    }
}

@media (prefers-reduced-motion: reduce) {

    .plan,
    .plan-buy,
    .special-chevron,
    .special-item,
    .special-go {
        transition: none;
    }

    .plan:hover {
        transform: none;
    }
}
