/* Full-page plan selector (/start checkout flow). Minimal, table-driven. */

.pl-plan-page {
    --pl-ink: #0e0e0e;
    --pl-muted: #6f6f6f;
    --pl-line: #e4e4e4;
    --pl-line-strong: #d4d4d4;
    --pl-accent: #1774ff;
    position: fixed;
    inset: 0;
    overflow-y: auto;
    background: #fff;
    color: var(--pl-ink);
    font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
    z-index: 1000;
}

body.pl-plan-active {
    overflow: hidden;
}

/* Top bar */
.pl-plan-topbar {
    position: sticky;
    top: 0;
    z-index: 5;
    display: flex;
    align-items: center;
    gap: 24px;
    padding: 16px 28px;
    background: #fff;
    border-bottom: 1px solid var(--pl-line);
}

.pl-plan-logo {
    display: inline-flex;
    align-items: center;
}

.pl-plan-logo img {
    height: 26px;
    width: auto;
    display: block;
}

.pl-plan-breadcrumb {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 12px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--pl-muted);
}

.pl-plan-breadcrumb > span {
    font-size: inherit;
    font-weight: inherit;
    line-height: 1;
    border-bottom: 1px solid transparent;
    padding-bottom: 2px;
}

.pl-plan-breadcrumb .is-active {
    color: inherit;
    border-bottom-color: currentColor;
}

.pl-plan-close {
    margin-left: auto;
    background: none;
    border: none;
    font-size: 28px;
    line-height: 1;
    color: var(--pl-muted);
    cursor: pointer;
    padding: 8px 12px;
    min-width: 44px;
    min-height: 44px;
    touch-action: manipulation;
}

.pl-plan-close:hover {
    color: var(--pl-ink);
}

/* Main */
.pl-plan-main {
    max-width: 1040px;
    margin: 0 auto;
    padding: 48px 28px 96px;
}

.pl-plan-intro {
    max-width: 520px;
    margin-bottom: 40px;
}

.pl-plan-intro h1 {
    margin: 0 0 12px;
    font-size: 30px;
    font-weight: 400;
    letter-spacing: -0.02em;
}

.pl-plan-intro p {
    margin: 0;
    font-size: 15px;
    line-height: 1.6;
    color: var(--pl-muted);
}

/* Plan columns */
.pl-plan-grid {
    display: grid;
    grid-template-columns: repeat(var(--pl-plan-count, 3), 1fr);
    gap: 0;
    border: 1px solid var(--pl-line-strong);
    overflow: hidden;
}

.pl-plan-col {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    border-left: 1px solid var(--pl-line);
}

.pl-plan-col:first-child {
    border-left: none;
}

.pl-plan-col.is-recommended {
    background: #fafafa;
}

.pl-plan-ribbon {
    display: none;
}

.pl-plan-ribbon--empty {
    display: none;
}

.pl-plan-col-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 50px 20px;
    text-align: center;
}

.pl-plan-col-name {
    font-size: 15px;
    font-weight: 600;
}

.pl-plan-col-class {
    margin-top: 4px;
    font-size: 12px;
    color: var(--pl-muted);
}

.pl-plan-col-price {
    display: flex;
    align-items: flex-start;
    gap: 2px;
}

.pl-plan-col-amt {
    font-size: 38px;
    font-weight: 400;
    letter-spacing: -0.03em;
}

.pl-plan-col-per {
    font-size: 13px;
    color: var(--pl-muted);
    margin-bottom: 14px;
}

.pl-plan-col-select {
    width: 100%;
    max-width: 180px;
    padding: 12px 16px;
    border: 1px solid var(--pl-ink);
    border-radius: 8px;
    background: #fff;
    color: var(--pl-ink);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    cursor: pointer;
    transition: background 120ms ease, color 120ms ease;
}

.pl-plan-col-select:hover {
    background: var(--pl-ink);
    color: #fff;
}

.pl-plan-col-select.is-primary {
    background: var(--pl-ink);
    color: #fff;
}

.pl-plan-col-select.is-primary:hover {
    background: #000;
}

/* Comparison table */
.pl-plan-compare {
    margin-top: 28px;
}

.pl-plan-table {
    width: 100%;
    table-layout: fixed;
    border-collapse: collapse;
    font-size: 14px;
}

.pl-plan-table th,
.pl-plan-table td {
    padding: 14px 12px;
    text-align: center;
    vertical-align: top;
    overflow-wrap: break-word;
    border-bottom: 1px solid var(--pl-line);
}

.pl-plan-table thead th {
    font-size: 13px;
    font-weight: 600;
    color: var(--pl-muted);
    border-bottom: 1px solid var(--pl-ink);
}

