/*
 * CashMe shared action system.
 *
 * The body scope intentionally outranks later theme reset selectors such as
 * [type="button"], [type="submit"], button without depending on load order.
 */
:root {
	--cm-action: #C89555;
	--cm-action-hover: #DDB879;
	--cm-action-active: #B78347;
	--cm-action-text: #0B0B0C;
	--cm-action-outline: #C89555;
	--cm-action-outline-text: #DDB879;
	--cm-danger: #EF5B67;
	--cm-danger-hover: #EF5B67;
	--cm-danger-text: #ffffff;
	--cm-button-disabled-bg: #303033;
	--cm-button-disabled-text: #A7A7A3;
	--cm-button-disabled-border: #686866;
	--cm-focus: #DDB879;
}

html[data-cashme-theme="light"] {
	--cm-action: #B78347;
	--cm-action-hover: #C89555;
	--cm-action-active: #DDB879;
	--cm-action-text: #FFFFFF;
	--cm-action-outline: #B78347;
	--cm-action-outline-text: #B78347;
	--cm-danger: #EF5B67;
	--cm-danger-hover: #EF5B67;
	--cm-button-disabled-bg: #E4E4E1;
	--cm-button-disabled-text: #686866;
	--cm-button-disabled-border: #A7A7A3;
	--cm-focus: #B78347;
}

