/* Quick buy (27 Nov 2026, David: as few steps as possible, help in a pop-up on the same page). One <dialog id="qb"> per page:
   a plan card's button opens its choices, each choice goes straight to the card / PayPal checkout; "How it works" opens the steps. */
.qb { position: fixed; inset: 0; margin: auto; height: fit-content; width: min(560px, calc(100vw - 32px)); max-height: calc(100vh - 48px); overflow: auto; padding: 1.4rem 1.2rem 1.1rem;
    border: 1px solid var(--border); border-radius: 20px; background: var(--bg-card, #16131f); color: inherit;
    box-shadow: 0 24px 80px rgba(0,0,0,0.6); }
.qb::backdrop { background: rgba(6,5,12,0.72); backdrop-filter: blur(3px); }
.qb-x { position: absolute; top: 0.6rem; right: 0.7rem; width: 36px; height: 36px; border-radius: 10px; border: 1px solid var(--border);
    background: transparent; color: inherit; font-size: 1.3rem; line-height: 1; cursor: pointer; }
.qb-x:hover { background: rgba(255,255,255,0.06); }
.qb h3 { font-size: 1.35rem; margin: 0 2.4rem 0.2rem 0; }
.qb .bestfor { color: var(--text-muted); font-size: 0.88rem; margin: 0 0 0.9rem; }
.qb .tiers { display: grid; gap: 0.9rem; grid-template-columns: 1fr; }
.qb .tier { border: 0; padding: 0; background: none; box-shadow: none; }
.qb .tier + .tier { border-top: 1px solid var(--border); padding-top: 0.9rem; }
.qb .price-badge, .qb .feat { display: none; }
.qb .opt { display: grid; grid-template-columns: 1fr auto; gap: 0.2rem 0.9rem; align-items: center; padding: 0.8rem 0.9rem;
    border: 1px solid var(--border); border-radius: 14px; margin-bottom: 0.6rem; background: rgba(255,255,255,0.025); }
.qb .opt.best { border-color: var(--accent-light); background: rgba(76,175,80,0.07); }
.qb .opt-name { font-weight: 700; display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; }
.qb .tag { font-size: 0.72rem; font-weight: 700; padding: 0.15rem 0.55rem; border-radius: 999px; color: #fff;
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end)); }
.qb .opt .price-amount { font-size: 1.45rem; margin: 0; line-height: 1.1; }
.qb .opt-sub { color: var(--text-muted); font-size: 0.83rem; }
.qb .opt-sub .save { color: var(--accent-light); font-weight: 600; }
.qb .opt-right { grid-row: 1 / span 2; grid-column: 2; }
.qb .opt .btn { padding: 0.6rem 1.15rem; white-space: nowrap; }
.qb-trust { display: flex; flex-wrap: wrap; gap: 0.4rem 0.9rem; justify-content: center; list-style: none; padding: 0; margin: 0.4rem 0 0;
    color: var(--text-secondary); font-size: 0.82rem; }
.qb-trust li::before { content: "\2713"; color: var(--accent-light); margin-right: 0.3rem; font-weight: 700; }
.qb-after { color: var(--text-secondary); font-size: 0.88rem; text-align: center; margin: 0.7rem 0 0; }
.qb-after a, .qb a:not(.btn) { color: var(--accent-light); }
.qb .steps { list-style: none; padding: 0; margin: 0.8rem 0 0; display: grid; gap: 0.7rem; }
.qb .steps li { display: flex; gap: 0.8rem; align-items: flex-start; padding: 0.8rem 0.9rem; border-radius: 14px;
    border: 1px solid var(--border); background: rgba(255,255,255,0.025); }
