/**
 * Loyalty.lt storefront styles.
 *
 * Colours, radii and shadows come only from assets/css/loyalty-lt-tokens.css,
 * which mirrors the mobile app palette. Everything is scoped to .loyalty-lt
 * (or a .loyalty-lt-* class) so themes are left alone.
 */

.loyalty-lt,
.loyalty-lt * {
	box-sizing: border-box;
}

.loyalty-lt {
	font-family: var(--loyalty-font-body);
	color: var(--loyalty-text);
	line-height: 1.45;
}

.loyalty-lt [hidden] {
	display: none !important;
}

/* ── Text ── */
.loyalty-lt-title {
	margin: 0 0 6px;
	font-family: var(--loyalty-font-heading);
	font-size: 18px;
	font-weight: 700;
	line-height: 1.25;
	color: var(--loyalty-heading);
}

.loyalty-lt img.loyalty-lt-logo,
.loyalty-lt-admin img.loyalty-lt-logo {
	display: block;
	flex: 0 0 auto;
	align-self: flex-start;
	width: auto;
	height: 26px;
	object-fit: contain;
	max-width: none;
	margin: 0;
	border: 0;
	border-radius: 0;
	box-shadow: none;
}

.loyalty-lt-eyebrow {
	display: block;
	font-size: 12px;
	font-weight: 600;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: var(--loyalty-text-muted);
}

.loyalty-lt-muted {
	margin: 0;
	font-size: 13px;
	color: var(--loyalty-text-muted);
}

.loyalty-lt-status {
	margin: 0;
	padding: 10px 14px;
	border-radius: var(--loyalty-radius-sm);
	font-size: 13px;
	font-weight: 500;
	background: var(--loyalty-success-bg);
	color: var(--loyalty-success-ink);
}

.loyalty-lt-status.is-error {
	background: var(--loyalty-error-bg);
	color: var(--loyalty-error-ink);
}

/* ── Controls ── */
.loyalty-lt-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 44px;
	padding: 0 20px;
	border: 1px solid var(--loyalty-interactive);
	border-radius: var(--loyalty-radius-pill);
	background: var(--loyalty-interactive);
	color: var(--loyalty-ink-inverted);
	font: 600 14px/1 var(--loyalty-font-body);
	text-decoration: none;
	white-space: nowrap;
	cursor: pointer;
	transition: background-color 0.15s ease, border-color 0.15s ease;
}

.loyalty-lt-button:hover,
.loyalty-lt-button:focus-visible {
	background: var(--loyalty-interactive-hover);
	border-color: var(--loyalty-interactive-hover);
	color: var(--loyalty-ink-inverted);
}

.loyalty-lt-button--ghost {
	background: transparent;
	border-color: var(--loyalty-line-strong);
	color: var(--loyalty-text);
}

.loyalty-lt-button--ghost:hover,
.loyalty-lt-button--ghost:focus-visible {
	background: var(--loyalty-app-bg);
	border-color: var(--loyalty-line-strong);
	color: var(--loyalty-text);
}

.loyalty-lt-button:disabled {
	opacity: 0.5;
	cursor: default;
}

.loyalty-lt-link {
	padding: 0;
	border: 0;
	background: none;
	color: var(--loyalty-success);
	font: 600 13px/1.4 var(--loyalty-font-body);
	text-decoration: underline;
	text-underline-offset: 3px;
	cursor: pointer;
}

.loyalty-lt-input {
	flex: 1 1 140px;
	min-width: 0;
	min-height: 44px;
	padding: 0 14px;
	border: 1px solid var(--loyalty-line-strong);
	border-radius: var(--loyalty-radius-field);
	background: var(--loyalty-surface);
	color: var(--loyalty-text);
	font: 500 15px/1 var(--loyalty-font-body);
}

.loyalty-lt-input:focus {
	outline: 2px solid var(--loyalty-primary);
	outline-offset: 1px;
	border-color: var(--loyalty-primary);
}

.loyalty-lt-row,
.loyalty-lt-actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 10px;
}

