/*
 * Sun Commerce front-end styles: the account page, the buy form, the tier cards, locked
 * content and the app sign-in page.
 *
 * Loaded only where plugin markup renders (Assets\Stylesheet). Every colour, radius and
 * gap is a custom property, shared with the tier cards, so a theme restyles the plugin by
 * setting tokens on these classes, e.g. `.sunc-account { --sunc-accent: #0a7d55; }`.
 * Tokens sit inside :where(), which adds no specificity, so no override needs !important.
 *
 * Text inherits the theme's colour and font. Only surfaces that carry their own background
 * (chips, notices, the sign-in page) set a text colour, so the page reads on light and dark themes.
 * A custom --sunc-accent must keep 4.5:1 contrast against --sunc-accent-contrast.
 *
 * Text sizes on [sunc_card] are tokens too, with their default as the var() fallback rather
 * than set here: --sunc-card-name-size, --sunc-card-price-size, --sunc-card-tape-size. A page
 * builder's CSS, which often loads before this file, can then set them on the card or on any
 * element around it, e.g. `.sunc-card { --sunc-card-price-size: 2rem; }`.
 */

:where(.sunc-account, .sunc-buy, .sunc-buy-row, .sunc-signup, .sunc-tiers, .sunc-card, .sunc-locked, .sunc-locked-media, .sunc-locked-line, .sunc-badge, .sunc-signin-page) {
	--sunc-accent: #2f6fed;
	--sunc-accent-hover: #2159c9;
	--sunc-accent-contrast: #fff;
	--sunc-border: color-mix(in srgb, currentColor 18%, transparent);
	--sunc-muted: color-mix(in srgb, currentColor 72%, transparent);
	--sunc-surface: color-mix(in srgb, currentColor 4%, transparent);
	--sunc-radius: 14px;
	--sunc-radius-small: 8px;
	--sunc-gap: 1rem;
	--sunc-focus: #2f6fed;
	--sunc-success-bg: #e7f6ec;
	--sunc-success-text: #14532d;
	--sunc-warning-bg: #fef3c7;
	--sunc-warning-text: #78350f;
	--sunc-neutral-bg: #f1f2f4;
	--sunc-neutral-text: #374151;
	--sunc-info-bg: #e8effd;
	--sunc-info-text: #1e3a8a;
	--sunc-error-bg: #fde8e8;
	--sunc-error-text: #7f1d1d;
	--sunc-tape: #facc15;
	--sunc-tape-ink: #111;
}

/* Read out, not seen: the "Was" / "Now" beside a struck-through price. */
.sunc-visually-hidden {
	position: absolute !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip-path: inset(50%);
	white-space: nowrap;
}

/*
 * Buttons are the theme's own: every one carries wp-element-button, the class block themes
 * style buttons through (theme.json). The plugin sets only layout, so an icon lines up with
 * the label, and keeps secondary actions (Cancel, Unlink, Free this device) visibly lighter
 * than the main one with an outline in the text colour. The app sign-in page loads no theme
 * styles, so its buttons get the full look further down (.sunc-signin).
 */

.sunc-button,
.sunc-buy__button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.5rem;
	text-align: center;
	text-decoration: none;
}

.sunc-button--secondary,
.sunc-button--secondary:hover {
	background: transparent;
	color: inherit;
	box-shadow: inset 0 0 0 2px currentColor;
}

.sunc-account a:focus-visible,
.sunc-buy a:focus-visible,
.sunc-tiers a:focus-visible,
.sunc-card a:focus-visible,
.sunc-locked a:focus-visible,
.sunc-discord a:focus-visible,
.sunc-signup a:focus-visible,
.sunc-signin a:focus-visible,
.sunc-signin .sunc-button:focus-visible {
	outline: 3px solid var(--sunc-focus);
	outline-offset: 2px;
}

/* Notices: checkout confirmations, buy errors, "you already have this". */

.sunc-notice,
.sunc-account__notice,
.sunc-buy__error,
.sunc-signup__notice,
p.sunc-buy--owned,
p.sunc-buy--renewing,
p.sunc-buy--member,
p.sunc-buy--admin-notice,
p.sunc-tiers__admin-notice,
p.sunc-card__admin-notice,
p.sunc-discord__admin-notice {
	margin-block: 0 var(--sunc-gap);
	padding-block: 0.75rem;
	padding-inline: 1rem;
	border-radius: var(--sunc-radius-small);
	background: var(--sunc-info-bg);
	color: var(--sunc-info-text);
	line-height: 1.5;
}

