/**
 * Halux Manual Payments — checkout styles.
 * Written with logical properties so RTL and LTR share one stylesheet.
 */

.halux-mp {
	--halux-ink: #16161a;
	--halux-muted: #6f6b66;
	--halux-line: #e3e1dc;
	--halux-surface: #ffffff;
	--halux-surface-soft: #f7f6f3;
	--halux-accent: #16161a;
	--halux-radius: 10px;
	--halux-whatsapp: #1fa855;

	box-sizing: border-box;
	direction: inherit;
	text-align: start;
	color: var(--halux-ink);
	font-size: 15px;
	line-height: 1.7;
}

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

.halux-mp__intro,
p.halux-mp__intro {
	margin: 0 0 14px;
	color: var(--halux-muted);
	font-size: 14px;
	line-height: 1.7;
}

/* ---------- Method options ---------- */

.halux-mp__options {
	display: grid;
	gap: 10px;
	margin: 0 0 14px;
}

@media (min-width: 620px) {
	.halux-mp__options {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

.halux-mp__option {
	position: relative;
	display: block;
	margin: 0;
	cursor: pointer;
}

.halux-mp__radio {
	position: absolute;
	inset-inline-start: 0;
	inset-block-start: 0;
	width: 1px;
	height: 1px;
	margin: 0;
	padding: 0;
	opacity: 0;
	pointer-events: none;
}

.halux-mp__option-body {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 14px 16px;
	background: var(--halux-surface);
	border: 1px solid var(--halux-line);
	border-inline-start: 3px solid var(--halux-line);
	border-radius: var(--halux-radius);
	transition: border-color .15s ease, background-color .15s ease;
}

.halux-mp__option:hover .halux-mp__option-body {
	border-color: #cfcbc4;
	border-inline-start-color: var(--halux-accent);
}

.halux-mp__radio:checked + .halux-mp__option-body {
	background: var(--halux-surface-soft);
	border-color: #cfcbc4;
	border-inline-start-color: var(--halux-accent);
}

.halux-mp__radio:focus-visible + .halux-mp__option-body,
.halux-mp__radio:focus + .halux-mp__option-body {
	outline: 2px solid var(--halux-accent);
	outline-offset: 2px;
}

.halux-mp__option-mark {
	flex: 0 0 auto;
	width: 20px;
	height: 20px;
	border: 1px solid #bdb9b2;
	border-radius: 50%;
	background: #fff;
	position: relative;
}

.halux-mp__radio:checked + .halux-mp__option-body .halux-mp__option-mark {
	border-color: var(--halux-accent);
}

.halux-mp__radio:checked + .halux-mp__option-body .halux-mp__option-mark::after {
	content: "";
	position: absolute;
	inset: 4px;
	border-radius: 50%;
	background: var(--halux-accent);
}

.halux-mp__option-text {
	display: flex;
	flex-direction: column;
	min-width: 0;
}

.halux-mp__option-name {
	font-weight: 600;
	font-size: 15px;
	line-height: 1.4;
}

.halux-mp__option-tagline {
	color: var(--halux-muted);
	font-size: 13px;
	line-height: 1.5;
}

/* ---------- Details panel ---------- */

.halux-mp__panel {
	padding: 16px;
	background: var(--halux-surface);
	border: 1px solid var(--halux-line);
	border-radius: var(--halux-radius);
}

.halux-mp__panel[hidden] {
	display: none;
}

.halux-mp__amount {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	justify-content: space-between;
	gap: 6px;
	padding: 12px 14px;
	margin: 0 0 14px;
	background: var(--halux-surface-soft);
	border-radius: 8px;
}

.halux-mp__amount-label {
	color: var(--halux-muted);
	font-size: 13px;
}

.halux-mp__amount-value {
	font-size: 21px;
	font-weight: 700;
	line-height: 1.3;
}

.halux-mp__amount-value .woocommerce-Price-amount,
.halux-mp__amount-value bdi {
	font-size: inherit;
	font-weight: inherit;
}

.halux-mp__row {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	padding: 10px 0;
	border-block-end: 1px dashed var(--halux-line);
}

.halux-mp__row:last-of-type {
	border-block-end: 0;
}

.halux-mp__row-label {
	color: var(--halux-muted);
	font-size: 13px;
}

.halux-mp__row-value {
	font-weight: 600;
}

.halux-mp__copy {
	display: flex;
	align-items: center;
	gap: 10px;
	flex-wrap: wrap;
}

.halux-mp__number {
	font-family: ui-monospace, "SFMono-Regular", "Cascadia Mono", Menlo, Consolas, monospace;
	font-size: 17px;
	font-weight: 600;
	letter-spacing: .04em;
	unicode-bidi: isolate;
	word-break: break-all;
}

.halux-mp__copy-btn {
	appearance: none;
	-webkit-appearance: none;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 38px;
	padding: 0 16px;
	margin: 0;
	font: inherit;
	font-size: 14px;
	font-weight: 600;
	line-height: 1;
	color: var(--halux-ink);
	background: #fff;
	border: 1px solid #cfcbc4;
	border-radius: 8px;
	cursor: pointer;
	text-decoration: none;
	transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}

.halux-mp__copy-btn:hover {
	background: var(--halux-surface-soft);
	border-color: #b6b1a9;
}

.halux-mp__copy-btn:focus-visible {
	outline: 2px solid var(--halux-accent);
	outline-offset: 2px;
}

.halux-mp__copy-btn.is-copied {
	color: #0d6b3d;
	background: #e9f6ee;
	border-color: #b6e0c7;
}

.halux-mp__note {
	margin: 12px 0 0;
	padding-inline-start: 12px;
	border-inline-start: 2px solid var(--halux-accent);
	color: var(--halux-muted);
	font-size: 13.5px;
	line-height: 1.7;
}

.halux-mp__hint {
	margin: 12px 0 0;
	color: var(--halux-muted);
	font-size: 13px;
}

.halux-mp__hint[hidden] {
	display: none;
}

/* ---------- Blocks checkout tweaks ---------- */

.wc-block-components-radio-control-accordion-content .halux-mp,
.wc-block-checkout__payment-method .halux-mp {
	margin-block-start: 4px;
}

@media (max-width: 480px) {
	.halux-mp__amount {
		flex-direction: column;
		align-items: flex-start;
	}

	.halux-mp__copy-btn {
		width: 100%;
	}
}

@media (prefers-reduced-motion: reduce) {
	.halux-mp * {
		transition: none !important;
	}
}
