/**
 * 2NET Rewards — storefront styles (SPEC §10).
 * Mobile-first, unbranded: inherits the theme's own type and colour, adds only
 * layout and a restrained accent through currentColor. No gradients, no fixed
 * brand palette — the accent follows the surrounding text colour so the panel
 * sits inside any theme.
 */

/* ---- Layout scaffold ---------------------------------------------------- */
.tnrw-account {
	display: flex;
	flex-direction: column;
	gap: 1.15em;
}

.tnrw-card {
	padding: 1.1em 1.15em;
	border: 1px solid rgba( 0, 0, 0, 0.12 );
	border-radius: 8px;
	background: rgba( 0, 0, 0, 0.015 );
}

.tnrw-card--accent {
	border-color: currentColor;
	background: rgba( 0, 0, 0, 0.03 );
}

.tnrw-card__title {
	margin: 0 0 0.7em;
	font-size: 1.02em;
	line-height: 1.25;
}

.tnrw-account__guest {
	margin: 0;
	opacity: 0.85;
}

/* ---- Balance summary ---------------------------------------------------- */
.tnrw-balance {
	display: flex;
	flex-direction: column;
	gap: 0.1em;
}

.tnrw-balance__label {
	font-size: 0.85em;
	text-transform: uppercase;
	letter-spacing: 0.03em;
	opacity: 0.7;
}

.tnrw-balance__value {
	font-size: 1.9em;
	font-weight: 700;
	line-height: 1.1;
}

.tnrw-balance__pending,
.tnrw-balance__meta {
	margin: 0.5em 0 0;
	font-size: 0.9em;
	opacity: 0.85;
}

.tnrw-redeem-hint {
	margin: 0.7em 0 0;
	font-size: 0.92em;
}

/* ---- Buttons ------------------------------------------------------------ */
.tnrw-btn {
	display: inline-block;
	margin-top: 0.9em;
	padding: 0.6em 1.1em;
	font-size: 0.95em;
	font-weight: 600;
	line-height: 1.2;
	text-align: center;
	text-decoration: none;
	cursor: pointer;
	border: 1px solid currentColor;
	border-radius: 5px;
	background: transparent;
	color: inherit;
	transition: background-color 0.15s ease, color 0.15s ease, opacity 0.15s ease;
}

.tnrw-btn:hover,
.tnrw-btn:focus {
	background: currentColor;
	color: #fff;
}

.tnrw-btn--primary {
	background: currentColor;
	color: #fff;
}

.tnrw-btn--primary:hover,
.tnrw-btn--primary:focus {
	opacity: 0.85;
}

.tnrw-btn.is-copied {
	opacity: 0.7;
}

/* ---- Progress bar ------------------------------------------------------- */
.tnrw-progress {
	height: 8px;
	margin: 0.7em 0 0.5em;
	border-radius: 999px; /* unslop-ignore -- a fully-rounded track is the standard progress-bar shape. */
	background: rgba( 0, 0, 0, 0.1 );
	overflow: hidden;
}

.tnrw-progress__fill {
	display: block;
	height: 100%;
	border-radius: 999px; /* unslop-ignore -- matches the track radius. */
	background: currentColor;
	transition: width 0.4s ease;
}

/* ---- Tier --------------------------------------------------------------- */
.tnrw-tier {
	display: flex;
	align-items: center;
	gap: 0.7em;
}

.tnrw-tier__badge {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	border-radius: 50%;
	overflow: hidden;
	flex: 0 0 auto;
}

.tnrw-tier__badge--letter {
	font-weight: 700;
	font-size: 1.1em;
	border: 2px solid currentColor;
}

.tnrw-tier__badge-img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.tnrw-tier__name {
	font-size: 1.1em;
	font-weight: 600;
}

.tnrw-tier__next {
	margin: 0.4em 0 0;
	font-size: 0.9em;
	opacity: 0.9;
}

.tnrw-tier__perks {
	margin: 0.8em 0 0;
	padding: 0;
	list-style: none;
	display: flex;
	flex-wrap: wrap;
	gap: 0.4em;
}

.tnrw-tier__perks li {
	padding: 0.25em 0.65em;
	font-size: 0.82em;
	border: 1px solid rgba( 0, 0, 0, 0.15 );
	border-radius: 4px;
}

/* ---- Pending points ----------------------------------------------------- */
.tnrw-pending {
	margin: 0;
	padding: 0;
	list-style: none;
}

.tnrw-pending__row {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	justify-content: space-between;
	gap: 0.3em 0.7em;
	padding: 0.45em 0;
	border-bottom: 1px solid rgba( 0, 0, 0, 0.07 );
}

.tnrw-pending__row:last-child {
	border-bottom: 0;
}

.tnrw-pending__points {
	font-weight: 600;
}

.tnrw-pending__date {
	font-size: 0.85em;
	opacity: 0.75;
}

/* ---- Ladder ------------------------------------------------------------- */
.tnrw-ladder + .tnrw-ladder {
	margin-top: 1.1em;
	padding-top: 1.1em;
	border-top: 1px solid rgba( 0, 0, 0, 0.08 );
}

.tnrw-ladder__head {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 0.5em;
}

.tnrw-ladder__name {
	font-weight: 600;
}

.tnrw-ladder__spend {
	font-weight: 700;
}

.tnrw-ladder__next {
	margin: 0.2em 0 0;
	font-size: 0.9em;
	opacity: 0.9;
}

.tnrw-ladder__milestones {
	margin: 0.7em 0 0;
	padding: 0;
	list-style: none;
	display: flex;
	flex-wrap: wrap;
	gap: 0.4em;
}

