/* Catch & Keep Cashback – cart, checkout and My Account. Inherits the theme; site tokens with neutral fallbacks.
 * Styling hooks for the site design: .ckcb-cashback-row (earn row in cart, checkout and side cart), .ckcb-earn-amount
 * (its amount), .ckcb-cashback-amount (redeemed cashback fee), the custom property --ckcb-earn-color and in My Account
 * .ckcb-club (club card), .ckcb-table-wrap / .ckcb-table (rewards and history) and .ckcb-account-field. */

.ckcb-earn-amount {
	color: var(--ckcb-earn-color, currentColor);
}

.ckcb-redeem {
	--ckcb-surface: var(--surface-soft, #f2f2f6);
	--ckcb-radius: var(--ck-card-radius, 8px);
	--ckcb-muted: var(--text-muted, #606060);
	--ckcb-danger: var(--brand-orange, #b32d2e);
	display: grid;
	gap: 8px;
	margin: 0 0 16px;
	padding: 12px 14px;
	border-radius: var(--ckcb-radius);
	background: var(--ckcb-surface);
}

.ckcb-redeem.is-loading {
	opacity: 0.6;
	pointer-events: none;
}

.ckcb-redeem__toggle {
	display: flex;
	align-items: center;
	gap: 8px;
	margin: 0;
	font-weight: 600;
	cursor: pointer;
}

.ckcb-redeem__check {
	flex: 0 0 auto;
	width: 18px;
	height: 18px;
	margin: 0;
}

.ckcb-redeem__applied,
.ckcb-redeem__notice,
.ckcb-redeem__msg {
	margin: 0;
	font-size: 0.875em;
}

.ckcb-redeem__notice,
.ckcb-redeem__msg:not(:empty) {
	color: var(--ckcb-danger);
}

.ckcb-redeem__msg:empty {
	display: none;
}

.ckcb-redeem__change {
	justify-self: start;
	padding: 0;
	border: 0;
	background: none;
	color: inherit;
	font: inherit;
	font-size: 0.875em;
	text-decoration: underline;
	cursor: pointer;
}

.ckcb-redeem__amount {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 6px 8px;
}

.ckcb-redeem__amount[hidden] {
	display: none;
}

.ckcb-redeem__amount label {
	flex: 1 0 100%;
	margin: 0;
	font-size: 0.875em;
}

.ckcb-redeem__input {
	flex: 1 1 120px;
	min-width: 0;
	max-width: 180px;
}

.ckcb-earn-row__hint {
	display: block;
	margin-top: 2px;
	font-size: 0.8em;
	font-weight: 400;
	line-height: 1.35;
	color: var(--text-muted, #606060);
}

/* Free gift picker (classic cart). */
.ckcb-gifts {
	clear: both;
	margin: 0 0 24px;
}

.ckcb-gifts__list {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr));
	gap: 12px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.ckcb-gifts__box {
	display: grid;
	gap: 8px;
	height: 100%;
	padding: 12px;
	border-radius: var(--ck-card-radius, 8px);
	background: var(--surface-soft, #f2f2f6);
}

.ckcb-gifts__title,
.ckcb-gifts__hint,
.ckcb-gifts__msg {
	margin: 0 0 8px;
}

.ckcb-gifts__msg:empty {
	display: none;
}

/* FunnelKit side cart: same inner spacing as its items, compact rows. */
.ckcb-gifts--side {
	margin: 8px 0 0;
	padding: 12px 16px;
	font-size: 14px;
}

.ckcb-gifts--side .ckcb-gifts__list {
	grid-template-columns: 1fr;
	gap: 8px;
}

.ckcb-gifts--side .ckcb-gifts__box {
	grid-template-columns: 1fr auto;
	align-items: center;
	padding: 8px 10px;
}

.ckcb-gifts--side .ckcb-gifts__name {
	grid-column: 1 / -1;
}

.ckcb-gifts--side .ckcb-gifts__variation {
	min-width: 0;
	max-width: 100%;
}

.ckcb-gifts--side .ckcb-gifts__add {
	grid-column: 2;
	white-space: nowrap;
}

.ckcb-gifts--side .ckcb-gifts__variation + .ckcb-gifts__add {
	grid-column: auto;
}

.ckcb-gifts__name {
	font-weight: 600;
}

/* My Account (Figma 8:181: club card, rewards table with black head, account fields). Site tokens with fallbacks;
 * the site's account design styles the headings, the counter tiles and .ckacc-btn, these rules fill the rest. */
.ckcb-account,
.ckcb-table-wrap,
.ckcb-account-field {
	--ckcb-u: var(--ck-design-unit, 1px);
	--ckcb-ink: var(--text-dark, #000);
	--ckcb-paper: var(--text-light, #fff);
	--ckcb-surface: var(--surface-soft, #f2f2f6);
	--ckcb-line: var(--line-soft, #d4d4d8);
	--ckcb-muted: var(--text-muted, #606060);
	--ckcb-lime: var(--action-lime, #a9ff00);
	--ckcb-radius: var(--ck-card-radius, 20px);
}

.ckcb-account {
	display: grid;
	gap: calc(24 * var(--ckcb-u));
	min-width: 0;
}

.ckcb-account--dashboard {
	margin-top: calc(40 * var(--ckcb-u));
}

.ckcb-account__info {
	margin: 0;
}

.ckcb-account__info,
.ckcb-field-hint {
	font-size: 0.875em;
	color: var(--ckcb-muted, #606060);
}

.ckcb-field-hint {
	display: block;
	margin-top: 4px;
}

.ckcb-account__title {
	margin: 12px 0 0;
}

/* Section head with the total on the right (design: "€ Cashback … Gesamt"). */
.ckcb-account__head {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	justify-content: space-between;
	gap: 8px calc(24 * var(--ckcb-u));
}

.ckcb-account__head .ckcb-account__title {
	margin-top: 0;
}

.ckcb-account__sum {
	margin: 0;
	font-size: max(16px, calc(22 * var(--ckcb-u)));
	font-style: italic;
	font-weight: 800;
	line-height: 1.2;
	letter-spacing: 0.02em;
	text-transform: uppercase;
}

/* Balance tiles (cashback page) like the overview counters of the design (273:4820): no boxes, thin dividers,
 * label 17 Regular grey above the value 30 SemiBold. On the site the account design (.ckacc-stats) sets the same row
 * and type; these rules are the fallback plus the two-column grid while the site uses its mobile unit. */
.ckcb-stats {
	display: grid;
	grid-auto-columns: minmax(0, 1fr);
	grid-auto-flow: column;
	margin: 0;
	padding: 0;
	list-style: none;
}

.ckcb-stat + .ckcb-stat {
	padding-left: calc(40 * var(--ckcb-u));
	border-left: 1px solid #e0e0e6;
}

.ckcb-stat__inner {
	display: block;
}

.ckcb-stat .ckacc-stat-label {
	display: block;
	color: var(--ckcb-muted);
	font-size: max(13px, calc(17 * var(--ckcb-u)));
	line-height: 1.1;
}

.ckcb-stat .ckacc-stat-value {
	display: block;
	margin-top: calc(9 * var(--ckcb-u));
	color: var(--ckcb-ink);
	font-size: max(20px, calc(30 * var(--ckcb-u)));
	font-weight: 600;
	line-height: 1;
	letter-spacing: -0.03em;
}

/* Next expiry: the date next to the amount, smaller; it moves below the amount when the tile is narrow. */
.ckcb-stat .ckcb-stat__date {
	color: var(--ckcb-muted);
	font-size: 0.6em;
	font-weight: 500;
	letter-spacing: 0;
	white-space: nowrap;
}

/* Three counters on the site's overview (orders, cashback, wishlist): icon above the text while the site uses its
 * mobile unit. :not(#ckcb-x) lifts the specificity above the site's id-scoped account rules. */
@media (max-width: 1024px) {
	.woocommerce-MyAccount-content .ckacc-stats:has(> :nth-child(3)):not(#ckcb-x) .ckacc-stat a {
		flex-direction: column;
		align-items: flex-start;
	}

	/* The plugin's tiles: two columns, dividers between the columns and above the second row. */
	.ckcb-account .ckcb-stats.ckacc-stats.ckacc-stats:not(#ckcb-x) {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		grid-auto-flow: row;
		row-gap: calc(18 * var(--ckcb-u));
	}

	.ckcb-stats.ckacc-stats .ckcb-stat.ckacc-stat.ckacc-stat:nth-child(odd):not(#ckcb-x) {
		padding-left: 0;
		border-left: 0;
	}

	.ckcb-stats.ckacc-stats .ckcb-stat.ckacc-stat.ckacc-stat:nth-child(n+3):not(#ckcb-x) {
		padding-top: calc(18 * var(--ckcb-u));
		border-top: 1px solid #e0e0e6;
	}
}

/* C&K Club card (design 14:971): level, the spend still needed with a progress bar, the club button.
 * With an image (setting "Club card image"): photo, dark overlay on the text side, white text, lime level and bar.
 * Without: grey card, dark text, the level on a lime chip. */
.ckcb-club {
	position: relative;
	isolation: isolate;
	overflow: hidden;
	border: 1px solid #dedee2;
	border-radius: var(--ckcb-radius);
	background: var(--ckcb-surface);
	color: var(--ckcb-ink);
}

.ckcb-club__body {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: calc(24 * var(--ckcb-u)) calc(40 * var(--ckcb-u));
	padding: calc(36 * var(--ckcb-u)) calc(40 * var(--ckcb-u));
}

.ckcb-club__main {
	display: grid;
	flex: 1 1 calc(380 * var(--ckcb-u));
	gap: calc(24 * var(--ckcb-u));
	min-width: 0;
}

.ckcb-club .ckcb-club__title {
	margin: 0;
	color: inherit;
	font-size: max(16px, calc(20 * var(--ckcb-u)));
	font-style: normal;
	font-weight: 500;
	line-height: 1.5;
	letter-spacing: -0.008em;
	text-transform: uppercase;
}

.ckcb-club .ckcb-club__level {
	padding: 0 0.3em;
	border-radius: 4px;
	background: var(--ckcb-lime);
	color: var(--ckcb-ink);
	font-weight: 900;
}

.ckcb-club__goal {
	display: grid;
	gap: calc(12 * var(--ckcb-u));
	max-width: max(260px, calc(420 * var(--ckcb-u)));
}

.ckcb-club .ckcb-club__gap {
	margin: 0;
	color: inherit;
	font-size: max(15px, calc(18 * var(--ckcb-u)));
	line-height: 1.3;
	letter-spacing: -0.01em;
}

.ckcb-club__gap strong {
	font-weight: 700;
}

.ckcb-club__bar {
	display: block;
	height: 7px;
	overflow: hidden;
	border-radius: 150px;
	background: var(--ckcb-line);
}

.ckcb-club__fill {
	display: block;
	height: 100%;
	border-radius: inherit;
	background: var(--ckcb-ink);
}

.ckcb-club .ckcb-club__scale {
	display: flex;
	justify-content: space-between;
	gap: 12px;
	margin: 0;
	color: inherit;
	font-size: max(14px, calc(18 * var(--ckcb-u)));
	font-weight: 700;
	line-height: 1;
}

/* The button is the site's brand button (classes ck-brand-button ck-button-green: shape, C mark, caption, hover,
 * focus). Here only its size in the card; below a plain fallback with the lowest specificity for sites without them. */
.ckcb-club__cta {
	flex: 0 0 auto;
	width: max-content;
	max-width: 100%;
}

.ckcb-club :where(.ckcb-club__cta) {
	display: inline-flex;
	align-items: center;
	padding: 10px 24px;
	background: var(--ckcb-lime);
	color: var(--ckcb-ink);
	font-weight: 800;
	text-decoration: none;
	text-transform: uppercase;
}

.ckcb-club :where(.ckcb-club__cta .ck-button-mark) {
	display: none;
}

.ckcb-club--photo {
	border-color: transparent;
	background: var(--surface-ink, #09090b);
	color: var(--ckcb-paper);
}

.ckcb-club .ckcb-club__photo {
	position: absolute;
	inset: 0;
	z-index: -2;
	width: 100%;
	max-width: none;
	height: 100%;
	margin: 0;
	border-radius: 0;
	object-fit: cover;
	object-position: 0 30%;
}

/* Dark on the text side: white text keeps at least 4.5:1 on any part of the photo there. */
.ckcb-club--photo::before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: -1;
	background: linear-gradient(90deg, rgba(9, 9, 11, 0) 22%, rgba(9, 9, 11, 0.55) 44%, rgba(9, 9, 11, 0.86) 60%, rgba(9, 9, 11, 0.92) 100%);
}

.ckcb-club--photo .ckcb-club__level {
	padding: 0;
	background: none;
	color: var(--ckcb-lime);
}

.ckcb-club--photo .ckcb-club__bar {
	background: rgba(255, 255, 255, 0.3);
}

.ckcb-club--photo .ckcb-club__fill {
	background: var(--ckcb-lime);
}

@media (min-width: 1025px) {
	.ckcb-club--photo {
		min-height: max(210px, calc(251 * var(--ckcb-u)));
	}

	.ckcb-club--photo .ckcb-club__body {
		flex-direction: column;
		flex-wrap: nowrap;
		align-items: flex-start;
		justify-content: center;
		width: min(100%, max(300px, calc(375 * var(--ckcb-u))));
		min-height: inherit;
		margin-left: auto;
		padding: calc(39 * var(--ckcb-u));
		gap: calc(30 * var(--ckcb-u));
	}

	.ckcb-club--photo .ckcb-club__main {
		flex: none;
		width: 100%;
		gap: calc(30 * var(--ckcb-u));
	}
}

/* Small screens and tablets (the site's mobile unit): photo band on top, text below, button under the text. */
@media (max-width: 1024px) {
	.ckcb-club__body {
		flex-direction: column;
		align-items: stretch;
		padding: calc(26 * var(--ckcb-u)) calc(22 * var(--ckcb-u));
	}

	.ckcb-club__main {
		flex: none;
		gap: calc(16 * var(--ckcb-u));
	}

	.ckcb-club__goal {
		gap: calc(10 * var(--ckcb-u));
		max-width: none;
	}

	.ckcb-club__cta {
		align-self: flex-start;
	}

	.ckcb-club .ckcb-club__photo {
		bottom: auto;
		height: calc(190 * var(--ckcb-u));
		object-position: 0 25%;
	}

	.ckcb-club--photo::before {
		background: linear-gradient(180deg, rgba(9, 9, 11, 0) 0, rgba(9, 9, 11, 0.2) calc(100 * var(--ckcb-u)), var(--surface-ink, #09090b) calc(190 * var(--ckcb-u)));
	}

	.ckcb-club--photo .ckcb-club__body {
		padding-top: calc(165 * var(--ckcb-u));
	}
}

/* Tables (rewards, history): black head, soft surface, thin lines; cards on small screens. */
.ckcb-table-wrap {
	overflow: hidden;
	border-radius: var(--ckcb-radius);
	background: var(--ckcb-surface);
}

.ckcb-table-wrap .ckcb-table {
	width: 100%;
	margin: 0;
	border: 0;
	border-collapse: collapse;
	border-spacing: 0;
	background: transparent;
	color: var(--ckcb-ink);
	font-size: max(13px, calc(16 * var(--ckcb-u)));
	line-height: 1.4;
}

.ckcb-table-wrap .ckcb-table :is(th, td) {
	padding: calc(14 * var(--ckcb-u)) calc(22 * var(--ckcb-u));
	border: 0;
	background: transparent;
	font-weight: 400;
	text-align: start;
	vertical-align: middle;
}

.ckcb-table-wrap .ckcb-table thead th {
	padding-block: calc(19 * var(--ckcb-u));
	background: var(--ckcb-ink);
	color: var(--ckcb-paper);
	font-size: max(13px, calc(17 * var(--ckcb-u)));
	font-weight: 600;
	white-space: nowrap;
}

.ckcb-table-wrap .ckcb-table thead th + th {
	border-inline-start: 1px solid #4c4c4c;
}

.ckcb-table-wrap .ckcb-table tbody tr + tr > :is(th, td) {
	border-top: 1px solid var(--ckcb-line);
}

.ckcb-table-wrap .ckcb-table tbody :is(th, td) + :is(th, td) {
	border-inline-start: 1px solid var(--ckcb-line);
}

.ckcb-table-wrap .ckcb-table tbody .ckcb-table__name {
	font-weight: 500;
}

.ckcb-table-wrap .ckcb-table .ckcb-table__num {
	text-align: end;
	white-space: nowrap;
}

.ckcb-rewards__status {
	display: block;
	margin-top: 2px;
	color: var(--ckcb-muted);
	font-size: 0.875em;
	font-weight: 400;
}

.ckcb-rewards__status a {
	color: inherit;
	font-weight: 600;
	text-decoration: underline;
	text-underline-offset: 0.18em;
}

.ckcb-history__delta.is-plus {
	color: var(--text-success, #1a7f37);
}

.ckcb-history__delta.is-zero {
	color: var(--ckcb-muted, #606060);
}

/* Cards while the site uses its mobile unit (up to 1024 px), so the scaled type never overflows the columns. */
@media (max-width: 1024px) {
	.ckcb-table-wrap .ckcb-table thead {
		position: absolute;
		width: 1px;
		height: 1px;
		overflow: hidden;
		clip-path: inset(50%);
		white-space: nowrap;
	}

	.ckcb-table-wrap .ckcb-table,
	.ckcb-table-wrap .ckcb-table tbody {
		display: block;
	}

	.ckcb-table-wrap .ckcb-table tbody tr {
		display: grid;
		gap: 6px;
		padding: calc(16 * var(--ckcb-u)) calc(20 * var(--ckcb-u));
	}

	.ckcb-table-wrap .ckcb-table tbody tr + tr {
		border-top: 1px solid var(--ckcb-line);
	}

	.ckcb-table-wrap .ckcb-table tbody :is(th, td),
	.ckcb-table-wrap .ckcb-table tbody tr + tr > :is(th, td),
	.ckcb-table-wrap .ckcb-table tbody :is(th, td) + :is(th, td) {
		display: flex;
		justify-content: space-between;
		gap: 12px;
		padding: 0;
		border: 0;
		text-align: end;
	}

	.ckcb-table-wrap .ckcb-table tbody .ckcb-table__name {
		display: block;
		font-weight: 600;
		text-align: start;
	}

	.ckcb-table-wrap .ckcb-table tbody td::before {
		content: attr(data-title);
		color: var(--ckcb-muted);
		text-align: start;
	}
}

.ckcb-bonuses {
	display: grid;
	gap: 6px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.ckcb-bonuses li {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	gap: 4px 12px;
}

.ckcb-bonuses__status {
	color: var(--text-muted, #606060);
}

.ckcb-pending {
	display: grid;
	gap: 4px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.ckcb-order-line {
	margin: 12px 0;
}

/* Kontodetails: birthday and Instagram span the site's two-column form; the button sits next to the field. */
.ckcb-account-field {
	grid-column: 1 / -1;
}

.ckcb-instagram-row {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: calc(12 * var(--ckcb-u)) calc(16 * var(--ckcb-u));
}

.ckcb-instagram-row input {
	flex: 1 1 calc(320 * var(--ckcb-u));
	min-width: 0;
}

.ckcb-instagram-field .ckcb-instagram-follow {
	flex: 0 0 auto;
	padding: 10px 20px;
	border: 0;
	background: var(--ckcb-lime);
	color: var(--ckcb-ink);
	font-weight: 800;
	text-transform: uppercase;
}

.ckcb-instagram-field .ckcb-instagram-follow:disabled {
	opacity: 0.6;
	cursor: progress;
}

.ckcb-instagram-feedback {
	display: block;
	font-size: 0.875em;
}

.ckcb-instagram-feedback:empty {
	display: none;
}

/* Voucher codes in the My Account order view. */
.ckcb-vouchers {
	margin: 24px 0;
}

.ckcb-vouchers__table code {
	font-size: 15px;
	letter-spacing: 0.04em;
	white-space: nowrap;
}

.ckcb-vouchers__hint {
	margin-top: 8px;
	font-size: 13px;
	opacity: 0.8;
}

/* E-mail confirmation notice for reserved cashback (My Account). */
.ckcb-verify-notice__text {
	margin: 0;
}

.ckcb-verify-notice__form {
	margin: 12px 0 0;
}