.pl-plan-th-short {
    display: none;
}

.pl-plan-table .pl-plan-feat-col {
    text-align: left;
    color: var(--pl-ink);
    font-weight: 400;
    width: 40%;
}

.pl-plan-table-note {
    margin: 14px 0 0;
    font-size: 12px;
    line-height: 1.45;
    color: var(--pl-muted);
}

.pl-plan-feat-label {
    display: block;
}

.pl-plan-addon-tag {
    display: inline-block;
    margin-left: 8px;
    padding: 3px 8px;
    border-radius: 6px;
    background: #2563eb;
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    line-height: 1.3;
    letter-spacing: 0.02em;
    vertical-align: middle;
    box-shadow: none;
}

.pl-plan-feat-desc {
    display: block;
    margin-top: 5px;
    font-size: 12px;
    line-height: 1.45;
    font-weight: 400;
    color: var(--pl-muted);
}

.pl-plan-table .pl-plan-feat-col.is-sub {
    padding-left: 30px;
    position: relative;
}

.pl-plan-feat-arrow {
    position: absolute;
    left: 12px;
    color: var(--pl-muted);
}

.pl-plan-table thead .pl-plan-feat-col {
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.pl-plan-group td {
    text-align: left;
    padding-top: 26px;
    padding-bottom: 8px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--pl-muted);
    border-bottom: 1px solid var(--pl-ink);
}

.pl-plan-check {
    color: var(--pl-ink);
    font-size: 15px;
}

.pl-plan-dash {
    color: #cfcfcf;
}

.pl-plan-val {
    font-size: 13px;
    color: var(--pl-ink);
}

/* Checkout step */
.pl-plan-checkout-inner {
    max-width: 460px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.pl-plan-checkout-inner h2 {
    margin: 0;
    font-size: 22px;
    font-weight: 600;
}

.pl-plan-back {
    align-self: flex-start;
    background: none;
    border: none;
    padding: 0;
    color: var(--pl-ink);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}

.pl-plan-payment-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    border: 1px solid var(--pl-line-strong);
    font-size: 15px;
}

#plPlanPaymentElement {
    min-height: 40px;
}

#plPlanPaymentElement.is-loading::after {
    content: "Loading secure payment…";
    display: block;
    font-size: 13px;
    color: var(--pl-muted);
    padding: 8px 0;
}

.pl-plan-error {
    color: #b00020;
    font-size: 13px;
}

.pl-plan-pay {
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: 8px;
    background: var(--pl-ink);
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background 120ms ease;
}

.pl-plan-pay:hover:not(:disabled) {
    background: #000;
}

.pl-plan-pay:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.pl-plan-fineprint {
    margin: 0;
    text-align: center;
    font-size: 12px;
    color: var(--pl-muted);
}

.pl-plan-mandate {
    margin: 14px 0 8px;
    text-align: center;
    font-size: 11px;
    line-height: 1.5;
    color: var(--pl-muted);
}

.pl-plan-mandate a {
    color: inherit;
    text-decoration: underline;
}

.pl-plan-mandate a:hover {
    color: var(--pl-text, #0e0e0e);
}

/* Success */
.pl-plan-success {
    max-width: 460px;
    margin: 40px auto;
    text-align: center;
}

.pl-plan-success h2 {
    margin: 0 0 8px;
    font-size: 22px;
    font-weight: 600;
}

.pl-plan-success p {
    margin: 0;
    color: var(--pl-muted);
}

/* Responsive */
@media (max-width: 760px) {
    .pl-plan-grid {
        grid-template-columns: 1fr;
    }
    .pl-plan-col {
        border-left: none;
        border-top: 1px solid var(--pl-line);
    }
    .pl-plan-col:first-child {
        border-top: none;
    }
    .pl-plan-table {
        font-size: 13px;
    }
    .pl-plan-table th,
    .pl-plan-table td {
        padding: 10px 6px;
    }
    /* Let the left feature-label column wrap first so the plan value columns
       keep enough room to stay on one line. */
    .pl-plan-table .pl-plan-feat-col {
        width: 32%;
    }
    .pl-plan-th-full {
        display: none;
    }
    .pl-plan-th-short {
        display: inline;
    }
    /* Add-on badge drops to its own line, and the row's cells center vertically
       so the value lines up with the (now taller) feature label. */
    .pl-plan-table td {
        vertical-align: middle;
    }
    .pl-plan-addon-tag {
        display: block;
        width: fit-content;
        margin-left: 0;
        margin-top: 5px;
        padding: 3px 9px;
        line-height: 1.3;
    }
    .pl-plan-breadcrumb {
        display: none;
    }
}