body.cashme-wallet-screen .cashme-button {
	appearance: none;
	display: inline-flex;
	min-height: 48px;
	align-items: center;
	justify-content: center;
	padding: 0 22px;
	border: 1px solid var(--cm-action);
	border-radius: 14px;
	background-color: var(--cm-action);
	color: var(--cm-action-text) !important;
	font: inherit;
	font-weight: 850;
	line-height: 1.2;
	text-align: center;
	text-decoration: none;
	white-space: normal;
	cursor: pointer;
	opacity: 1;
	filter: none;
	transition: background-color .18s ease, border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

body.cashme-wallet-screen .cashme-button:hover:not(:disabled):not([aria-disabled="true"]),
body.cashme-wallet-screen .cashme-button:focus:not(:disabled):not([aria-disabled="true"]) {
	border-color: var(--cm-action-hover);
	background-color: var(--cm-action-hover);
	color: var(--cm-action-text) !important;
}

body.cashme-wallet-screen .cashme-button:active:not(:disabled):not([aria-disabled="true"]) {
	border-color: var(--cm-action-active);
	background-color: var(--cm-action-active);
	transform: translateY(1px);
}

body.cashme-wallet-screen .cashme-button--secondary,
body.cashme-wallet-screen .cashme-button--outline,
body.cashme-wallet-screen .cashme-button--ghost {
	border-color: var(--cm-action-outline);
	background-color: var(--cm-surface);
	color: var(--cm-action-outline-text) !important;
}

body.cashme-wallet-screen .cashme-button--secondary:hover:not(:disabled):not([aria-disabled="true"]),
body.cashme-wallet-screen .cashme-button--outline:hover:not(:disabled):not([aria-disabled="true"]),
body.cashme-wallet-screen .cashme-button--ghost:hover:not(:disabled):not([aria-disabled="true"]) {
	border-color: var(--cm-action-hover);
	background-color: color-mix(in srgb, var(--cm-action) 14%, var(--cm-surface));
	color: var(--cm-action-outline-text) !important;
}

body.cashme-wallet-screen .cashme-button--danger {
	border-color: var(--cm-danger);
	background-color: var(--cm-danger);
	color: var(--cm-danger-text) !important;
}

body.cashme-wallet-screen .cashme-button--danger:hover:not(:disabled):not([aria-disabled="true"]),
body.cashme-wallet-screen .cashme-button--danger:focus:not(:disabled):not([aria-disabled="true"]) {
	border-color: var(--cm-danger-hover);
	background-color: var(--cm-danger-hover);
	color: var(--cm-danger-text) !important;
}

body.cashme-wallet-screen .cashme-button--success {
	border-color: var(--cm-success);
	background-color: var(--cm-success);
	color: #08100b !important;
}

body.cashme-wallet-screen .cashme-button:disabled,
body.cashme-wallet-screen .cashme-button[disabled],
body.cashme-wallet-screen .cashme-button[aria-disabled="true"],
body.cashme-wallet-screen .cashme-button.is-loading,
body.cashme-wallet-screen .cashme-button[aria-busy="true"] {
	border-color: var(--cm-button-disabled-border);
	background-color: var(--cm-button-disabled-bg);
	color: var(--cm-button-disabled-text) !important;
	cursor: not-allowed;
	opacity: 1;
	filter: none;
	transform: none;
	box-shadow: none;
}

body.cashme-wallet-screen .cashme-button.is-loading,
body.cashme-wallet-screen .cashme-button[aria-busy="true"] {
	cursor: progress;
}

body.cashme-wallet-screen .cashme-button--small {
	min-height: 44px;
}

body.cashme-wallet-screen .cashme-button:focus-visible,
body.cashme-wallet-screen .cashme-action:focus-visible,
body.cashme-wallet-screen .cashme-copy:focus-visible,
body.cashme-wallet-screen .cashme-copy-button:focus-visible,
body.cashme-wallet-screen .cashme-back-link:focus-visible {
	outline: 3px solid var(--cm-focus);
	outline-offset: 3px;
}

body.cashme-wallet-screen .cashme-action {
	border-color: var(--cm-action-outline);
	background-color: var(--cm-surface);
	color: var(--cm-text);
}

body.cashme-wallet-screen .cashme-action:hover,
body.cashme-wallet-screen .cashme-action:focus {
	border-color: var(--cm-action-hover);
	background-color: color-mix(in srgb, var(--cm-action) 14%, var(--cm-surface));
	color: var(--cm-text);
}

body.cashme-wallet-screen .cashme-copy,
body.cashme-wallet-screen .cashme-copy-button,
body.cashme-wallet-screen .cashme-back-link {
	appearance: none;
	display: inline-flex;
	min-height: 44px;
	align-items: center;
	justify-content: center;
	padding: .45rem .7rem;
	border: 1px solid var(--cm-action-outline);
	border-radius: .55rem;
	background-color: var(--cm-surface);
	color: var(--cm-action-outline-text);
	font: inherit;
	font-weight: 800;
	line-height: 1.2;
	text-decoration: none;
	white-space: normal;
	cursor: pointer;
}

body.cashme-wallet-screen .cashme-copy:hover,
body.cashme-wallet-screen .cashme-copy-button:hover,
body.cashme-wallet-screen .cashme-back-link:hover {
	border-color: var(--cm-action-hover);
	background-color: color-mix(in srgb, var(--cm-action) 14%, var(--cm-surface));
	color: var(--cm-action-outline-text);
}

body.cashme-wallet-screen.cashme-auth-screen .cashme-form:invalid .cashme-button[type="submit"] {
	border-color: var(--cm-button-disabled-border);
	background-color: var(--cm-button-disabled-bg);
	color: var(--cm-button-disabled-text) !important;
	cursor: not-allowed;
	opacity: 1;
	filter: none;
	box-shadow: none;
}

body.cashme-wallet-screen.cashme-auth-screen .cashme-form:valid .cashme-button[type="submit"] {
	border-color: var(--cm-action);
	background-color: var(--cm-action);
	color: var(--cm-action-text) !important;
	cursor: pointer;
}

@media (prefers-reduced-motion: reduce) {
	body.cashme-wallet-screen .cashme-button {
		transition: none;
	}
}

/* RC4: protect non-.cashme-button controls from theme button defaults. */
body.cashme-wallet-screen.cashme-app-screen .cashme-choice-grid button,
body.cashme-wallet-screen.cashme-app-screen .cashme-segments button{border-color:var(--cm-border);background-color:var(--cm-surface-2);color:var(--cm-text)}
body.cashme-wallet-screen.cashme-app-screen .cashme-choice-grid button[aria-pressed="true"],
body.cashme-wallet-screen.cashme-app-screen .cashme-segments button[aria-pressed="true"]{border-color:var(--cm-accent);background-color:color-mix(in srgb,var(--cm-accent) 16%,var(--cm-surface));color:var(--cm-accent)}
body.cashme-wallet-screen.cashme-app-screen .cashme-action{border-color:transparent;background-color:transparent;color:var(--cm-text)}
body.cashme-wallet-screen.cashme-app-screen .cashme-action.is-sell>span,
body.cashme-wallet-screen.cashme-app-screen .cashme-action.is-send>span,
body.cashme-wallet-screen.cashme-app-screen .cashme-action.is-receive>span{color:#fff}