.sunc-account__notice--success {
	background: var(--sunc-success-bg);
	color: var(--sunc-success-text);
}

.sunc-account__notice--warning {
	background: var(--sunc-warning-bg);
	color: var(--sunc-warning-text);
}

.sunc-buy__error {
	background: var(--sunc-error-bg);
	color: var(--sunc-error-text);
}

p.sunc-buy--admin-notice,
p.sunc-tiers__admin-notice,
p.sunc-card__admin-notice,
p.sunc-discord__admin-notice {
	background: transparent;
	color: inherit;
	border: 2px dashed var(--sunc-border);
}

.sunc-notice a,
.sunc-account__notice a,
.sunc-buy__error a,
p.sunc-buy--owned a,
p.sunc-buy--renewing a,
p.sunc-buy--member a {
	color: inherit;
	font-weight: 600;
	text-decoration: underline;
}

/* Discord link button ([sunc_discord]). */

.sunc-discord__status,
.sunc-discord__actions {
	margin-block: 0 var(--sunc-gap);
}

/* Buy form. */

form.sunc-buy {
	margin-block: 0 var(--sunc-gap);
}

/* An icon inside a button is decorative; the label says what the button does. */
.sunc-buy__icon,
.sunc-discord__icon {
	flex: none;
	inline-size: 1.15em;
	block-size: 1.15em;
}

/* Buy row: image, name, price and the button, for [sunc_buy] (show="row", the default). */

.sunc-buy-row {
	display: flex;
	align-items: flex-start;
	gap: var(--sunc-gap);
	max-inline-size: 36rem;
	margin-block: 0 calc(var(--sunc-gap) * 1.5);
	padding: var(--sunc-gap);
	border: 1px solid var(--sunc-border);
	border-radius: var(--sunc-radius);
	background: var(--sunc-surface);
}

.sunc-buy-row__media {
	flex: none;
	inline-size: 80px;
	block-size: 80px;
	margin: 0;
	overflow: hidden;
	border-radius: var(--sunc-radius-small);
}

.sunc-buy-row__image {
	display: block;
	inline-size: 100%;
	block-size: 100%;
	max-inline-size: none;
	object-fit: cover;
}

.sunc-buy-row__initial {
	font-size: 2rem;
	font-weight: 600;
	line-height: 1;
}

.sunc-buy-row__body {
	display: flex;
	flex: 1;
	flex-direction: column;
	align-items: flex-start;
	gap: 0.5rem;
	min-inline-size: 0;
}

.sunc-buy-row .sunc-buy-row__body > * {
	margin: 0;
}

.sunc-buy-row__name {
	font-size: 1.1em;
	font-weight: 600;
	line-height: 1.3;
	overflow-wrap: anywhere;
}

.sunc-buy-row__price {
	font-size: 0.95em;
	font-weight: 600;
}

.sunc-buy-row__interval,
.sunc-buy-row__list {
	color: var(--sunc-muted);
	font-size: 0.9em;
	font-weight: 400;
}

.sunc-buy-row__discount {
	display: block;
	color: var(--sunc-muted);
	font-size: 0.9em;
	font-weight: 400;
}

.sunc-buy__login {
	margin-block: 0.5rem var(--sunc-gap);
	color: var(--sunc-muted);
	font-size: 0.95em;
}

/* Account page. */

.sunc-account {
	display: flex;
	flex-direction: column;
	gap: calc(var(--sunc-gap) * 1.5);
	max-inline-size: 48rem;
}

.sunc-account > * {
	margin-block: 0;
}

.sunc-account h2 {
	margin-block: 0 0.75rem;
	font-size: 1.35rem;
	font-weight: 600;
	line-height: 1.3;
}

.sunc-account h3 {
	margin: 0;
	font-size: 1.05rem;
	font-weight: 600;
	line-height: 1.3;
}

.sunc-account__panel {
	padding: calc(var(--sunc-gap) * 1.25);
	border: 1px solid var(--sunc-border);
	border-radius: var(--sunc-radius);
	background: var(--sunc-surface);
}

