/*
 * North License Server – price table ([north_license_buy]).
 *
 * Every colour is a variable, so a theme can adapt it (e.g. in Blocksy: Customizer → Additional CSS):
 *   .nls-buy { --nls-buy-accent: #e65616; --nls-buy-accent-ink: #fff; }
 * Defaults follow the theme: the accent is Blocksy's palette colour 1 when it exists, text and surfaces are mixed
 * from the surrounding text colour, so the table reads on light and dark backgrounds alike.
 * theme="light" / theme="dark" on the shortcode forces a palette.
 */
.nls-buy {
	--nls-buy-accent: var(--theme-palette-color-1, #2563EB);
	--nls-buy-accent-ink: #fff;
	--nls-buy-ink: currentColor;
	--nls-buy-muted: color-mix(in srgb, currentColor 68%, transparent);
	--nls-buy-surface: color-mix(in srgb, currentColor 4%, transparent);
	--nls-buy-surface-strong: color-mix(in srgb, currentColor 7%, transparent);
	--nls-buy-border: color-mix(in srgb, currentColor 16%, transparent);
	--nls-buy-ok: var(--theme-palette-color-1, #14A3A1);
	--nls-buy-radius: 16px;
	--nls-buy-focus: var(--nls-buy-accent);
	color: var(--nls-buy-ink);
	margin: 1.5em 0;
}
.nls-buy.is-light {
	--nls-buy-ink: #1d2327;
	--nls-buy-muted: #50575e;
	--nls-buy-surface: #ffffff;
	--nls-buy-surface-strong: #f4f6f9;
	--nls-buy-border: #E5E7EB;
	color: #1d2327;
}
.nls-buy.is-dark {
	--nls-buy-ink: #f1f5f7;
	--nls-buy-muted: #b6c1c6;
	--nls-buy-surface: #1a2326;
	--nls-buy-surface-strong: #202b2f;
	--nls-buy-border: rgba(255, 255, 255, .14);
	color: #f1f5f7;
}
/* Browsers without color-mix(): plain, readable fallbacks. */
@supports not (color: color-mix(in srgb, red 50%, transparent)) {
	.nls-buy { --nls-buy-muted: currentColor; --nls-buy-surface: rgba(127, 127, 127, .06); --nls-buy-surface-strong: rgba(127, 127, 127, .1); --nls-buy-border: rgba(127, 127, 127, .3); }
}

.nls-buy__notice { padding: .75em 1em; border-radius: 10px; background: var(--nls-buy-surface-strong); border: 1px solid var(--nls-buy-border); }
.nls-pricing { margin: 0 0 2.5em; }
.nls-buy__top { display: flex; flex-direction: column; align-items: center; gap: 1em; margin: 0 0 2em; text-align: center; }
.nls-buy__intro { max-width: 46em; margin: 0; font-size: 1.1em; line-height: 1.5; color: var(--nls-buy-muted); }
.nls-pricing__head { display: flex; align-items: center; gap: 14px; margin-bottom: 1.25em; }
.nls-pricing__titles { min-width: 0; }
.nls-pricing__title { margin: 0; font-size: 1.4em; line-height: 1.25; color: inherit; }
.nls-pricing__tagline { margin: .2em 0 0; color: var(--nls-buy-muted); }
.nls-pricing__icon { display: inline-flex; align-items: center; justify-content: center; flex: none; width: 2.75em; height: 2.75em; border-radius: 14px; background: color-mix(in srgb, var(--nls-buy-accent) 14%, transparent); color: var(--nls-buy-accent); }
.nls-pricing__icon .nls-icon { width: 1.5em; height: 1.5em; }
.nls-icon { display: block; flex: none; width: 1em; height: 1em; }

/* Month / year switch: real radio buttons (keyboard: Tab, then the arrow keys). */
.nls-pricing__switch { display: inline-flex; flex-wrap: nowrap; gap: 4px; margin: 0; padding: 4px; border: 1px solid var(--nls-buy-border); border-radius: 999px; background: var(--nls-buy-surface); }
.nls-pricing__legend { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.nls-pricing__radio { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; }
.nls-pricing__switch label { display: inline-flex; align-items: center; gap: 8px; margin: 0; padding: .5em 1.1em; border-radius: 999px; cursor: pointer; font-weight: 600; font-size: .95em; color: var(--nls-buy-muted); }
.nls-pricing__radio:checked + label { background: var(--nls-buy-accent); color: var(--nls-buy-accent-ink); }
.nls-pricing__radio:focus-visible + label { outline: 3px solid var(--nls-buy-focus); outline-offset: 2px; }
.nls-pricing__save { white-space: nowrap; padding: .1em .6em; border-radius: 999px; font-size: .78em; font-weight: 700; background: color-mix(in srgb, var(--nls-buy-ok) 18%, transparent); color: inherit; }
.nls-pricing__radio:checked + label .nls-pricing__save { background: rgba(0, 0, 0, .28); color: #fff; }

/* Month or year: one switch at the top for every product; only the chosen period's prices and buttons are shown
   (hidden ones leave the tab order). Without a switch (only one period) the shortcode's period applies. */
.nls-buy:has(.nls-buy__switch .nls-pricing__radio[value="year"]:checked) .nls-when-month,
.nls-buy:has(.nls-buy__switch .nls-pricing__radio[value="month"]:checked) .nls-when-year { display: none; }
.nls-buy:not(:has(.nls-buy__switch)) .nls-pricing.is-month .nls-when-year,
.nls-buy:not(:has(.nls-buy__switch)) .nls-pricing.is-year .nls-when-month { display: none; }

.nls-pricing__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 400px)); justify-content: center; gap: 20px; align-items: stretch; }
.nls-plan { position: relative; display: flex; flex-direction: column; padding: 24px 24px 22px; border: 1px solid var(--nls-buy-border); border-radius: var(--nls-buy-radius); background: var(--nls-buy-surface); }
.nls-plan.is-recommended { border: 2px solid var(--nls-buy-accent); background: var(--nls-buy-surface-strong); }
.nls-plan__head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: .75em; }
.nls-plan__name { display: flex; align-items: center; gap: .5em; margin: 0; font-size: 1.15em; font-weight: 700; color: inherit; }
.nls-plan__icon { display: inline-flex; color: var(--nls-buy-accent); }
.nls-plan__icon .nls-icon { width: 1.1em; height: 1.1em; }
.nls-plan.is-free .nls-plan__icon { color: var(--nls-buy-muted); }
.nls-plan__badge { padding: .25em .75em; border-radius: 999px; font-size: .75em; font-weight: 700; letter-spacing: .02em; background: var(--nls-buy-accent); color: var(--nls-buy-accent-ink); }
.nls-plan__price { display: flex; flex-direction: column; }
.nls-plan__amount { margin: 0; font-size: 2.4em; font-weight: 800; line-height: 1.1; letter-spacing: -.01em; white-space: nowrap; color: inherit; }
.nls-plan__per { margin-left: .2em; font-size: .4em; font-weight: 500; color: var(--nls-buy-muted); }
.nls-plan__vat { margin: .35em 0 0; font-size: .85em; color: var(--nls-buy-muted); }
.nls-plan__sites { margin: .9em 0 1em; font-weight: 600; }
.nls-buy__form { margin: 0; }
.nls-buy__button { box-sizing: border-box; display: block; width: 100%; min-height: 48px; padding: .7em 1.2em; border: 0; border-radius: 10px; cursor: pointer; background: var(--nls-buy-accent); color: var(--nls-buy-accent-ink); font: inherit; font-size: 1.2rem; font-weight: 700; line-height: 1.2; text-align: center; transition: filter .15s, transform .15s; }
.nls-buy__button:hover { filter: brightness(1.08); }
.nls-buy__button:active { transform: translateY(1px); }
.nls-buy__button:focus-visible { outline: 3px solid var(--nls-buy-focus); outline-offset: 3px; }
.nls-plan:not(.is-recommended) .nls-buy__button { background: transparent; color: inherit; box-shadow: inset 0 0 0 2px var(--nls-buy-accent); }
a.nls-buy__button, a.nls-buy__button:hover { box-sizing: border-box; text-decoration: none; }
.nls-plan .nls-buy__button.is-soon { margin: 0; cursor: default; font-size: 1rem; font-weight: 600; color: var(--nls-buy-muted); box-shadow: inset 0 0 0 1px var(--nls-buy-border); }
.nls-plan .nls-buy__button.is-soon:hover { filter: none; }
.nls-plan__features { flex: 1; margin: 1.25em 0 0; padding: 1.1em 0 0; border-top: 1px solid var(--nls-buy-border); }
.nls-plan__list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .55em; }
.nls-plan__list li { display: flex; align-items: flex-start; gap: .6em; margin: 0; padding: 0; line-height: 1.45; }
.nls-plan__check { width: 1.1em; height: 1.1em; margin-top: .18em; color: var(--nls-buy-accent); }
.nls-plan__list li.is-lead { font-weight: 600; color: var(--nls-buy-muted); }
.nls-plan__more { margin-top: .55em; }
.nls-plan__more > .nls-plan__list { margin-top: .55em; }
.nls-plan__more summary { cursor: pointer; font-weight: 600; font-size: .92em; color: var(--nls-buy-accent); }
.nls-plan__more summary:focus-visible { outline: 3px solid var(--nls-buy-focus); outline-offset: 2px; border-radius: 4px; }
.nls-plan__features li.is-included { font-weight: 700; }
.nls-plan__note { margin: .9em 0 0; font-size: .85em; line-height: 1.45; color: var(--nls-buy-muted); }
.nls-plan__soon { margin-left: .35em; padding: 0 .5em; border-radius: 999px; font-size: .78em; color: var(--nls-buy-muted); border: 1px solid var(--nls-buy-border); white-space: nowrap; }
.nls-pricing__foot { margin: 1em 0 0; font-size: .85em; color: var(--nls-buy-muted); }
.nls-buy--single .nls-buy__button { width: auto; display: inline-block; }
.nls-buy__vat { display: block; margin-top: .4em; font-size: .85em; color: var(--nls-buy-muted); }
.nls-plan__desc { margin: 0 0 1em; max-width: calc(100% - 96px); color: var(--nls-buy-muted); line-height: 1.45; }

