/* WooCommerce Points, Redeem & Rewards - Frontend
   Design principle: inherit theme fonts/colors as much as possible.
   Colors use currentColor / rgba(black, low-opacity) so the box adapts
   automatically to light or dark themes without hardcoding a brand
   color, while still looking like a modern card rather than a plain
   browser-default notice box. Works with any theme, including
   Breakdance builds. */

.wpr-point-badge {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-size: 0.85em;
	line-height: 1.4;
	color: inherit;
	opacity: 0.85;
}

.wpr-point-badge--loop {
	margin-top: 4px;
}

.wpr-point-badge--shortcode-compact {
	font-size: 0.8em;
	font-weight: 500;
	margin: 0 0 4px;
}

.wpr-point-badge--single {
	margin: 8px 0;
	font-weight: 600;
}

.wpr-point-badge--shortcode {
	display: inline-flex;
	margin: 4px 0;
	font-weight: 600;
}

.wpr-my-points-badge {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-weight: 600;
	color: inherit;
}

.wpr-star::before {
	content: "\2605";
	color: #eab308;
}

/* Checkout redeem box - styled to match a standard payment-method card
   (white background, clear border, consistent radius/padding) so it
   sits visually consistent with WooCommerce's payment method boxes,
   while still using neutral/theme-inherited colors rather than a
   hardcoded brand color. */
.wpr-redeem-box {
	margin: 0 0 24px;
	padding: 20px 24px;
	border-radius: 8px;
	border: 1px solid rgba(0, 0, 0, 0.14);
	background: #fff;
	font-family: inherit;
	color: inherit;
}

.wpr-redeem-box__row {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 10px 14px;
	margin: 0;
}

.wpr-redeem-box__row + .wpr-redeem-box__row {
	margin-top: 14px;
}

.wpr-redeem-box__row--head {
	justify-content: space-between;
}

.wpr-redeem-box__label {
	font-weight: 600;
	font-size: 1.02em;
	display: inline-flex;
	align-items: center;
	gap: 8px;
}

.wpr-redeem-box__label .wpr-star::before {
	font-size: 1.1em;
}

.wpr-redeem-box__balance {
	font-size: 0.88em;
	opacity: 0.7;
}

.wpr-redeem-box__max-note {
	font-size: 0.85em;
	font-weight: 400;
	opacity: 0.7;
	margin: 6px 0 14px;
	color: inherit;
}

.wpr-redeem-box__input-wrap {
	position: relative;
	display: inline-flex;
	align-items: center;
}

.wpr-redeem-box__input-wrap input.input-text {
	width: 140px;
	padding-right: 40px;
}

.wpr-redeem-box__input-suffix {
	position: absolute;
	right: 14px;
	font-size: 0.82em;
	opacity: 0.55;
	pointer-events: none;
}

.wpr-redeem-box .button {
	border-radius: 6px;
	padding: 10px 22px;
	font-size: 0.92em;
	line-height: 1.2;
}

.wpr-redeem-box .wpr-redeem-box__apply-btn {
	--wpr-apply-color: var(--bde-button-primary-background-color, var(--bde-brand-primary-color, #1a1a1a));
	background: var(--wpr-apply-color) !important;
	color: var(--bde-button-primary-text-color, #fff) !important;
	border-width: 1px;
	border-style: solid;
	border-color: var(--wpr-apply-color) !important;
	border-radius: var(--bde-button-border-radius, 6px);
	font-weight: var(--bde-button-font-weight, 600);
	transition: background-color 0.15s ease, border-color 0.15s ease;
}

.wpr-redeem-box .wpr-redeem-box__apply-btn:hover {
	background: #eb1f28 !important;
	color: #fff !important;
	border-color: #eb1f28 !important;
}

.wpr-redeem-box .wpr-redeem-box__remove-btn {
	background: var(--bde-button-secondary-background-color, transparent) !important;
	color: var(--bde-button-secondary-text-color, var(--bde-brand-primary-color, #425b19)) !important;
	border-width: 1px;
	border-style: solid;
	border-color: var(--bde-button-secondary-border-color, var(--bde-brand-primary-color, #425b19)) !important;
	border-radius: var(--bde-button-border-radius, 6px);
	font-weight: var(--bde-button-font-weight, 500);
	transition: background 0.15s ease, color 0.15s ease;
}

.wpr-redeem-box .wpr-redeem-box__remove-btn:hover {
	background: var(--bde-brand-primary-color, #425b19) !important;
	color: #fff !important;
}

.wpr-redeem-box__message {
	font-size: 0.88em;
	margin-top: 12px;
	min-height: 1em;
}

.wpr-redeem-box__message.wpr-success {
	color: #2e7d32;
}

.wpr-redeem-box__message.wpr-error {
	color: #eb1f28;
}

@media (max-width: 480px) {
	.wpr-redeem-box {
		padding: 16px 18px;
	}
	.wpr-redeem-box__row--head {
		flex-direction: column;
		align-items: flex-start;
		gap: 4px;
	}
}

/* My Account - Points & rewards page */
.wpr-stats-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
	gap: 16px;
	margin-bottom: 1.5em;
}

.wpr-stat-card {
	border: 1px solid rgba(127, 127, 127, 0.18);
	border-radius: 12px;
	padding: 1em 1.25em;
}

.wpr-stat-card__label {
	display: block;
	font-size: 0.85em;
	opacity: 0.7;
	margin-bottom: 4px;
}

.wpr-stat-card__value {
	display: block;
	font-size: 1.4em;
	font-weight: 700;
}

.wpr-history-table {
	width: 100%;
	border-collapse: collapse;
}

.wpr-history-table th,
.wpr-history-table td {
	text-align: left;
	padding: 8px 10px;
	border-bottom: 1px solid rgba(127, 127, 127, 0.15);
}

.wpr-points-positive {
	color: #2e7d32;
}

.wpr-points-negative {
	color: #eb1f28;
}