.sunc-account__panel > :last-child {
	margin-block-end: 0;
}

.sunc-account__panel p {
	margin-block: 0 var(--sunc-gap);
	line-height: 1.5;
}

.sunc-account__actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 0.75rem 1.25rem;
}

.sunc-account__actions > * {
	margin: 0;
}

.sunc-account__buttons {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.75rem;
}

.sunc-account__discord .sunc-account__actions {
	justify-content: flex-start;
}

.sunc-account__muted,
.sunc-account__meta,
.sunc-account__included {
	color: var(--sunc-muted);
	font-size: 0.92em;
}

.sunc-account__list {
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

.sunc-account__item {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 0.5rem 1rem;
	margin: 0;
	padding-block: 0.9rem;
	padding-inline: 1rem;
	border: 1px solid var(--sunc-border);
	border-radius: var(--sunc-radius-small);
}

.sunc-account__item-main {
	display: flex;
	flex: 1 1 16rem;
	flex-direction: column;
	gap: 0.25rem;
	min-inline-size: 0;
	overflow-wrap: anywhere;
}

.sunc-account__item-side {
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	gap: 0.25rem;
	font-size: 0.92em;
	text-align: end;
}

.sunc-account__thumb {
	flex: none;
	inline-size: 48px;
	block-size: 48px;
	border-radius: var(--sunc-radius-small);
	object-fit: cover;
}

.sunc-account__product--ended {
	border-style: dashed;
}

.sunc-account__subheading {
	margin-block: calc(var(--sunc-gap) * 1.25) 0.75rem;
	color: var(--sunc-muted);
	font-size: 1rem;
	font-weight: 600;
}

/* Status chips and badges: always text, never colour alone. */

.sunc-chip,
.sunc-account__badge {
	display: inline-block;
	padding-block: 0.15rem;
	padding-inline: 0.6rem;
	border-radius: 999px;
	background: var(--sunc-neutral-bg);
	color: var(--sunc-neutral-text);
	font-size: 0.8rem;
	font-weight: 600;
	line-height: 1.4;
	white-space: nowrap;
}

.sunc-chip--success {
	background: var(--sunc-success-bg);
	color: var(--sunc-success-text);
}

.sunc-chip--warning {
	background: var(--sunc-warning-bg);
	color: var(--sunc-warning-text);
}

.sunc-account__badge--updated {
	background: var(--sunc-info-bg);
	color: var(--sunc-info-text);
}

/* Download rows: the file name is the link, so every link names its file. */

.sunc-account__download {
	font-weight: 600;
}

/* Decorative arrow, kept out of the underline; the empty alternative text keeps screen
   readers from announcing it. */
.sunc-account__download::before {
	display: inline-block;
	margin-inline-end: 0.3em;
	text-decoration: none;
	content: "\2193" / "";
}

@media (max-width: 640px) {
	.sunc-account__item-side {
		align-items: flex-start;
		text-align: start;
	}

	.sunc-account__billing .sunc-button {
		inline-size: 100%;
	}
}

/* Tier cards: equal-height cards in a grid, one column on narrow screens. */

.sunc-tiers {
	margin-block: 0 calc(var(--sunc-gap) * 1.5);
}

.sunc-tiers__grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: calc(var(--sunc-gap) * 1.5);
	margin: 0;
	padding: 0;
	list-style: none;
}

.sunc-tiers--cols-1 .sunc-tiers__grid {
	grid-template-columns: minmax(0, 1fr);
	max-inline-size: 28rem;
}

.sunc-tiers--cols-3 .sunc-tiers__grid {
	grid-template-columns: repeat(3, minmax(0, 1fr));
}

.sunc-tiers--cols-auto .sunc-tiers__grid {
	grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr));
}

.sunc-tier {
	display: flex;
	flex-direction: column;
	gap: var(--sunc-gap);
	margin: 0;
	padding: var(--sunc-gap);
	border: 1px solid var(--sunc-border);
	border-radius: var(--sunc-radius);
	background: var(--sunc-surface);
	min-inline-size: 0;
}

.sunc-tier--owned {
	border-color: var(--sunc-accent);
}

