/* =============================================
   Loyalty Points UI
   ============================================= */

/* ---- Redemption box (cart & checkout pages) ---- */

.st-loyalty-box {
	margin: 0 0 16px;
	padding: 14px 16px;
	background: var(--gray-50);
	border: 1.5px solid var(--gray-200);
	border-radius: var(--radius-md);
}

.st-loyalty-box__inner {
	display: flex;
	align-items: center;
	gap: 12px;
	flex-wrap: wrap;
}

.st-loyalty-box__icon {
	font-size: 24px;
	line-height: 1;
	flex-shrink: 0;
}

.st-loyalty-box__info {
	flex: 1;
	min-width: 0;
	display: flex;
	flex-direction: column;
}

.st-loyalty-box__title {
	font-family: var(--font-display);
	font-size: 14px;
	font-weight: 600;
	color: var(--gray-900);
}

.st-loyalty-box__balance {
	font-size: 13px;
	color: var(--gray-500);
}

.st-loyalty-box__toggle {
	display: flex;
	align-items: center;
	gap: 6px;
	cursor: pointer;
	font-size: 13px;
	font-weight: 600;
	color: var(--red);
	white-space: nowrap;
	flex-shrink: 0;
	user-select: none;
}

.st-loyalty-box__toggle input[type="checkbox"] {
	width: 16px;
	height: 16px;
	cursor: pointer;
	accent-color: var(--red);
	flex-shrink: 0;
}

.st-loyalty-box__msg {
	margin-top: 10px;
	font-size: 13px;
	font-weight: 500;
}

/* ---- Dashboard points widget ---- */

.st-dash-points {
	background: linear-gradient(135deg, var(--red) 0%, var(--red-dark) 100%);
	color: var(--white);
	border-radius: var(--radius-md);
	padding: 20px 24px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	margin-bottom: 24px;
	text-decoration: none;
	transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.st-dash-points:hover {
	transform: translateY(-2px);
	box-shadow: var(--shadow-lg);
	color: var(--white);
}

.st-dash-points__left {
	display: flex;
	align-items: center;
	gap: 14px;
}

.st-dash-points__icon {
	font-size: 32px;
	flex-shrink: 0;
}

.st-dash-points__value {
	font-family: var(--font-display);
	font-size: 30px;
	font-weight: 800;
	line-height: 1;
}

.st-dash-points__sub {
	font-size: 12px;
	opacity: 0.85;
	margin-top: 3px;
}

.st-dash-points__cta {
	font-size: 12px;
	opacity: 0.9;
	border: 1px solid rgba(255, 255, 255, 0.45);
	border-radius: var(--radius-full);
	padding: 6px 16px;
	white-space: nowrap;
	flex-shrink: 0;
}

/* ---- Rewards page ---- */

.st-rewards-page {
	max-width: 800px;
	margin: 40px auto;
	padding: 0 20px 60px;
}

.st-rewards-header {
	text-align: center;
	margin-bottom: 36px;
}

.st-rewards-header h1 {
	font-family: var(--font-display);
	font-size: 30px;
	font-weight: 800;
	color: var(--gray-900);
	margin-bottom: 6px;
}

.st-rewards-header p {
	color: var(--gray-500);
	font-size: 15px;
}

.st-points-card {
	background: linear-gradient(135deg, var(--red) 0%, var(--red-dark) 100%);
	color: var(--white);
	border-radius: var(--radius-lg);
	padding: 36px 32px;
	text-align: center;
	margin-bottom: 32px;
	box-shadow: var(--shadow-lg);
}

.st-points-card__icon {
	font-size: 42px;
	display: block;
	margin-bottom: 8px;
}

.st-points-card__value {
	font-family: var(--font-display);
	font-size: 60px;
	font-weight: 800;
	line-height: 1;
	display: block;
}

.st-points-card__label {
	font-size: 14px;
	opacity: 0.85;
	margin-top: 4px;
	display: block;
	letter-spacing: 0.05em;
	text-transform: uppercase;
}

.st-points-card__rm {
	margin-top: 16px;
	padding-top: 16px;
	border-top: 1px solid rgba(255, 255, 255, 0.25);
	font-size: 15px;
	opacity: 0.92;
}

.st-rewards-section {
	margin-bottom: 36px;
}

.st-rewards-section h2 {
	font-family: var(--font-display);
	font-size: 18px;
	font-weight: 700;
	color: var(--gray-900);
	margin-bottom: 16px;
	padding-bottom: 10px;
	border-bottom: 2px solid var(--gray-200);
}

.st-how-steps {
	display: grid;
	gap: 10px;
}

.st-how-step {
	display: flex;
	align-items: flex-start;
	gap: 12px;
	padding: 14px;
	background: var(--gray-50);
	border-radius: var(--radius-sm);
}

.st-how-step__num {
	width: 28px;
	height: 28px;
	border-radius: 50%;
	background: var(--red);
	color: var(--white);
	font-family: var(--font-display);
	font-weight: 700;
	font-size: 13px;
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
}

.st-how-step__text {
	font-size: 14px;
	color: var(--gray-700);
	line-height: 1.5;
	margin: 0;
}

.st-history-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 14px;
}

.st-history-table th {
	background: var(--gray-100);
	color: var(--gray-700);
	font-weight: 600;
	padding: 10px 12px;
	text-align: left;
	border-bottom: 2px solid var(--gray-200);
	font-family: var(--font-display);
	font-size: 13px;
}

.st-history-table td {
	padding: 10px 12px;
	border-bottom: 1px solid var(--gray-100);
	color: var(--gray-700);
	vertical-align: middle;
}

.st-history-table tr:last-child td {
	border-bottom: none;
}

.st-badge--earn {
	color: #16a34a;
	font-weight: 700;
}

.st-badge--redeem {
	color: var(--red);
	font-weight: 700;
}

.st-empty-state {
	text-align: center;
	padding: 40px 20px;
	color: var(--gray-500);
	font-size: 14px;
	background: var(--gray-50);
	border-radius: var(--radius-md);
}

/* ---- Responsive ---- */

@media ( max-width: 600px ) {
	.st-points-card__value { font-size: 48px; }
	.st-dash-points { flex-direction: column; align-items: flex-start; gap: 12px; }
	.st-dash-points__cta { width: 100%; text-align: center; display: block; }
	.st-history-table th:last-child,
	.st-history-table td:last-child { display: none; }
}
