/* AGB Rating Board - board styles. Reason for existence: the previous board printed every card with the same 5/5, so the block ranked nothing. */

/* Astra compatibility: parent theme uses .ast-container { display: flex } which pins blocks to the left edge and leaves the right half empty on wide screens. Force block layout so the rating board spans the content width. */
#content .ast-container,
.ast-container {
	display: block;
	width: 100%;
	max-width: 100%;
}

#primary,
.site-main,
#main {
	width: 100%;
	max-width: 100%;
	flex: 1 1 100%;
	margin-inline: auto;
}

/* Board shell: centered, full width, own box model. */
.att-rating,
.att-rating * {
	box-sizing: border-box;
}

.att-rating {
	display: block;
	width: 100%;
	max-width: 100%;
	margin-inline: auto;
	margin-block: 2rem;

	/* Palette and tokens. Defined on the board so every child can read them. */
	--att-ink: #1c1f26;
	--att-muted: #5a616e;
	--att-line: #dfe3ea;
	--att-paper: #fbfbfc;
	--att-paper-alt: #f1f3f7;
	--att-accent: #b8860b;
	--att-accent-soft: #faf3e0;
	--att-radius: 12px;
	--att-gutter: 1.25rem;
	--att-shadow: 0 1px 2px rgba(28, 31, 38, 0.06), 0 6px 16px rgba(28, 31, 38, 0.06);

	color: var(--att-ink);
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	font-size: 16px;
	line-height: 1.45;
}

/* Optional board heading. */
.att-rating__heading {
	margin: 0 0 1.25rem;
	font-size: 1.5rem;
	line-height: 1.25;
	font-weight: 700;
	color: var(--att-ink);
	letter-spacing: -0.01em;
}

/* Reset the ordered list; ranking is rendered by the rank badge. */
.att-rating__list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: block;
	width: 100%;
}

/* Cards stack vertically on every viewport: numbers must stay readable. */
.att-rating__item {
	display: grid;
	grid-template-columns: 2.5rem minmax(0, 1fr);
	/* Every band owns its own row. The score used to share the figures row and
	   painted over the money chip; it now sits in its own band above them. */
	grid-template-areas:
		"rank head"
		"rank score"
		"rank figures"
		"rank lines"
		"rank pay"
		"rank action";
	column-gap: var(--att-gutter);
	row-gap: 0.75rem;
	align-items: start;

	width: 100%;
	margin: 0 0 1rem;
	padding: var(--att-gutter);

	background: var(--att-paper);
	border: 1px solid var(--att-line);
	border-radius: var(--att-radius);
	box-shadow: var(--att-shadow);
}

.att-rating__item:last-child {
	margin-bottom: 0;
}

/* Rank badge. */
.att-rating__rank {
	grid-area: rank;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 2.5rem;
	height: 2.5rem;
	border-radius: 999px;
	background: var(--att-accent-soft);
	color: var(--att-ink);
	font-size: 1.125rem;
	font-weight: 700;
	font-variant-numeric: tabular-nums;
	border: 1px solid var(--att-accent);
	flex: 0 0 auto;
}

/* Head line: name, licence chip, rail chip. */
.att-rating__head {
	grid-area: head;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.5rem 0.75rem;
	min-width: 0;
}

.att-rating__name {
	margin: 0;
	font-size: 1.25rem;
	line-height: 1.25;
	font-weight: 700;
	color: var(--att-ink);
	min-width: 0;
	overflow-wrap: anywhere;
}

/* Licence chip stays quiet: grey border, muted text. */
.att-rating__licence {
	display: inline-flex;
	align-items: center;
	padding: 0.125rem 0.5rem;
	font-size: 0.75rem;
	font-weight: 600;
	letter-spacing: 0.02em;
	color: var(--att-muted);
	background: transparent;
	border: 1px solid var(--att-line);
	border-radius: 999px;
	white-space: nowrap;
}

/* VISA chip. */
.att-rating__rail {
	display: inline-flex;
	align-items: center;
	padding: 0.125rem 0.5rem;
	font-size: 0.75rem;
	font-weight: 700;
	letter-spacing: 0.06em;
	color: var(--att-ink);
	background: var(--att-paper-alt);
	border: 1px solid var(--att-line);
	border-radius: 6px;
	white-space: nowrap;
}

/* Figures row: money chip is the hero, spins secondary. */
.att-rating__figures {
	grid-area: figures;
	display: flex;
	flex-wrap: wrap;
	align-items: flex-end;
	gap: 0.5rem 1.25rem;
	min-width: 0;
	padding-block: 0.125rem;
}

.att-rating__money {
	font-size: clamp(1.375rem, 4vw, 1.875rem);
	line-height: 1.15;
	font-weight: 800;
	color: var(--att-ink);
	font-variant-numeric: tabular-nums;
	letter-spacing: -0.01em;
	min-width: 0;
	overflow-wrap: anywhere;
}

.att-rating__spins {
	font-size: 1rem;
	line-height: 1.2;
	font-weight: 600;
	color: var(--att-muted);
	font-variant-numeric: tabular-nums;
	white-space: normal;
}

/* Computed score block: own grid band, never overlapping the figures. */
.att-rating__score {
	grid-area: score;
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	grid-template-areas:
		"bar value"
		"label label";
	align-items: center;
	gap: 0.375rem 0.75rem;
	width: 100%;
	min-width: 0;
}

.att-rating__score-bar {
	grid-area: bar;
	position: relative;
	display: block;
	width: 100%;
	height: 8px;
	background: var(--att-line);
	border-radius: 999px;
	overflow: hidden;
}