.sunc-tier__media {
	margin: 0;
	aspect-ratio: 16 / 9;
	overflow: hidden;
	border-radius: var(--sunc-radius-small);
}

.sunc-tier__image {
	display: block;
	inline-size: 100%;
	block-size: 100%;
	max-inline-size: none;
	object-fit: cover;
}

.sunc-tier__media--placeholder,
.sunc-buy-row__media--placeholder,
.sunc-card__media--placeholder {
	display: flex;
	align-items: center;
	justify-content: center;
	background: linear-gradient(135deg, var(--sunc-accent), var(--sunc-accent-hover));
	color: var(--sunc-accent-contrast);
}

.sunc-tier__initial {
	font-size: 3rem;
	font-weight: 600;
	line-height: 1;
}

.sunc-tier__body {
	display: flex;
	flex: 1;
	flex-direction: column;
	gap: 0.75rem;
	min-inline-size: 0;
}

.sunc-tier__body > * {
	margin: 0;
}

.sunc-tier__name {
	font-size: 1.15rem;
	font-weight: 600;
	line-height: 1.3;
	overflow-wrap: anywhere;
}

.sunc-tier__price {
	font-size: 1.1rem;
	font-weight: 600;
	line-height: 1.3;
}

.sunc-tier__interval,
.sunc-tier__list {
	color: var(--sunc-muted);
	font-size: 0.9em;
	font-weight: 400;
}

.sunc-tier__discount {
	display: block;
	color: var(--sunc-muted);
	font-size: 0.9em;
	font-weight: 400;
}

.sunc-tier__cta {
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
}

.sunc-tier__cta > *,
.sunc-tier__cta form.sunc-buy {
	margin: 0;
}

/* Border-box: the manage link is an <a>, which unlike a <button> would add the theme's padding to the full width. */
.sunc-tier__cta .sunc-buy__button,
.sunc-tier__manage {
	box-sizing: border-box;
	inline-size: 100%;
}

.sunc-tier__status {
	color: var(--sunc-muted);
	font-size: 0.92em;
}

.sunc-tier__members {
	color: var(--sunc-muted);
	font-size: 0.92em;
}

.sunc-tier__description {
	color: var(--sunc-muted);
	font-size: 0.95em;
	line-height: 1.5;
	overflow-wrap: anywhere;
}

.sunc-tier__features {
	display: flex;
	flex-direction: column;
	gap: 0.4rem;
	padding: 0;
	list-style: none;
	font-size: 0.92em;
	line-height: 1.45;
	overflow-wrap: anywhere;
}

.sunc-tier__features li {
	display: flex;
	gap: 0.5rem;
	margin: 0;
}

/* Decorative tick; the empty alternative text keeps screen readers from announcing it. */
.sunc-tier__features li::before {
	flex: none;
	color: var(--sunc-accent);
	font-weight: 600;
	content: "\2713" / "";
}

.sunc-tiers__login {
	margin-block: var(--sunc-gap) 0;
	color: var(--sunc-muted);
	font-size: 0.95em;
}

@media (max-width: 640px) {
	.sunc-tiers .sunc-tiers__grid {
		grid-template-columns: minmax(0, 1fr);
	}
}

/* columns="fill" (D90): no columns. The grid fills the parent's width and height and the
   cards stack, sharing the height; the page's own containers decide each card's size. Height
   fills only when the parent has one (a set height, or a stretched flex or grid item). */

.sunc-tiers--cols-fill {
	display: flex;
	flex-direction: column;
	box-sizing: border-box;
	inline-size: 100%;
	block-size: 100%;
	margin-block: 0;
}

.sunc-tiers--cols-fill .sunc-tiers__grid {
	flex: 1;
	grid-template-columns: minmax(0, 1fr);
	grid-auto-rows: 1fr;
	min-block-size: 0;
}

/* Locked content (D41): a teaser fading out, then a card with a blurred cover. The cover
   carries its own dark background, so its white text reads on any theme. */

.sunc-locked {
	margin-block: var(--sunc-gap) calc(var(--sunc-gap) * 1.5);
}

