/*
 * Australcode Points and Rewards frontend styles — Phase 3 polish.
 * Light-mode v1. The --acrwd-accent variable is injected inline from the
 * configured accent color (FrontendAssets).
 */

:root {
	--acrwd-accent: #0e7a5f; /* Verde Austral default; merchants override via Settings → Display */
	--acrwd-fg: #1e293b;
	--acrwd-muted: #64748b;
	--acrwd-border: #e2e8f0;
	--acrwd-surface: #ffffff;
	--acrwd-radius: 8px;
}

.acrwd-rewards-card {
	background: var(--acrwd-surface);
	color: var(--acrwd-fg);
}

.acrwd-widget {
	position: fixed;
	right: 20px;
	bottom: 20px;
	z-index: 9999;
	display: inline-flex;
	align-items: baseline;
	gap: 6px;
	padding: 10px 16px;
	border-radius: 999px;
	background: var(--acrwd-accent);
	color: #fff;
	text-decoration: none;
	box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18);
	font-size: 14px;
	line-height: 1.2;
}

.acrwd-widget:hover {
	filter: brightness(1.05);
}

.acrwd-widget-balance {
	font-weight: 700;
}

.acrwd-widget-label {
	opacity: 0.9;
}

.acrwd-balance {
	font-weight: 600;
	color: var(--acrwd-accent);
}

.acrwd-points-message {
	display: inline-block;
	margin: 8px 0;
	padding: 6px 12px;
	border-radius: var(--acrwd-radius);
	background: color-mix(in srgb, var(--acrwd-accent) 10%, transparent);
	color: var(--acrwd-fg);
	font-size: 0.95em;
}

.acrwd-points-message strong {
	color: var(--acrwd-accent);
}

.acrwd-history {
	width: 100%;
	border-collapse: collapse;
	margin: 12px 0;
}

.acrwd-history th,
.acrwd-history td {
	padding: 8px 12px;
	border-bottom: 1px solid var(--acrwd-border);
	text-align: left;
}

.acrwd-history th {
	font-weight: 600;
	color: var(--acrwd-muted);
}

.acrwd-history .acrwd-delta {
	text-align: right;
	font-variant-numeric: tabular-nums;
}

.acrwd-history-empty {
	color: var(--acrwd-muted);
}

.acrwd-rewards-summary {
	display: flex;
	gap: 24px;
	flex-wrap: wrap;
	margin-bottom: 16px;
}

.acrwd-rewards-card {
	flex: 1 1 180px;
	padding: 16px;
	border: 1px solid var(--acrwd-border);
	border-radius: var(--acrwd-radius);
}

.acrwd-rewards-card .acrwd-stat {
	font-size: 1.6em;
	font-weight: 700;
	color: var(--acrwd-accent);
}

/* "Use your points" card (My Account Rewards) + redeem form (cart + account). */
.acrwd-redeem-card {
	padding: 16px;
	border: 1px solid var(--acrwd-border);
	border-radius: var(--acrwd-radius);
	margin-bottom: 16px;
}

.acrwd-redeem-card h3 {
	margin: 0 0 8px;
	font-size: 1.05em;
}

.acrwd-redeem-card p {
	margin: 0 0 12px;
	color: var(--acrwd-muted);
}

.acrwd-redeem-form {
	display: flex;
	align-items: center;
	gap: 8px;
	flex-wrap: wrap;
	margin-top: 10px;
}

.acrwd-redeem-form input[type="number"] {
	width: 7em;
	padding: 6px 8px;
	border: 1px solid var(--acrwd-border);
	border-radius: calc(var(--acrwd-radius) / 2);
	background: var(--acrwd-surface);
	color: var(--acrwd-fg);
}