.tnrw-ladder__milestone {
	padding: 0.25em 0.6em;
	font-size: 0.8em;
	border: 1px solid rgba( 0, 0, 0, 0.15 );
	border-radius: 6px;
	opacity: 0.7;
}

.tnrw-ladder__milestone.is-earned {
	opacity: 1;
	border-color: currentColor;
	font-weight: 600;
}

.tnrw-ladder__reward {
	opacity: 0.8;
}

/* ---- Referral ----------------------------------------------------------- */
.tnrw-referral__intro,
.tnrw-gifts__intro,
.tnrw-birthday__intro {
	margin: 0 0 0.7em;
	font-size: 0.92em;
	opacity: 0.9;
}

.tnrw-referral__link {
	display: flex;
	flex-direction: column;
	gap: 0.5em;
}

.tnrw-referral__input {
	width: 100%;
	padding: 0.55em 0.7em;
	font-size: 0.9em;
	border: 1px solid rgba( 0, 0, 0, 0.2 );
	border-radius: 5px;
	background: #fff;
}

.tnrw-referral__copy {
	margin-top: 0;
}

.tnrw-referral__stats {
	margin: 1em 0 0;
	padding: 0;
	list-style: none;
	display: flex;
	flex-wrap: wrap;
	gap: 0.9em 1.4em;
}

.tnrw-referral__stat {
	display: flex;
	flex-direction: column;
}

.tnrw-referral__stat-value {
	font-size: 1.3em;
	font-weight: 700;
	line-height: 1.1;
}

.tnrw-referral__stat-label {
	font-size: 0.8em;
	opacity: 0.7;
}

/* ---- History table ------------------------------------------------------ */
.tnrw-history__scroll {
	width: 100%;
	overflow-x: auto;
}

.tnrw-history {
	width: 100%;
	border-collapse: collapse;
	font-size: 0.9em;
}

.tnrw-history th,
.tnrw-history td {
	padding: 0.55em 0.6em;
	text-align: left;
	border-bottom: 1px solid rgba( 0, 0, 0, 0.08 );
	vertical-align: top;
}

.tnrw-history th {
	font-size: 0.82em;
	text-transform: uppercase;
	letter-spacing: 0.02em;
	opacity: 0.7;
	white-space: nowrap;
}

.tnrw-history__date {
	white-space: nowrap;
	opacity: 0.85;
}

.tnrw-history__amount {
	text-align: right;
	white-space: nowrap;
	font-variant-numeric: tabular-nums;
	font-weight: 600;
}

.tnrw-history__amount--plus {
	color: #1a7f37;
}

.tnrw-history__amount--minus {
	color: #b42318;
}

.tnrw-history__empty {
	margin: 0;
	opacity: 0.8;
}

.tnrw-history__nav {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 0.5em;
	margin-top: 0.9em;
	font-size: 0.88em;
}

.tnrw-history__page {
	text-decoration: none;
	border-bottom: 1px solid currentColor;
}

.tnrw-history__pageinfo {
	opacity: 0.7;
}

/* ---- Birthday choice cards ---------------------------------------------- */
.tnrw-birthday__cards {
	display: grid;
	grid-template-columns: 1fr;
	gap: 0.7em;
}

.tnrw-birthday__card {
	display: flex;
	flex-direction: column;
	gap: 0.35em;
	padding: 0.9em;
	border: 1px solid rgba( 0, 0, 0, 0.14 );
	border-radius: 8px;
	background: #fff;
}

.tnrw-birthday__tag {
	font-size: 0.75em;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	opacity: 0.65;
}

.tnrw-birthday__body {
	font-weight: 600;
}

.tnrw-birthday__form {
	margin-top: auto;
}

.tnrw-birthday__form .tnrw-btn {
	width: 100%;
	margin-top: 0.5em;
}

/* ---- Join box ----------------------------------------------------------- */
.tnrw-join__title {
	margin: 0 0 0.4em;
	font-size: 1.05em;
}

.tnrw-join__intro {
	margin: 0 0 0.8em;
	opacity: 0.9;
}

.tnrw-join__consent {
	display: flex;
	align-items: flex-start;
	gap: 0.5em;
	margin: 0 0 0.9em;
	font-size: 0.88em;
	line-height: 1.4;
}

.tnrw-join__consent input {
	margin-top: 0.2em;
	flex: 0 0 auto;
}

.tnrw-register-optin {
	font-size: 0.9em;
}

/* ---- Storefront earn messages ------------------------------------------- */
.tnrw-earn {
	font-size: 0.9em;
	opacity: 0.9;
}

.tnrw-earn--single {
	margin: 0.6em 0;
	padding: 0.5em 0.75em;
	border: 1px dashed rgba( 0, 0, 0, 0.2 );
	border-radius: 5px;
	display: inline-block;
}

.tnrw-earn--loop {
	margin: 0.35em 0 0;
	font-size: 0.82em;
}

.tnrw-earn--cart {
	margin-top: 0.8em;
	padding-top: 0.8em;
	border-top: 1px dashed rgba( 0, 0, 0, 0.15 );
}

/* ---- Inline points shortcode -------------------------------------------- */
.tnrw-inline-points {
	font-weight: 600;
}

.tnrw-inline-pending {
	opacity: 0.75;
	font-size: 0.9em;
}

/* ---- Wider viewports ---------------------------------------------------- */
@media ( min-width: 480px ) {
	.tnrw-referral__link {
		flex-direction: row;
	}

	.tnrw-referral__copy {
		flex: 0 0 auto;
	}

	.tnrw-birthday__cards {
		grid-template-columns: repeat( auto-fit, minmax( 160px, 1fr ) );
	}
}

@media ( min-width: 782px ) {
	.tnrw-account {
		gap: 1.35em;
	}
}