.sunc-locked__teaser {
	max-block-size: 12em;
	margin-block-end: calc(var(--sunc-gap) * 0.75);
	overflow: hidden;
	-webkit-mask-image: linear-gradient(to bottom, #000 35%, transparent);
	mask-image: linear-gradient(to bottom, #000 35%, transparent);
}

.sunc-locked__teaser p {
	margin: 0;
}

.sunc-locked__card {
	overflow: hidden;
	border: 1px solid var(--sunc-border);
	border-radius: var(--sunc-radius);
	background: var(--sunc-surface);
}

.sunc-locked__cover {
	position: relative;
	display: block;
	aspect-ratio: 2 / 1;
	overflow: hidden;
	background: #3a3a3a;
}

.sunc-locked__cover--plain {
	background: linear-gradient(135deg, var(--sunc-accent), var(--sunc-accent-hover));
}

.sunc-locked__image,
.sunc-locked-media img {
	filter: blur(22px) brightness(0.55) saturate(0.9);
	transform: scale(1.15);
}

.sunc-locked__image {
	position: absolute;
	inset: 0;
	inline-size: 100%;
	block-size: 100%;
	max-inline-size: none;
	object-fit: cover;
}

.sunc-locked__veil {
	position: absolute;
	inset: 0;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 0.6rem;
	padding: var(--sunc-gap);
	color: #fff;
	text-align: center;
}

.sunc-locked__cover--plain .sunc-locked__veil {
	color: var(--sunc-accent-contrast);
}

.sunc-locked__lock {
	inline-size: clamp(1.75rem, 6vw, 2.75rem);
	block-size: clamp(1.75rem, 6vw, 2.75rem);
}

.sunc-locked__headline {
	font-size: clamp(1.05rem, 3.2vw, 1.75rem);
	font-weight: 700;
	line-height: 1.2;
	text-wrap: balance;
}

.sunc-locked__body {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 0.75rem;
	padding: calc(var(--sunc-gap) * 1.25);
}

.sunc-locked .sunc-locked__body > *,
.sunc-locked__action form.sunc-buy {
	margin: 0;
}

.sunc-locked__meta {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	color: var(--sunc-muted);
	font-size: 0.92em;
}

.sunc-locked__meta-icon,
.sunc-locked-line__icon {
	flex: none;
	inline-size: 1.1em;
	block-size: 1.1em;
}

.sunc-locked__message {
	font-weight: 600;
	line-height: 1.4;
}

.sunc-locked__price {
	font-weight: 600;
	line-height: 1.4;
}

.sunc-locked__interval,
.sunc-locked__list,
.sunc-locked__discount {
	color: var(--sunc-muted);
	font-size: 0.9em;
	font-weight: 400;
}

.sunc-locked__discount {
	display: block;
}

.sunc-locked__action {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 0.5rem;
}

.sunc-locked__action > * {
	margin: 0;
}

/* Content several products open (D78): one row per product on sale. */

.sunc-locked__options {
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
	inline-size: 100%;
	margin: 0;
	padding: 0;
	list-style: none;
}

.sunc-locked__option {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 0.4rem;
	margin: 0;
	padding-block-start: 0.75rem;
	border-block-start: 1px solid var(--sunc-border);
}

.sunc-locked__option:first-child {
	padding-block-start: 0;
	border-block-start: 0;
}

.sunc-locked__option-name {
	font-weight: 700;
}

.sunc-locked__login {
	color: var(--sunc-muted);
	font-size: 0.92em;
}

/*
 * [sunc_card] (D93): one product as a card. A coming-soon card wears hazard tape across
 * the top, clipped by the card; the optional style is dashed and quieter, with an outlined
 * button. Benefits sit inline and wrap, so a wide card lists them on one line.
 */

.sunc-card {
	position: relative;
	overflow: hidden;
	box-sizing: border-box;
	block-size: 100%;
	margin: 0;
	padding: calc(var(--sunc-gap) * 1.5);
	border: 1px solid var(--sunc-border);
	border-radius: var(--sunc-radius);
	background: var(--sunc-surface);
	min-inline-size: 0;
}

.sunc-card--owned {
	border-color: var(--sunc-accent);
}

.sunc-card--optional {
	border: 2px dashed var(--sunc-border);
	background: transparent;
}

.sunc-card--optional .sunc-card__cta .sunc-buy__button,
.sunc-card--optional .sunc-card__cta .sunc-buy__button:hover {
	background: transparent;
	color: inherit;
	box-shadow: inset 0 0 0 2px currentColor;
}

/* The tape: a band of --sunc-tape edged with diagonal stripes, tilted and wider than the card. */
.sunc-card__tape {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 0.25rem 1.5rem;
	margin-block: calc(var(--sunc-gap) * -0.5) calc(var(--sunc-gap) * 1.25);
	margin-inline: calc(var(--sunc-gap) * -3);
	padding-block: 0.65rem;
	padding-inline: calc(var(--sunc-gap) * 3);
	background:
		repeating-linear-gradient(-45deg, var(--sunc-tape-ink) 0 0.5rem, var(--sunc-tape) 0.5rem 1rem) top / 100% 0.3rem no-repeat,
		repeating-linear-gradient(-45deg, var(--sunc-tape-ink) 0 0.5rem, var(--sunc-tape) 0.5rem 1rem) bottom / 100% 0.3rem no-repeat,
		var(--sunc-tape);
	color: var(--sunc-tape-ink);
	font-size: var(--sunc-card-tape-size, 0.85rem);
	font-weight: 800;
	letter-spacing: 0.08em;
	line-height: 1.3;
	text-transform: uppercase;
	transform: rotate(-2deg);
}

/* image="yes": the product image as a banner, the tier cards' 16:9 crop. */
.sunc-card__media {
	margin: 0 0 var(--sunc-gap);
	aspect-ratio: 16 / 9;
	overflow: hidden;
	border-radius: var(--sunc-radius-small);
}

.sunc-card__image {
	display: block;
	inline-size: 100%;
	block-size: 100%;
	max-inline-size: none;
	object-fit: cover;
}

.sunc-card__body {
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
	min-inline-size: 0;
}

.sunc-card__body > *,
.sunc-card__cta > *,
.sunc-card__cta form.sunc-buy {
	margin: 0;
}

.sunc-card__eyebrow {
	color: var(--sunc-muted);
	font-size: 0.8rem;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

.sunc-card__name {
	font-size: var(--sunc-card-name-size, 1.5rem);
	font-weight: 700;
	line-height: 1.2;
	overflow-wrap: anywhere;
}

.sunc-card__price {
	font-size: var(--sunc-card-price-size, 1.1rem);
	font-weight: 600;
	line-height: 1.3;
}

.sunc-card__interval,
.sunc-card__list,
.sunc-card__discount {
	color: var(--sunc-muted);
	font-size: 0.9em;
	font-weight: 400;
}

.sunc-card__discount {
	display: block;
}

.sunc-card__description {
	color: var(--sunc-muted);
	line-height: 1.5;
	overflow-wrap: anywhere;
}

.sunc-card__features {
	display: flex;
	flex-wrap: wrap;
	gap: 0.4rem 1.25rem;
	padding: 0;
	list-style: none;
	font-size: 0.92em;
	line-height: 1.45;
}

.sunc-card__features li {
	display: flex;
	gap: 0.4rem;
	margin: 0;
	overflow-wrap: anywhere;
}

/* Decorative tick; the empty alternative text keeps screen readers from announcing it. */
.sunc-card__features li::before {
	flex: none;
	color: var(--sunc-accent);
	font-weight: 600;
	content: "\2713" / "";
}

.sunc-card__note {
	padding-block: 0.75rem;
	padding-inline: 1rem;
	border-radius: var(--sunc-radius-small);
	background: var(--sunc-surface);
	font-size: 0.92em;
	line-height: 1.5;
}

.sunc-card__cta {
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
}

.sunc-card__cta .sunc-buy__button,
.sunc-card__manage {
	box-sizing: border-box;
	inline-size: 100%;
}

.sunc-card__status,
.sunc-card__login {
	color: var(--sunc-muted);
	font-size: 0.92em;
}

.sunc-card__login {
	text-align: center;
}

.sunc-card--soon .sunc-signup__button,
.sunc-card--soon .sunc-signup__button:hover {
	background: var(--sunc-tape);
	color: var(--sunc-tape-ink);
}

/* Mailing list sign-up (D92): the box and button on one row, wrapping on narrow screens. */

.sunc-signup__title {
	margin-block: 0 0.5rem;
	font-weight: 700;
}

.sunc-signup__form {
	margin: 0;
}

.sunc-signup__row {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
}

.sunc-signup__email {
	flex: 1 1 14rem;
	min-width: 0;
}

.sunc-signup__consent {
	margin-block: 0.5rem 0;
	color: var(--sunc-muted);
	font-size: 0.92em;
}

/* The honeypot: off screen, out of the tab order and hidden from screen readers. */
.sunc-signup__trap {
	position: absolute;
	left: -10000px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

.sunc-signup__notice--joined {
	background: var(--sunc-success-bg);
	color: var(--sunc-success-text);
}

.sunc-signup__notice--error {
	background: var(--sunc-error-bg);
	color: var(--sunc-error-text);
}

/* Listings: the theme's own featured image, blurred, with the lock over it. */

.sunc-locked-media {
	position: relative;
	display: block;
	block-size: 100%;
	overflow: hidden;
	border-radius: inherit;
	background: #3a3a3a;
}

.sunc-locked-media img {
	display: block;
}

.sunc-locked-line {
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
	color: var(--sunc-muted);
}

.sunc-badge {
	display: inline-block;
	margin-inline-start: 0.4em;
	padding-block: 0.1em;
	padding-inline: 0.55em;
	border-radius: 999px;
	background: var(--sunc-neutral-bg);
	color: var(--sunc-neutral-text);
	font-size: 0.55em;
	font-weight: 600;
	line-height: 1.4;
	vertical-align: middle;
	white-space: nowrap;
}


/*
 * App sign-in (Licensing\AuthorizeController): a page of its own, outside the theme, so it
 * sets its own background and text colour.
 */

.sunc-signin-page {
	margin: 0;
	min-block-size: 100vh;
	background: #f4f5f7;
	color: #1f2328;
	font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
	line-height: 1.5;
}

.sunc-signin {
	box-sizing: border-box;
	max-inline-size: 28rem;
	margin-block: 10vh 2rem;
	margin-inline: auto;
	padding: 2rem;
	border-radius: var(--sunc-radius);
	background: #fff;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08), 0 8px 24px rgba(0, 0, 0, 0.06);
}

.sunc-signin__site {
	margin: 0;
	color: var(--sunc-muted);
	font-size: 0.9rem;
}

.sunc-signin__title {
	margin-block: 0.25rem 1rem;
	font-size: 1.4rem;
	line-height: 1.25;
}

.sunc-signin__notice {
	padding: 0.75rem 1rem;
	border-radius: var(--sunc-radius-small);
	background: var(--sunc-warning-bg);
	color: var(--sunc-warning-text);
}

.sunc-signin__products {
	padding-inline-start: 1.25rem;
}

.sunc-signin__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
	margin-block: 1.5rem 1rem;
}

.sunc-signin__note {
	margin: 0;
	color: var(--sunc-muted);
	font-size: 0.875rem;
}

/* The sign-in page's own buttons: there is no theme here to style them. */

.sunc-signin .sunc-button {
	min-block-size: 44px;
	padding-block: 0.6rem;
	padding-inline: 1.25rem;
	border: 0;
	border-radius: 999px;
	background: var(--sunc-accent);
	color: var(--sunc-accent-contrast);
	font: inherit;
	font-weight: 600;
	line-height: 1.2;
	cursor: pointer;
	transition: background-color 0.15s ease, transform 0.05s ease;
}

.sunc-signin .sunc-button:hover {
	background: var(--sunc-accent-hover);
}

.sunc-signin .sunc-button:active {
	transform: translateY(1px);
}

.sunc-signin .sunc-button--secondary {
	background: transparent;
	color: inherit;
	box-shadow: inset 0 0 0 2px var(--sunc-border);
}

.sunc-signin .sunc-button--secondary:hover {
	background: var(--sunc-surface);
}

@media (prefers-reduced-motion: reduce) {
	.sunc-signin .sunc-button {
		transition: none;
	}

	.sunc-signin .sunc-button:active {
		transform: none;
	}
}

@media (prefers-color-scheme: dark) {
	.sunc-signin-page {
		background: #111317;
		color: #e6e8eb;
	}

	.sunc-signin {
		background: #1b1e24;
		box-shadow: none;
	}
}

@media (max-width: 480px) {
	.sunc-signin {
		margin-block-start: 0;
		border-radius: 0;
		box-shadow: none;
	}
}
