/**
 * Referral Rewards — built-in wallet (4.15.0): My Account page, shortcodes,
 * checkout row and product badge. Logical properties only, so RTL and LTR
 * stores both read right. Colours lean on the theme where they can.
 */

.rr-wallet {
	--rrw-accent: var(--rr-primary, #0865fe);
	--rrw-border: rgba(15, 23, 42, .12);
	--rrw-muted: rgba(15, 23, 42, .6);
	--rrw-plus: #15803d;
	--rrw-minus: #b91c1c;
	margin-block-end: 1.5em;
}

.rr-wallet__hero {
	display: flex;
	flex-direction: column;
	gap: 4px;
	padding: 20px 22px;
	border-radius: 14px;
	background: var(--rrw-accent);
	color: #fff;
}

.rr-wallet__label {
	font-size: .9em;
	opacity: .85;
}

.rr-wallet__balance {
	font-size: 2em;
	line-height: 1.2;
	font-weight: 800;
}

.rr-wallet__balance .woocommerce-Price-amount,
.rr-wallet__balance bdi {
	color: inherit;
}

.rr-wallet__locked {
	margin-block-start: 6px;
	padding: 4px 10px;
	border-radius: 999px;
	background: rgba(255, 255, 255, .2);
	font-size: .85em;
	align-self: flex-start;
}

.rr-wallet__tabs {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin-block: 16px;
}

.rr-wallet__tabs a {
	padding: 7px 14px;
	border: 1px solid var(--rrw-border);
	border-radius: 999px;
	text-decoration: none;
	font-size: .92em;
}

.rr-wallet__tabs a.is-active {
	border-color: var(--rrw-accent);
	background: var(--rrw-accent);
	color: #fff;
}

.rr-wallet__form {
	display: grid;
	gap: 8px;
	max-width: 420px;
}

.rr-wallet__form small {
	color: var(--rrw-muted);
}

.rr-wallet__form label {
	font-weight: 600;
}

.rr-wallet__form input[type="number"],
.rr-wallet__form input[type="email"],
.rr-wallet__form input[type="text"] {
	box-sizing: border-box;
	width: 100%;
	padding: 10px 12px;
	border: 1px solid var(--rrw-border);
	border-radius: 10px;
	background: #fff;
	color: inherit;
	font: inherit;
}

.rr-wallet__form input:focus {
	outline: 2px solid var(--rrw-accent);
	outline-offset: 1px;
}

.rr-wallet__form .button,
.rr-wallet .rr-wallet__csv {
	display: inline-block;
	padding: 10px 18px;
	border: 1px solid var(--rrw-accent);
	border-radius: 10px;
	background: var(--rrw-accent);
	color: #fff;
	font: inherit;
	font-weight: 600;
	line-height: 1.3;
	text-decoration: none;
	cursor: pointer;
}

.rr-wallet__form .button {
	justify-self: start;
	margin-block-start: 6px;
}

.rr-wallet .rr-wallet__csv {
	background: transparent;
	color: var(--rrw-accent);
}

.rr-wallet__form .button:disabled {
	opacity: .5;
	cursor: not-allowed;
}

.rr-wallet__table {
	width: 100%;
}

.rr-wallet__amt {
	white-space: nowrap;
	font-weight: 700;
	text-align: end;
}

.rr-wallet__amt--credit {
	color: var(--rrw-plus);
}

.rr-wallet__amt--debit {
	color: var(--rrw-minus);
}

.rr-wallet__foot {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	margin-block-start: 10px;
}

.rr-wallet__pages {
	display: flex;
	flex-wrap: wrap;
	gap: 4px;
}

.rr-wallet__pages a {
	min-width: 30px;
	padding: 4px 8px;
	border: 1px solid var(--rrw-border);
	border-radius: 8px;
	text-align: center;
	text-decoration: none;
}

.rr-wallet__pages a.is-active {
	border-color: var(--rrw-accent);
	font-weight: 700;
}

.rr-wallet__expiry {
	margin: 0 0 12px;
	padding: 10px 14px;
	border-radius: 10px;
	background: rgba(217, 119, 6, .1);
	color: #92400e;
	list-style: none;
}

.rr-wallet__valid,
.rr-wallet__sub {
	display: block;
	color: var(--rrw-muted);
	font-size: .85em;
}

.rr-wallet__sub {
	color: rgba(255, 255, 255, .85);
}

.rr-wallet-paid {
	padding: 18px;
	border: 1px dashed var(--rr-primary, #0865fe);
	border-radius: 12px;
}

.rr-wallet__empty {
	color: var(--rrw-muted);
}

.rr-mini-wallet {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	text-decoration: none;
	white-space: nowrap;
}

.rr-mini-wallet svg {
	flex: none;
}

.rr-wallet-partial label,
.rr-wallet-partial-block {
	display: flex;
	align-items: center;
	gap: 8px;
	font-weight: 600;
}

.rr-wallet-partial-block {
	padding-block: 8px;
}

.rr-wallet-cashback-badge {
	display: inline-block;
	padding: 4px 12px;
	border-radius: 999px;
	background: rgba(21, 128, 61, .1);
	color: #15803d;
	font-size: .9em;
	font-weight: 600;
}

@media (max-width: 600px) {
	.rr-wallet__balance {
		font-size: 1.6em;
	}

	.rr-wallet__table th:first-child,
	.rr-wallet__table td:first-child {
		white-space: nowrap;
		font-size: .85em;
	}
}