/* ── Badge (also sits inside theme price elements) ── */
.loyalty-lt-badge {
	display: inline-flex;
	align-items: center;
	padding: 3px 10px;
	border-radius: var(--loyalty-radius-pill);
	background: var(--loyalty-badge-bg);
	color: var(--loyalty-badge-color);
	font: 600 12px/1.5 var(--loyalty-font-body);
	letter-spacing: 0;
	text-decoration: none;
	white-space: nowrap;
	vertical-align: middle;
}

.loyalty-lt-badge--muted {
	background: var(--loyalty-app-bg);
	color: var(--loyalty-text-muted);
}

.loyalty-lt-earn-row th,
.loyalty-lt-earn-row td {
	font-weight: 500;
}

/* ── Surfaces ── */
.loyalty-lt-box,
.loyalty-lt-qr,
.loyalty-lt-thankyou,
.loyalty-lt-card,
.loyalty-lt-banner {
	border: 1px solid var(--loyalty-border);
	border-radius: var(--loyalty-radius);
	background: var(--loyalty-surface);
	box-shadow: var(--loyalty-shadow);
}

.loyalty-lt-box,
.loyalty-lt-thankyou {
	display: flex;
	flex-direction: column;
	align-items: stretch;
	gap: 12px;
	margin: 0 0 24px;
	padding: 20px;
}

.loyalty-lt-box.is-busy {
	opacity: 0.6;
	pointer-events: none;
}

.loyalty-lt-box__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
}

