/**
 * BP Member Tier — Points & rewards storefront UI.
 */

.bp-mt-rewards {
	--bp-mt-accent: #8a6d1b;
	color: #1f2430;
}

.bp-mt-rewards__title {
	font-size: 22px;
	font-weight: 700;
	margin: 0 0 20px;
}

/* ---- Stat cards ---- */
.bp-mt-rewards__stats {
	display: grid;
	/* auto-fit so the row stays filled when a card (e.g. Credit Left) is hidden. */
	grid-template-columns: repeat( auto-fit, minmax( 180px, 1fr ) );
	gap: 16px;
	margin: 0 0 28px;
}

.bp-mt-stat {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 4px;
	padding: 22px 16px;
	border-radius: 12px;
	color: #fff;
	text-align: center;
}

.bp-mt-stat__value {
	font-size: 24px;
	font-weight: 700;
	line-height: 1.1;
}

.bp-mt-stat__value .woocommerce-Price-amount {
	color: #fff;
}

.bp-mt-stat__label {
	font-size: 13px;
	opacity: 0.92;
}

.bp-mt-stat--dark {
	background: #555a63;
}

.bp-mt-stat--gold {
	background: #8a6d1b;
}

.bp-mt-stat--red {
	background: #e0564a;
}

/* ---- Birthday coupon banner ---- */
.bp-mt-bday {
	display: flex;
	align-items: center;
	gap: 14px;
	flex-wrap: wrap;
	padding: 16px 20px;
	margin: 0 0 24px;
	border-radius: 12px;
	background: #fff8e6;
	border: 1px dashed #c79a2b;
}

.bp-mt-bday__title {
	font-weight: 700;
	color: #8a6d1b;
}

.bp-mt-bday__code {
	padding: 6px 14px;
	border-radius: 8px;
	background: #8a6d1b;
	color: #fff;
	font-weight: 700;
	letter-spacing: 1px;
}

.bp-mt-bday__meta {
	font-size: 13px;
	color: #6b7280;
}

/* ---- Tier cards ---- */
.bp-mt-rewards__tiers {
	display: grid;
	grid-template-columns: repeat( 4, 1fr );
	gap: 16px;
	margin: 0 0 28px;
}

.bp-mt-tier {
	display: flex;
	flex-direction: column;
	background: #fff;
	border: 1px solid #ececec;
	border-radius: 10px;
	overflow: hidden;
	box-shadow: 0 4px 16px -12px rgba( 0, 0, 0, 0.3 );
}

.bp-mt-tier.is-active {
	border: 1px solid var( --bp-mt-accent );
	box-shadow: 0 10px 26px -14px var( --bp-mt-accent );
}

.bp-mt-tier__header {
	padding: 16px;
	text-align: center;
	font-weight: 700;
	letter-spacing: 0.5px;
	border-bottom: 2px solid #1f2430;
}

.bp-mt-tier.is-active .bp-mt-tier__header {
	background: var( --bp-mt-accent );
	color: #fff;
	border-bottom-color: var( --bp-mt-accent );
}

.bp-mt-tier__row {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 4px;
	padding: 16px 14px;
	text-align: center;
	border-bottom: 1px dashed #e2e2e2;
}

.bp-mt-tier__row:last-of-type {
	border-bottom: none;
}

.bp-mt-tier__muted {
	font-size: 13px;
	color: #8a8f99;
}

.bp-mt-tier__big {
	font-size: 20px;
	font-weight: 700;
}

.bp-mt-tier__mult {
	font-size: 34px;
	font-weight: 800;
	line-height: 1;
}

.bp-mt-tier__note {
	font-size: 12px;
	color: #a2a6ae;
}

.bp-mt-tier__footer {
	margin-top: auto;
	padding: 16px 14px;
	text-align: center;
}

.bp-mt-tier__badge {
	display: inline-block;
	min-width: 120px;
	padding: 12px 18px;
	border-radius: 999px;
	border: 1px solid var( --bp-mt-accent );
	color: var( --bp-mt-accent );
	font-weight: 700;
	font-size: 14px;
}

.bp-mt-tier__badge.is-active {
	background: var( --bp-mt-accent );
	color: #fff;
	border-color: var( --bp-mt-accent );
}

.bp-mt-tier__badge.is-done {
	border-color: #cdd0d6;
	color: #59b26a;
}

/* ---- Bottom summary ---- */
.bp-mt-rewards__summary {
	display: grid;
	/* auto-fit so the lone card fills the row when the redeem card is hidden. */
	grid-template-columns: repeat( auto-fit, minmax( 240px, 1fr ) );
	gap: 16px;
}

.bp-mt-summary-card {
	display: flex;
	justify-content: space-around;
	gap: 16px;
	padding: 20px;
	background: #fff;
	border: 1px solid #ececec;
	border-radius: 12px;
	font-weight: 700;
}

.bp-mt-summary__muted {
	color: #6b7280;
	font-weight: 400;
	font-size: 13px;
	display: block;
}

.bp-mt-summary__gold {
	color: #8a6d1b;
	font-size: 20px;
}

.bp-mt-summary__red {
	color: #e0564a;
	font-size: 20px;
}

.bp-mt-summary-card .woocommerce-Price-amount {
	font-size: 20px;
}

/* ---- Point activity ---- */
.bp-mt-activity__balance {
	margin: 0 0 18px;
	font-size: 15px;
	color: #4b5563;
}

.bp-mt-activity__balance strong {
	font-size: 20px;
	color: #1f2430;
}

.bp-mt-activity__empty {
	padding: 24px;
	background: #fff;
	border: 1px solid #ececec;
	border-radius: 12px;
	color: #8a8f99;
	text-align: center;
}

.bp-mt-activity__table {
	width: 100%;
	border-collapse: collapse;
	background: #fff;
	border: 1px solid #ececec;
	border-radius: 12px;
	overflow: hidden;
}

.bp-mt-activity__table th,
.bp-mt-activity__table td {
	padding: 12px 14px;
	text-align: left;
	border-bottom: 1px solid #f0f0f0;
	font-size: 14px;
}

.bp-mt-activity__table thead th {
	background: #faf9f7;
	font-weight: 700;
	color: #4b5563;
}

.bp-mt-activity__table tbody tr:last-child td {
	border-bottom: none;
}

.bp-mt-activity__table .bp-mt-num {
	text-align: right;
	white-space: nowrap;
	font-variant-numeric: tabular-nums;
}

.bp-mt-activity__table .is-positive {
	color: #1d9e75;
	font-weight: 700;
}

.bp-mt-activity__table .is-negative {
	color: #e0564a;
	font-weight: 700;
}

/* ---- Responsive ---- */
@media ( max-width: 900px ) {
	.bp-mt-rewards__tiers {
		grid-template-columns: repeat( 2, 1fr );
	}
}

@media ( max-width: 600px ) {
	.bp-mt-rewards__stats {
		grid-template-columns: 1fr;
	}

	.bp-mt-rewards__tiers,
	.bp-mt-rewards__summary {
		grid-template-columns: 1fr;
	}
}