.qb .step-ico { flex: none; width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center;
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end)); }
.qb .step-ico svg { width: 20px; height: 20px; stroke: #fff; }
.qb .steps li > div > strong { display: block; margin-bottom: 0.15rem; }
.qb .steps span { color: var(--text-secondary); font-size: 0.9rem; }
.qb .steps a[href*="help.html#activate"] { display: none; }   /* inside the pop-up the steps ARE the answer */
.qb-more { color: var(--text-secondary); font-size: 0.88rem; margin: 0.8rem 0 0; }
@media (max-width: 480px) { .qb .opt { grid-template-columns: 1fr; } .qb .opt-right { grid-row: auto; grid-column: 1; order: 3; margin-top: 0.4rem; }
    .qb .opt .btn { width: 100%; justify-content: center; } }
/* the slim "after paying" line that replaces the three step cards on buy.html */
.buy-after { text-align: center; color: var(--text-secondary); margin: 1.4rem auto 0; max-width: 720px; }
.buy-after a { color: var(--accent-light); font-weight: 600; }

/* ---- the checkout inside the pop-up: our header and order line, Paddle's payment form below (inline, one page) ---- */
.qb-brand { display: flex; align-items: center; gap: 0.55rem; margin: 0 2.6rem 0.9rem 0; font-size: 1.2rem; }
.qb-brand img { border-radius: 9px; }
.qb-secure { margin-left: auto; font-size: 0.78rem; color: var(--text-secondary); border: 1px solid var(--border); border-radius: 999px; padding: 0.25rem 0.7rem; white-space: nowrap; }
.qb-secure::before { content: "\1F512"; margin-right: 0.35rem; font-size: 0.8em; }
.qb-order { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 0.85rem 1rem; border-radius: 14px;
    border: 1px solid var(--accent-light); background: rgba(76,175,80,0.07); }
.qb-order strong { display: block; }
.qb-order span { color: var(--text-muted); font-size: 0.84rem; }
.qb-total { font-size: 1.5rem; font-weight: 800; white-space: nowrap; }
.qb-tax { color: var(--text-muted); font-size: 0.78rem; margin: 0.35rem 0 0.7rem; text-align: right; }
.qb-status { color: var(--text-secondary); text-align: center; margin: 1.2rem 0; }
.dvx-pay { min-height: 0; }
.dvx-pay:empty { display: none; }
.dvx-demo { border: 1px dashed var(--border); border-radius: 14px; padding: 3.2rem 1rem; text-align: center; color: var(--text-secondary); }
.qb { box-sizing: border-box; overflow-x: hidden; overflow-y: auto; color-scheme: dark; }
.qb-brand { margin-right: 3rem; }
@media (max-width: 480px) { .qb-brand { flex-wrap: wrap; } .qb-brand strong { flex: 1 1 60%; } .qb-secure { margin-left: 0; } }
.qb { scrollbar-width: thin; scrollbar-color: rgba(255,255,255,0.25) transparent; }
/* David, 27 Nov: the checkout wider, with the logo and order beside Paddle's form so nobody has to scroll */
.qb.qb-wide { width: min(960px, calc(100vw - 24px)); max-height: calc(100vh - 16px); padding: 1.1rem 1.2rem 0.9rem; }
@media (min-width: 820px) {
    .qb-wide [data-qb-group="pay"]:not([hidden]) { display: grid; grid-template-columns: 290px minmax(0, 1fr); column-gap: 1.5rem; align-items: start; }
    .qb-wide [data-qb-group="pay"] > * { grid-column: 1; }
    .qb-wide [data-qb-group="pay"] > .dvx-pay { grid-column: 2; grid-row: 1 / span 12; }
    .qb-wide [data-qb-group="pay"] > .qb-status { grid-column: 2; grid-row: 1; align-self: center; }
    .qb-wide .qb-brand { flex-wrap: wrap; margin: 0.2rem 0 1rem; font-size: 1.35rem; }
    .qb-wide .qb-secure { margin-left: 0; flex-basis: auto; }
    .qb-wide .qb-brand strong { flex: 1 1 50%; }
    .qb-wide .qb-order { flex-direction: column; align-items: flex-start; gap: 0.5rem; }
    .qb-wide .qb-tax { text-align: left; margin-bottom: 1rem; }
    .qb-wide .qb-after { text-align: left; margin-top: 0.4rem; }
    .qb-wide .dvx-pay { margin-right: 2.6rem; }   /* clear of the close button */
}
@media (min-width: 820px) { .qb.qb-wide { padding: 0.7rem 1.2rem 0.3rem; max-height: calc(100vh - 8px); } .qb-wide .qb-x { top: 0.5rem; } }
/* David, 27 Nov: the choices compact - everything visible without scrolling. Tighter rows everywhere in the pop-up; the
   hour packs put Standard and Professional side by side. */
.qb h3 { font-size: 1.15rem; margin-bottom: 0.1rem; }
.qb .bestfor { font-size: 0.82rem; margin-bottom: 0.55rem; }
.qb .opt { padding: 0.5rem 0.75rem; margin-bottom: 0.4rem; border-radius: 12px; gap: 0 0.7rem; }
.qb .opt-name { font-size: 0.92rem; }
.qb .opt .price-amount { font-size: 1.2rem; }
.qb .opt-sub { font-size: 0.78rem; }
.qb .opt .btn { padding: 0.42rem 0.9rem; font-size: 0.88rem; }
.qb .tag { font-size: 0.66rem; padding: 0.1rem 0.45rem; }
.qb-trust { margin-top: 0.2rem; font-size: 0.78rem; }
.qb-after { font-size: 0.84rem; margin-top: 0.45rem; }
.qb.qb-two { width: min(820px, calc(100vw - 24px)); padding: 1.1rem 1.1rem 0.9rem; }
.qb-two [data-qb-group="hours"] > h3 { font-size: 1.25rem; }
@media (min-width: 640px) {
    .qb-two .tiers { grid-template-columns: 1fr 1fr; gap: 0 1.1rem; }
    .qb-two .tier + .tier { border-top: 0; padding-top: 0; border-left: 1px solid var(--border); padding-left: 1.1rem; }
}
/* phones: keep each choice on ONE row (price left, button right) instead of a full-width button under it */
@media (max-width: 480px) {
    .qb .opt { grid-template-columns: 1fr auto; }
    .qb .opt-right { grid-row: 1 / span 2; grid-column: 2; order: 0; margin-top: 0; }
    .qb .opt .btn { width: auto; }
}
@media (min-width: 640px) { .qb-two .tier .bestfor { min-height: 2.6em; } }   /* the two columns' rows line up */
/* David, 27 Nov: the two columns' boxes LEVEL whatever the wording wraps to - both columns share the same rows (subgrid:
   title, description, then the three packs), so a two-line description on one side makes that row taller on both. */
@media (min-width: 640px) {
    .qb-two .tier .bestfor { line-height: 1.4; min-height: 2.8em; margin-bottom: 0.5rem; }   /* older browsers: room for two lines */
    @supports (grid-template-rows: subgrid) {
        .qb-two .tiers { grid-template-rows: repeat(5, auto); }
        .qb-two .tier { display: grid; grid-template-rows: subgrid; grid-row: span 5; }
        .qb-two .tier .bestfor { min-height: 0; }
    }
}

/* phones: 100vh includes the hidden address bar, so the bottom of the pop-up could sit off-screen - use the visible height */
@supports (height: 100dvh) {
    .qb { max-height: calc(100dvh - 48px); }
    .qb.qb-wide { max-height: calc(100dvh - 16px); }
}
@media (min-width: 820px) { @supports (height: 100dvh) { .qb.qb-wide { max-height: calc(100dvh - 8px); } } }