/* The tier illustration: a line drawing in the accent colour with a soft glow, top right (decorative). */
.nls-plan__art { position: absolute; top: 14px; right: 14px; width: 92px; height: 92px; color: var(--nls-buy-accent); pointer-events: none; filter: drop-shadow(0 0 10px color-mix(in srgb, var(--nls-buy-accent) 45%, transparent)); }
.nls-plan__art .nls-art { display: block; width: 100%; height: 100%; }
.nls-art__face { fill: currentColor; fill-opacity: .07; }
.nls-art__tape { stroke-opacity: .55; }
.nls-art__orbit { stroke-width: 1.2; stroke-opacity: .7; }
.nls-art__dot { fill: currentColor; stroke: none; }
.nls-plan__head, .nls-plan__desc { position: relative; z-index: 1; }
.nls-plan:has(.nls-plan__art) .nls-plan__head { padding-right: 96px; min-height: 2em; }
.nls-plan.is-recommended .nls-plan__head { flex-wrap: wrap; justify-content: flex-start; }

/* One paid tier (North Return Manager Pro): one wide card, price and button left, features right. */
.nls-pricing.is-single .nls-pricing__grid { grid-template-columns: minmax(0, 1fr); }
.nls-plan.is-wide { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 0 36px; }
.nls-plan.is-wide .nls-plan__main { position: relative; display: flex; flex-direction: column; }
.nls-plan.is-wide .nls-plan__features { margin: 0; padding: 0 0 0 36px; border-top: 0; border-left: 1px solid var(--nls-buy-border); }
.nls-plan.is-wide .nls-plan__art { top: 0; right: 0; }
.nls-plan__free { margin: 1em 0 0; font-size: .9em; color: var(--nls-buy-muted); }
.nls-plan__free a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }

/* "Start for free": one free product card in the same style, and a line about the other free versions. */
.nls-pricing--free { margin-top: 3em; }
.nls-pricing--free .nls-pricing__grid { grid-template-columns: minmax(0, 640px); }
.nls-plan.is-free-product .nls-plan__desc { margin-bottom: 1.25em; }
.nls-plan__tier { font-weight: 500; color: var(--nls-buy-muted); }
.nls-pricing__also { text-align: center; }
.nls-pricing__also a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }

.nls-buy--thanks { padding: 1.25em 1.5em; border-radius: var(--nls-buy-radius); border: 1px solid var(--nls-buy-border); background: var(--nls-buy-surface); }

/* "My licence" ([north_license_account]): login, the licences with their stores and actions, the receipts. */
.nls-account { max-width: 860px; }
.nls-account__title { margin: 0 0 .75em; }
.nls-account h2 { margin: 0; font-size: 1.35em; }
.nls-account h3 { margin: 1.25em 0 .5em; font-size: 1em; }
.nls-account__box, .nls-account__licence, .nls-account__section { margin: 0 0 1.25em; padding: 24px 26px; border-radius: var(--nls-buy-radius); border: 1px solid var(--nls-buy-border); background: var(--nls-buy-surface); }
.nls-account__login { display: grid; gap: .6em; max-width: 420px; margin-top: 1em; }
.nls-account__login input { box-sizing: border-box; width: 100%; min-height: 48px; padding: .6em .9em; border-radius: 10px; border: 1px solid var(--nls-buy-border); background: var(--nls-buy-surface-strong); color: inherit; font: inherit; }
.nls-account__login input:focus-visible { outline: 3px solid var(--nls-buy-focus); outline-offset: 2px; }
.nls-account__head { display: flex; flex-wrap: wrap; align-items: center; gap: .5em 1em; }
.nls-account__facts, .nls-account__note { margin: .4em 0 0; color: var(--nls-buy-muted); }
.nls-account__note { color: inherit; font-weight: 600; }
.nls-account__muted { margin: .5em 0 0; font-size: .9em; color: var(--nls-buy-muted); }
.nls-account__badge { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: .8em; font-weight: 600; border: 1px solid var(--nls-buy-border); color: var(--nls-buy-muted); white-space: nowrap; }
.nls-account__badge.is-active { color: var(--nls-buy-ok); border-color: currentColor; }
.nls-account__badge.is-expired, .nls-account__badge.is-revoked, .nls-account__badge.is-warn { color: #e5a03a; border-color: currentColor; }
.nls-account__sites { list-style: none; margin: 0; padding: 0; }
.nls-account__sites li { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5em 1em; padding: .6em 0; border-top: 1px solid var(--nls-buy-border); }
.nls-account__sites li:first-child { border-top: 0; }
.nls-account__sites a { color: inherit; font-weight: 600; text-decoration: underline; text-underline-offset: 2px; word-break: break-all; }
.nls-account__sites small { display: block; color: var(--nls-buy-muted); }
.nls-account__actions { display: flex; flex-wrap: wrap; gap: .6em; margin-top: 1.25em; }
.nls-account__form { margin: 0; }
.nls-account .nls-buy__button { width: auto; display: inline-block; min-height: 42px; font-size: 1rem; }
.nls-account .nls-buy__button.is-outline { background: transparent; color: inherit; box-shadow: inset 0 0 0 2px var(--nls-buy-accent); }
.nls-account .nls-buy__button.is-quiet { box-shadow: inset 0 0 0 1px var(--nls-buy-border); color: var(--nls-buy-muted); }
.nls-account .nls-buy__button.is-small { min-height: 34px; padding: .35em .9em; font-size: .9rem; }
.nls-account .nls-buy__button.is-link { min-height: 0; padding: 0; background: none; color: inherit; font-size: inherit; font-weight: 400; text-decoration: underline; box-shadow: none; }
.nls-account__table { width: 100%; margin-top: .5em; border-collapse: collapse; }
.nls-account__table th, .nls-account__table td { padding: .55em .5em; text-align: left; border-top: 1px solid var(--nls-buy-border); }
.nls-account__table th { font-size: .85em; font-weight: 600; color: var(--nls-buy-muted); border-top: 0; }
.nls-account__table a { color: inherit; text-decoration: underline; }
.nls-account__foot { display: flex; flex-wrap: wrap; align-items: baseline; gap: .4em; color: var(--nls-buy-muted); }
.nls-account__foot .nls-account__form { display: inline; }

@media (max-width: 760px) {
	.nls-plan.is-wide { display: flex; }
	.nls-plan.is-wide .nls-plan__features { margin: 1.25em 0 0; padding: 1.1em 0 0; border-left: 0; border-top: 1px solid var(--nls-buy-border); }
}
@media (max-width: 600px) {
	.nls-account__box, .nls-account__licence, .nls-account__section { padding: 18px 16px; }
	.nls-account__table th:nth-child(2), .nls-account__table td:nth-child(2) { display: none; }
	.nls-pricing__head { align-items: flex-start; }
	.nls-buy__intro { font-size: 1em; }
	.nls-plan__art { width: 56px; height: 56px; top: 12px; right: 12px; opacity: .85; }
	.nls-plan:has(.nls-plan__art) .nls-plan__head { padding-right: 60px; }
	.nls-plan__desc { max-width: none; }
	.nls-pricing__switch { display: flex; width: 100%; box-sizing: border-box; }
	.nls-pricing__switch label { flex: 1 1 0; justify-content: center; flex-wrap: wrap; gap: 4px; padding: .55em .5em; font-size: .9em; text-align: center; }
	.nls-plan { padding: 20px 18px; }
	.nls-plan__amount { font-size: 2.1em; }
}
@media (prefers-reduced-motion: reduce) {
	.nls-buy__button { transition: none; }
}

/* Planned features in one line, and a product that is only included in another (no price, no button). */
.nls-plan__features li.is-coming { color: var(--nls-buy-muted); }
.nls-plan__included { display: flex; align-items: center; gap: .4em; font-size: 1.15rem; }

/* Thank-you page and download page (?nls_downloads=…, a page of its own outside the theme). */
.nls-buy--thanks .nls-buy__button, .nls-downloads .nls-buy__button { display: inline-block; width: auto; }
.nls-buy__button.is-outline { background: transparent; color: inherit; box-shadow: inset 0 0 0 2px var(--nls-buy-accent); }
.nls-buy__button.is-soon { cursor: default; font-size: 1rem; font-weight: 600; color: var(--nls-buy-muted); background: transparent; box-shadow: inset 0 0 0 1px var(--nls-buy-border); }
.nls-downloads__steps { padding-left: 1.4em; }
.nls-downloads__steps li { margin: .35em 0; }
.nls-downloads-page { margin: 0; padding: 32px 16px; background: #f6f7f7; color: #1d2327; font: 16px/1.55 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; }
.nls-downloads-page .nls-downloads { --nls-buy-accent: #1d2327; box-sizing: border-box; max-width: 640px; margin: 0 auto; padding: 28px; background: #fff; border-radius: 16px; }
.nls-downloads h1 { margin: 0 0 .6em; font-size: 1.6rem; line-height: 1.25; }
.nls-downloads h2 { margin: 1.6em 0 .4em; font-size: 1.15rem; }
.nls-downloads__list { margin: 1em 0; padding: 0; list-style: none; }
.nls-downloads__list li { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .6em 1em; padding: .8em 0; border-bottom: 1px solid var(--nls-buy-border); }
.nls-downloads__name { font-weight: 600; }
.nls-downloads__name small { font-weight: 400; color: var(--nls-buy-muted); }
.nls-downloads .nls-buy__button { font-size: 1rem; min-height: 44px; }
.nls-downloads__home { max-width: 640px; margin: 16px auto 0; text-align: center; font-size: .9rem; }
.nls-downloads__home a { color: #50575e; }

/* Preview and demo (admin only): a banner, and every button off. */
.nls-account__preview { margin: 0 0 1.25em; padding: .75em 1em; border: 1px dashed currentColor; border-radius: 10px; color: #e5a03a; }
.nls-account__preview a { color: inherit; text-decoration: underline; margin-left: .5em; }
.nls-account .nls-buy__button[disabled] { opacity: .45; cursor: not-allowed; pointer-events: none; }
