/**
 * Decorrect WooCommerce — a klubszintek listája egy publikus oldalon.
 *
 * Sizes are in px and em, never rem. Automatic.css sets
 * `html { font-size: 62.5% !important }` on these sites, so 1rem is 10px here
 * and 16px on a site without it — a stylesheet that shipped rem would be two
 * different lists depending on where it landed.
 *
 * Colours come through `--dcw-*` tokens with an ACSS variable as the first
 * fallback and a literal as the last, so the block takes the site's palette
 * where there is one and still looks finished where there is not. Reskinning is
 * overriding the tokens on `.dcw-club`, not rewriting the rules below.
 *
 * The root is a `<div>` and not a `<section>` on purpose: Automatic.css ships
 * `display`, `gap` and `padding` against a top-level `<section>`, and this
 * block is dropped wherever a page wants it — including places where it would
 * be that top-level section and inherit 72px of padding it never asked for.
 *
 * The level's own colour arrives as `--dcw-level` in a `style` attribute, the
 * same variable the account page's ladder uses, so the two read as one ladder.
 */

.dcw-club {
	--dcw-ink: var(--primary, #17181c);
	--dcw-ink-soft: var(--neutral-semi-dark, #5c5b57);
	/* See account.css: a fixed AA grey, not the host's semi-light. */
	--dcw-muted: #6b6a66;
	--dcw-line: var(--base-light, #e6e3dd);
	--dcw-surface: var(--white, #fff);
	--dcw-surface-soft: var(--base-ultra-light, #f7f5f1);
	--dcw-accent: var(--accent, #6d1f2a);
	--dcw-radius: 10px;
	--dcw-shadow-sm: 0 1px 2px rgba(17, 18, 22, 0.06);

	display: flex;
	flex-direction: column;
	gap: 14px;
	margin: 0;
	padding: 0;
	color: var(--dcw-ink);
}

.dcw-club__list {
	display: grid;
	/* min() rather than a bare 210px: the block is dropped into columns whose
	   width it does not know, and a track floor wider than the container is how
	   a card ends up half off the screen. */
	grid-template-columns: repeat(auto-fit, minmax(min(210px, 100%), 1fr));
	gap: 12px;
	margin: 0;
	padding: 0;
	list-style: none;
	counter-reset: none;
}

/* The list is an `<ol>`, because the levels are a ladder and their order is the
   point. The markers are off because the number is not what a visitor reads:
   the threshold underneath each name already says which way is up. */
.dcw-club__list > li::marker {
	content: "";
}

.dcw-club-level {
	position: relative;
	display: flex;
	flex-direction: column;
	gap: 6px;
	padding: 16px 16px 16px 20px;
	background: var(--dcw-surface-soft);
	border: 1px solid transparent;
	border-radius: var(--dcw-radius);
	overflow: hidden;
}

/* A stripe in the level's own colour down the side, so the card reads as a rung
   rather than as a box that happens to sit beside two others. */
.dcw-club-level::before {
	content: "";
	position: absolute;
	inset-block: 12px;
	inset-inline-start: 0;
	width: 3px;
	background: var(--dcw-level, var(--dcw-accent));
	border-radius: 0 99px 99px 0;
}

.dcw-club-level.is-mine {
	background: var(--dcw-surface);
	border-color: var(--dcw-level, var(--dcw-accent));
	box-shadow: var(--dcw-shadow-sm);
}

.dcw-club-level__head {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 10px;
}

.dcw-club-level__name {
	font-size: 17px;
	font-weight: 600;
	letter-spacing: 0.01em;
}

.dcw-club-level__discount {
	flex: none;
	padding: 3px 9px;
	background: var(--dcw-level, var(--dcw-accent));
	border-radius: 99px;
	color: #fff;
	font-size: 13px;
	font-weight: 600;
	font-variant-numeric: tabular-nums;
	white-space: nowrap;
}

.dcw-club-level__cond,
.dcw-club-level__desc,
.dcw-club-level__example {
	margin: 0;
	font-size: 14px;
	line-height: 1.5;
}

.dcw-club-level__cond {
	color: var(--dcw-ink-soft);
	font-weight: 500;
}

.dcw-club-level__desc {
	color: var(--dcw-muted);
}

/* Not --dcw-muted: on an ACSS palette that token lands on a light grey, and
   the example price is the line that makes the discount concrete. */
.dcw-club-level__example {
	color: var(--dcw-ink-soft);
}

.dcw-club-level__flag {
	align-self: flex-start;
	margin-top: 2px;
	padding: 2px 8px;
	background: var(--dcw-surface-soft);
	border: 1px solid var(--dcw-line);
	border-radius: 99px;
	font-size: 12px;
	font-weight: 600;
	color: var(--dcw-ink-soft);
}

.dcw-club-level.is-mine .dcw-club-level__flag {
	border-color: var(--dcw-level, var(--dcw-accent));
	color: var(--dcw-level, var(--dcw-accent));
}

.dcw-club__note {
	margin: 0;
	color: var(--dcw-ink-soft);
	font-size: 13px;
	line-height: 1.5;
}

@media (max-width: 599px) {
	.dcw-club__list {
		grid-template-columns: 1fr;
	}
}