.att-rating__score-fill {
	display: block;
	height: 100%;
	background: var(--att-accent);
	border-radius: 999px;
	transition: width 240ms ease;
}

.att-rating__score-value {
	grid-area: value;
	font-size: 0.9375rem;
	font-weight: 700;
	color: var(--att-ink);
	font-variant-numeric: tabular-nums;
	white-space: nowrap;
}

.att-rating__score-label {
	grid-area: label;
	font-size: 0.8125rem;
	font-weight: 600;
	color: var(--att-muted);
}

/* Offer lines: small text, dashed separators, markers off. */
.att-rating__lines {
	grid-area: lines;
	list-style: none;
	margin: 0;
	padding: 0;
	min-width: 0;
	font-size: 0.875rem;
	line-height: 1.4;
	color: var(--att-muted);
}

.att-rating__lines > li {
	margin: 0;
	padding: 0.375rem 0;
	border-top: 1px dashed var(--att-line);
	min-width: 0;
	word-break: break-word;
	overflow-wrap: anywhere;
}

.att-rating__lines > li:first-child {
	border-top: 0;
	padding-top: 0;
}

.att-rating__lines > li:last-child {
	padding-bottom: 0;
}

/* Payment strip: small grey chips. Rendered only when gateways exist. */
.att-rating__pay {
	grid-area: pay;
	display: flex;
	flex-wrap: wrap;
	gap: 0.375rem;
	min-width: 0;
}

.att-rating__pay-item {
	display: inline-flex;
	align-items: center;
	padding: 0.1875rem 0.5rem;
	font-size: 0.75rem;
	font-weight: 600;
	letter-spacing: 0.02em;
	color: var(--att-muted);
	background: var(--att-paper-alt);
	border: 1px solid var(--att-line);
	border-radius: 6px;
	white-space: nowrap;
}

/* Primary action. */
.att-rating__button {
	grid-area: action;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 44px;
	padding-inline: 1.25rem;
	padding-block: 0.625rem;
	max-width: 100%;

	font-size: 0.9375rem;
	font-weight: 700;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	text-decoration: none;
	color: #fffaf0;
	background: var(--att-accent);
	border: 1px solid var(--att-accent);
	border-radius: 10px;
	cursor: pointer;
	transition: background-color 180ms ease, box-shadow 180ms ease;
}

.att-rating__button:hover {
	background: #9c7209;
	border-color: #9c7209;
}

.att-rating__button:focus-visible {
	outline: 3px solid var(--att-ink);
	outline-offset: 3px;
}

/* Footnote about score meaning. */
.att-rating__hint {
	margin: 1rem 0 0;
	font-size: 0.8125rem;
	line-height: 1.5;
	color: var(--att-muted);
}

/* Disclaimer fallback text under the board. */
.att-rating__fallback {
	margin: 1rem 0 0;
	font-size: 0.75rem;
	line-height: 1.5;
	color: var(--att-muted);
	word-break: break-word;
	overflow-wrap: anywhere;
}

/* Tablet: figures hold their place, action still inline with content. */
@media (max-width: 900px) {
	.att-rating {
		--att-gutter: 1rem;
	}

	.att-rating__heading {
		font-size: 1.375rem;
	}

	.att-rating__name {
		font-size: 1.125rem;
	}

	.att-rating__score {
		grid-template-columns: minmax(0, 1fr) auto;
	}
}

/* Mobile: single column card, full width button. */
@media (max-width: 640px) {
	.att-rating {
		margin-block: 1.5rem;
	}

	.att-rating__item {
		grid-template-columns: minmax(0, 1fr);
		grid-template-areas:
			"rank"
			"head"
			"score"
			"figures"
			"lines"
			"pay"
			"action";
		column-gap: 0;
		row-gap: 0.625rem;
	}

	.att-rating__rank {
		justify-self: start;
	}

	.att-rating__button {
		width: 100%;
	}

	.att-rating__figures {
		gap: 0.375rem 0.75rem;
	}
}

/* Small phones: keep everything inside the viewport, no horizontal scroll. */
@media (max-width: 390px) {
	.att-rating {
		--att-gutter: 0.875rem;
		margin-block: 1rem;
	}

	.att-rating__heading {
		font-size: 1.25rem;
	}

	.att-rating__item {
		padding: var(--att-gutter);
	}

	.att-rating__name {
		font-size: 1.0625rem;
		overflow-wrap: anywhere;
	}

	.att-rating__figures {
		flex-direction: column;
		align-items: flex-start;
		gap: 0.25rem;
	}

	.att-rating__money {
		font-size: 1.25rem;
		overflow-wrap: anywhere;
		word-break: break-word;
	}

	.att-rating__spins {
		font-size: 0.9375rem;
	}

	.att-rating__score {
		grid-template-columns: minmax(0, 1fr);
		grid-template-areas:
			"bar"
			"value"
			"label";
		justify-items: start;
	}

	.att-rating__lines {
		font-size: 0.8125rem;
		overflow-wrap: anywhere;
		word-break: break-word;
	}

	.att-rating__lines > li {
		overflow-wrap: anywhere;
		word-break: break-word;
	}

	.att-rating__button {
		padding-inline: 1rem;
		letter-spacing: 0.03em;
	}

	.att-rating__hint,
	.att-rating__fallback {
		font-size: 0.75rem;
		overflow-wrap: anywhere;
	}
}

/* Respect reduced motion preferences. */
@media (prefers-reduced-motion: reduce) {
	.att-rating__score-fill,
	.att-rating__button {
		transition: none;
	}
}

/* Responsive verified for 1920, 1440, 1280, 1024 and 390 px viewports. */