/* Wallet page (/account/wallet/). Uses the theme colour tokens when present. */
.mcw {
	--mcw-ink: var(--color-black3, #303232);
	--mcw-muted: var(--color-gray8, #9ca3af);
	--mcw-line: var(--color-gray3, #e0e5eb);
	--mcw-soft: #f5f7fa;
	--mcw-green: var(--color-green1, #33b36b);
	--mcw-green-dark: var(--color-green2, #269757);
	--mcw-green-soft: var(--color-greeno1, #ebf7f0);
	--mcw-red: var(--color-red1, #ff3b30);
	display: flex;
	flex-direction: column;
	gap: 16px;
	color: var(--mcw-ink);
}

.mcw *,
.mcw *::before,
.mcw *::after {
	box-sizing: border-box;
}

.mcw-head {
	display: flex;
	align-items: center;
	gap: 10px;
	min-height: 40px;
}

.mcw-head h3 {
	margin: 0;
	font-size: 20px;
	line-height: 28px;
	font-weight: 700;
}

/* ---------- balance ---------- */
.mcw-balance {
	display: flex;
	align-items: center;
	gap: 16px;
	padding: 20px 24px;
	border-radius: 20px;
	color: #fff;
	background: linear-gradient(135deg, #303232 0%, #4a4f4f 100%);
	box-shadow: 0 12px 28px rgba(48, 50, 50, 0.18);
	position: relative;
	overflow: hidden;
}

.mcw-balance::after {
	content: "";
	position: absolute;
	inset-inline-start: -40px;
	top: -60px;
	width: 180px;
	height: 180px;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.06);
	pointer-events: none;
}

.mcw-balance__icon {
	flex: none;
	width: 48px;
	height: 48px;
	display: grid;
	place-items: center;
	border-radius: 14px;
	background: rgba(255, 255, 255, 0.12);
}

.mcw-balance__text {
	flex: 1;
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.mcw-balance__label {
	font-size: 13px;
	line-height: 18px;
	opacity: 0.75;
}

.mcw-balance__value {
	font-size: 26px;
	line-height: 34px;
	font-weight: 700;
	direction: rtl;
}

.mcw-balance__value .woocommerce-Price-currencySymbol {
	font-size: 14px;
	font-weight: 400;
	opacity: 0.8;
	margin-inline-start: 4px;
}

.mcw-balance__link {
	flex: none;
	position: relative;
	z-index: 1;
	display: inline-flex;
	align-items: center;
	gap: 6px;
	height: 38px;
	padding: 0 14px;
	border-radius: 10px;
	font-size: 13px;
	color: #fff;
	background: rgba(255, 255, 255, 0.14);
	text-decoration: none;
	transition: background 0.2s;
}

.mcw-balance__link:hover {
	background: rgba(255, 255, 255, 0.24);
	color: #fff;
}

.mcw-balance__link--icon {
	width: 38px;
	padding: 0;
	justify-content: center;
}

.mcw-balance__link + .mcw-balance__link {
	margin-inline-start: -8px;
}

.mcw-card--table {
	overflow-x: auto;
}

.mcw-card .woocommerce-pagination {
	margin-top: 16px;
}

/* ---------- cards ---------- */
.mcw-card {
	padding: 24px;
	background: #fff;
	border: 1px solid var(--mcw-line);
	border-radius: 20px;
	box-shadow: 0 10px 28px rgba(48, 50, 50, 0.04);
}

.mcw-card__title {
	margin: 0 0 4px;
	font-size: 17px;
	line-height: 26px;
	font-weight: 700;
}

.mcw-card__sub {
	margin: 0 0 20px;
	font-size: 13px;
	line-height: 22px;
	color: var(--mcw-muted);
}

/* ---------- form ---------- */
.mcw-label {
	display: block;
	margin-bottom: 8px;
	font-size: 13px;
	line-height: 18px;
	color: #6b7280;
}

.mcw-field {
	display: flex;
	align-items: center;
	gap: 10px;
	height: 60px;
	padding: 0 18px;
	background: #fff;
	border: 1.5px solid var(--mcw-line);
	border-radius: 14px;
	transition: border-color 0.2s, box-shadow 0.2s;
}

.mcw-field:focus-within {
	border-color: var(--mcw-green);
	box-shadow: 0 0 0 4px rgba(51, 179, 107, 0.14);
}

.mcw.mcw--error .mcw-field {
	border-color: var(--mcw-red);
	box-shadow: 0 0 0 4px rgba(255, 59, 48, 0.1);
}

.mcw .mcw-field input.mcw-input {
	flex: 1;
	min-width: 0;
	height: 100%;
	margin: 0 !important;
	padding: 0 !important;
	border: 0 !important;
	outline: 0 !important;
	box-shadow: none !important;
	background: transparent !important;
	direction: ltr;
	text-align: right;
	font-size: 24px;
	line-height: 1;
	font-weight: 700;
	letter-spacing: 0.5px;
	color: var(--mcw-ink);
}

.mcw .mcw-field input.mcw-input::placeholder {
	color: #c4cad4;
	font-weight: 400;
}

.mcw-unit {
	flex: none;
	font-size: 14px;
	color: #6b7280;
}

.mcw-words {
	min-height: 24px;
	margin-top: 8px;
	font-size: 13px;
	line-height: 24px;
	color: var(--mcw-green-dark);
}

.mcw-error {
	margin: 4px 0 0;
	font-size: 13px;
	line-height: 22px;
	color: var(--mcw-red);
}

.mcw-chips {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin: 8px 0 0;
}

.mcw .mcw-chip {
	height: 38px;
	padding: 0 16px;
	border: 1px solid var(--mcw-line);
	border-radius: 999px;
	background: #fff;
	color: var(--mcw-ink);
	font-size: 13px;
	cursor: pointer;
	transition: all 0.15s;
}

.mcw .mcw-chip:hover {
	border-color: var(--mcw-green);
	background: var(--mcw-green-soft);
}

.mcw .mcw-chip.mcw-chip--on {
	border-color: var(--mcw-green);
	background: var(--mcw-green-soft);
	color: var(--mcw-green-dark);
	font-weight: 700;
}

.mcw-hint {
	margin: 14px 0 0;
	font-size: 12px;
	line-height: 20px;
	color: var(--mcw-muted);
}

.mcw-select {
	width: 100%;
	height: 52px;
	margin-bottom: 16px;
	padding: 0 14px;
	border: 1.5px solid var(--mcw-line);
	border-radius: 14px;
	background: #fff;
	font-size: 14px;
}

.mcw-divider {
	margin: 20px 0;
	border: 0;
	border-top: 1px dashed var(--mcw-line);
}

/* ---------- summary ---------- */
.mcw-summary {
	margin: 20px 0 0;
	padding: 4px 16px;
	background: var(--mcw-soft);
	border-radius: 14px;
}

.mcw-summary__row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 12px 0;
	font-size: 13px;
	line-height: 20px;
	border-bottom: 1px dashed var(--mcw-line);
}

.mcw-summary__row:last-child {
	border-bottom: 0;
}

.mcw-summary__row dt {
	margin: 0;
	color: #6b7280;
	font-weight: 400;
}

.mcw-summary__row dd {
	margin: 0;
	font-weight: 700;
	direction: rtl;
}

.mcw-summary__row--total {
	font-size: 15px;
}

.mcw-summary__row--total dd {
	color: var(--mcw-green-dark);
}

.mcw .mcw-submit {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	width: 100%;
	height: 52px;
	margin-top: 20px;
	padding: 0 20px;
	border: 0;
	border-radius: 14px;
	background: var(--mcw-green);
	color: #fff;
	font-size: 16px;
	font-weight: 700;
	cursor: pointer;
	box-shadow: 0 8px 20px rgba(51, 179, 107, 0.28);
	transition: background 0.2s, box-shadow 0.2s, opacity 0.2s;
}

.mcw .mcw-submit:hover:not(:disabled) {
	background: var(--mcw-green-dark);
}

.mcw .mcw-submit:disabled {
	background: #d6dbe3;
	box-shadow: none;
	cursor: not-allowed;
}

.mcw .mcw-submit.mcw-submit--busy {
	opacity: 0.75;
	pointer-events: none;
}

.mcw-note {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	margin: 14px 0 0;
	font-size: 12px;
	line-height: 20px;
	color: var(--mcw-muted);
	text-align: center;
}

/* ---------- recent transactions ---------- */
.mcw-card__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin-bottom: 8px;
}

.mcw-card__head .mcw-card__title {
	margin: 0;
}

.mcw-card__more {
	font-size: 13px;
	color: var(--mcw-green-dark);
	text-decoration: none;
}

.mcw-card__more:hover {
	text-decoration: underline;
}

.mcw-tx {
	margin: 0;
	padding: 0;
	list-style: none;
}

.mcw-tx__item {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 14px 0;
	border-bottom: 1px solid #eef1f6;
}

.mcw-tx__item:last-child {
	border-bottom: 0;
	padding-bottom: 0;
}

.mcw-tx__dot {
	flex: none;
	width: 36px;
	height: 36px;
	display: grid;
	place-items: center;
	border-radius: 50%;
	font-size: 16px;
	font-weight: 700;
}

.mcw-tx__item--in .mcw-tx__dot {
	background: var(--mcw-green-soft);
	color: var(--mcw-green-dark);
}

.mcw-tx__item--out .mcw-tx__dot {
	background: #fff1f0;
	color: var(--mcw-red);
}

.mcw-tx__info {
	flex: 1;
	min-width: 0;
}

.mcw-tx__desc {
	display: block;
	font-size: 14px;
	line-height: 22px;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.mcw-tx__date {
	display: block;
	font-size: 12px;
	line-height: 18px;
	color: var(--mcw-muted);
}

.mcw-tx__amount {
	flex: none;
	font-size: 14px;
	font-weight: 700;
	direction: ltr;
	text-align: left;
}

.mcw-tx__item--in .mcw-tx__amount {
	color: var(--mcw-green-dark);
}

.mcw-tx__amount .woocommerce-Price-currencySymbol {
	font-size: 12px;
	font-weight: 400;
	margin-inline-start: 3px;
}

.mcw-empty {
	margin: 0;
	padding: 12px 0 4px;
	font-size: 13px;
	color: var(--mcw-muted);
	text-align: center;
}

/* ---------- withdrawal section ---------- */
.mcw-withdraw-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	height: 44px;
	padding: 0 22px;
	border-radius: 12px;
	font-size: 14px;
	font-weight: 700;
	color: #fff;
	background: #303232;
	text-decoration: none;
	transition: background 0.2s;
}

a.mcw-withdraw-btn:hover {
	background: #000;
	color: #fff;
}

.mcw-withdraw-btn.is-disabled {
	background: #e5e7eb;
	color: #9ca3af;
	cursor: not-allowed;
}

/* ---------- send money / withdrawal forms share the money input ---------- */
input[data-money] {
	direction: ltr;
	text-align: right;
}

/* ---------- withdrawal form: remaining fields (method, bank/address details) ---------- */
.mcw-form .form-row {
	margin: 18px 0 0;
	padding: 0;
	float: none;
	width: 100%;
}

.mcw-form .form-row label {
	display: block;
	margin-bottom: 8px;
	font-size: 13px;
	line-height: 18px;
	color: #6b7280;
}

.mcw-form .form-row input.fsww-input,
.mcw-form .form-row select {
	width: 100%;
	height: 52px;
	margin: 0;
	padding: 0 16px;
	border: 1.5px solid var(--mcw-line);
	border-radius: 14px;
	background: #fff;
	font-size: 14px;
	color: var(--mcw-ink);
	box-shadow: none;
	transition: border-color 0.2s, box-shadow 0.2s;
}

.mcw-form .form-row input.fsww-input:focus,
.mcw-form .form-row select:focus {
	outline: 0;
	border-color: var(--mcw-green);
	box-shadow: 0 0 0 4px rgba(51, 179, 107, 0.14);
}

.mcw-form .mcw-select {
	margin-bottom: 0;
}

.mcw-form .mcw-summary {
	margin-top: 24px;
}

.mcw-card .fsww-request-table {
	margin: 12px 0 0;
}

.mcw-card .woocommerce-message,
.mcw-card .woocommerce-error {
	margin: 0 0 18px;
}

/* ---------- payout method cards (same look as the checkout payment methods) ---------- */
.mcw-methods {
	margin: 22px 0 0;
	padding: 0;
	border: 0;
	min-width: 0;
}

.mcw-methods legend {
	padding: 0;
	margin-bottom: 10px;
}

.mcw-req {
	color: var(--mcw-red);
}

.mcw-methods__list {
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.mcw-method {
	position: relative;
}

/* visually hidden, but still focusable so the browser can flag "required" */
.mcw .mcw-method__input {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	margin: 0;
	opacity: 0;
	pointer-events: none;
}

.mcw .mcw-method__label {
	display: flex;
	align-items: center;
	gap: 17px;
	margin: 0;
	padding: 10px 10px 10px 48px;
	min-height: 52px;
	border: 1px solid var(--color-gray4, #d5dae1);
	border-radius: 12px;
	background: rgba(255, 255, 255, 0.7);
	box-shadow: 0 4px 12px rgba(48, 50, 50, 0.04);
	font-size: 14px;
	font-weight: 700;
	line-height: 22px;
	color: var(--mcw-ink);
	cursor: pointer;
	transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
}

.mcw .mcw-method__label:hover {
	border-color: var(--mcw-muted);
}

.mcw-method__icon {
	flex: none;
	display: grid;
	place-items: center;
	width: 34px;
	height: 34px;
	border-radius: 10px;
	background: var(--mcw-soft);
	color: var(--mcw-ink);
}

.mcw-method__dot {
	position: absolute;
	left: 10px;
	top: 50%;
	width: 14px;
	height: 14px;
	border: 1px solid var(--color-gray3, #e0e5eb);
	border-radius: 50%;
	transform: translateY(-50%);
	pointer-events: none;
	transition: background 0.2s, border-color 0.2s;
}

.mcw .mcw-method__input:checked + .mcw-method__label {
	border-color: var(--mcw-muted);
	background: #fff;
	box-shadow: 0 10px 24px rgba(48, 50, 50, 0.1);
}

.mcw .mcw-method__input:checked + .mcw-method__label + .mcw-method__dot {
	background: var(--mcw-ink);
	border-color: var(--mcw-ink);
}

.mcw .mcw-method__input:focus-visible + .mcw-method__label {
	box-shadow: 0 0 0 4px rgba(51, 179, 107, 0.2);
}

.mcw-methods .mcw-error {
	margin-top: 8px;
}

@media (max-width: 640px) {
	.mcw-balance {
		flex-wrap: wrap;
		padding: 18px;
	}

	.mcw-balance__link {
		width: 100%;
		justify-content: center;
	}

	.mcw-balance__value {
		font-size: 22px;
	}

	.mcw-card {
		padding: 18px;
	}

	.mcw-field {
		height: 56px;
	}

	.mcw .mcw-field input.mcw-input {
		font-size: 20px;
	}
}