.loyalty-lt-box__head > div {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.loyalty-lt-box__balance {
	display: block;
	font-family: var(--loyalty-font-heading);
	font-size: 22px;
	font-weight: 700;
	color: var(--loyalty-heading);
}

.loyalty-lt-applied {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 12px 14px;
	border-radius: var(--loyalty-radius-sm);
	background: var(--loyalty-light-bg);
	color: var(--loyalty-success-ink);
	font-size: 14px;
	font-weight: 600;
}

.loyalty-lt-coupons {
	display: flex;
	flex-direction: column;
	gap: 10px;
	padding-top: 12px;
	border-top: 1px solid var(--loyalty-line);
}

.loyalty-lt-coupon-list {
	display: flex;
	flex-direction: column;
	gap: 8px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.loyalty-lt-coupon {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	width: 100%;
	padding: 12px 14px;
	border: 1px dashed var(--loyalty-primary);
	border-radius: var(--loyalty-radius-sm);
	background: var(--loyalty-surface-green);
	color: var(--loyalty-heading);
	font: 500 14px/1.4 var(--loyalty-font-body);
	text-align: left;
	cursor: pointer;
}

.loyalty-lt-coupon:hover,
.loyalty-lt-coupon:focus-visible {
	border-style: solid;
}

/* ── QR panel ── */
.loyalty-lt-qr {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 20px;
	margin: 0 0 24px;
	padding: 20px;
}

.loyalty-lt-qr__code {
	display: flex;
	flex: 0 0 auto;
	align-items: center;
	justify-content: center;
	width: 172px;
	height: 172px;
	padding: 10px;
	border: 1px solid var(--loyalty-line);
	border-radius: var(--loyalty-radius-sm);
	background: var(--loyalty-surface);
}

.loyalty-lt-qr__code img {
	display: block;
	width: 100%;
	height: 100%;
	margin: 0;
}

.loyalty-lt-qr__body {
	display: flex;
	flex: 1 1 240px;
	flex-direction: column;
	align-items: flex-start;
	gap: 10px;
	min-width: 0;
}

.loyalty-lt-qr__manual {
	margin: 0;
	font-size: 13px;
	color: var(--loyalty-text-muted);
}

.loyalty-lt-qr__manual strong {
	color: var(--loyalty-text);
	font-variant-numeric: tabular-nums;
	letter-spacing: 0.08em;
}

.loyalty-lt-skeleton {
	display: block;
	width: 100%;
	height: 100%;
	border-radius: 8px;
	background: var(--loyalty-app-bg);
	animation: loyalty-lt-pulse 1.2s ease-in-out infinite;
}

@keyframes loyalty-lt-pulse {
	50% {
		opacity: 0.45;
	}
}

@media (prefers-reduced-motion: reduce) {
	.loyalty-lt-skeleton {
		animation: none;
	}
}

/* ── Account ── */
.loyalty-lt-account {
	display: flex;
	flex-direction: column;
	gap: var(--loyalty-section-gap);
	margin: 0 0 28px;
}

.loyalty-lt-hero {
	display: flex;
	flex-direction: column;
	gap: 10px;
	padding: 24px;
	border: 1px solid var(--loyalty-border);
	border-radius: var(--loyalty-radius-lg);
	background: var(--loyalty-surface);
	box-shadow: var(--loyalty-shadow-lg);
}

.loyalty-lt-hero__top,
.loyalty-lt-hero__meta {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
}

.loyalty-lt-hero__tier {
	padding: 4px 12px;
	border-radius: var(--loyalty-radius-pill);
	background: var(--loyalty-light-bg);
	color: var(--loyalty-success-ink);
	font-size: 12px;
	font-weight: 600;
}

.loyalty-lt-hero__balance {
	font-family: var(--loyalty-font-heading);
	font-size: 36px;
	font-weight: 700;
	line-height: 1.15;
	color: var(--loyalty-heading);
}

.loyalty-lt-hero__meta {
	font-size: 13px;
	font-variant-numeric: tabular-nums;
	color: var(--loyalty-text-muted);
}

.loyalty-lt-card {
	display: flex;
	flex-direction: column;
	gap: 10px;
	padding: 18px 20px;
}

.loyalty-lt-card__head {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 12px;
	color: var(--loyalty-heading);
}

.loyalty-lt-progress {
	height: 8px;
	overflow: hidden;
	border-radius: var(--loyalty-radius-pill);
	background: var(--loyalty-light-bg);
}

.loyalty-lt-progress span {
	display: block;
	height: 100%;
	border-radius: inherit;
	background: var(--loyalty-primary);
}

.loyalty-lt-stamps {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(34px, 1fr));
	gap: 8px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.loyalty-lt-stamps li {
	aspect-ratio: 1;
	border: 2px dashed var(--loyalty-line-strong);
	border-radius: 50%;
}

.loyalty-lt-stamps li.is-filled {
	border: 0;
	background: var(--loyalty-primary);
}

.loyalty-lt-account__foot {
	display: flex;
	flex-wrap: wrap;
	gap: 6px 12px;
}

/* ── Product banner ── */
.loyalty-lt-banner {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 10px;
	margin: 12px 0;
	padding: 12px 16px;
	font-size: 14px;
}

/* ── Consent ── */
.loyalty-lt-consent label {
	font-size: 13px;
	color: var(--loyalty-text-muted);
}

/* ── Floating widget ── */
.loyalty-lt-widget {
	position: fixed;
	right: 16px;
	bottom: 16px;
	z-index: 900;
	display: inline-flex;
	align-items: center;
	gap: 8px;
	min-height: 44px;
	padding: 0 18px;
	border-radius: var(--loyalty-radius-pill);
	background: var(--loyalty-interactive);
	color: var(--loyalty-ink-inverted);
	font: 600 14px/1 var(--loyalty-font-body);
	text-decoration: none;
	box-shadow: var(--loyalty-shadow-lg);
}

.loyalty-lt-widget:hover,
.loyalty-lt-widget:focus-visible {
	background: var(--loyalty-interactive-hover);
	color: var(--loyalty-ink-inverted);
}

.loyalty-lt-widget__dot {
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: var(--loyalty-primary);
}

@media (max-width: 480px) {
	.loyalty-lt-qr {
		flex-direction: column;
		text-align: center;
	}

	.loyalty-lt-qr .loyalty-lt-actions {
		justify-content: center;
	}

	.loyalty-lt-hero__balance {
		font-size: 30px;
	}
}
