.moneris-api-payment-fields {
	margin-top: 0.75em;
}

/* --- Accepted card brands (classic label + Blocks label) ------------------ */

.moneris-api-card-icons {
	display: inline-flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 4px;
	vertical-align: middle;
	margin-left: 6px;
	line-height: 1;
}

/* Themes routinely size every image in the payment list; keep the marks legible
   and uniform without inheriting those rules. */
img.moneris-api-card-icon {
	display: block;
	width: auto;
	height: 24px;
	max-height: 24px;
	max-width: none;
	margin: 0;
	padding: 0;
	border: 0;
	box-shadow: none;
	border-radius: 3px;
}

/* Blocks renders the label inside a flex row; let the marks sit beside the title
   and wrap under it on narrow screens instead of squeezing the text. */
.moneris-api-label {
	display: inline-flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 4px 6px;
}

.moneris-api-label .moneris-api-card-icons {
	margin-left: 0;
}

/* Prompt shown until the required checkout fields are complete. */
.moneris-api-gate {
	padding: 14px 16px;
	border: 1px dashed #c3c4c7;
	border-radius: 8px;
	background: #f6f7f7;
	color: #50575e;
	font-size: 0.92em;
	line-height: 1.5;
}

.moneris-api-gate p {
	margin: 0;
}

/* The fields still outstanding. Weighted so it reads as the actionable half of the
   prompt rather than more explanation. */
.moneris-api-gate-missing {
	margin-top: 8px !important;
	color: #1e1e1e;
	font-weight: 600;
}

/* Card-form container. */
.moneris-api-frame-wrap {
	padding: 16px;
	border: 1px solid #e0e0e0;
	border-radius: 8px;
	background: #fff;
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
	max-width: 380px;
}

/* Names the hosted fields, whose own labels are placeholders inside the inputs. */
.moneris-api-card-heading {
	margin: 0 0 10px !important;
	color: #50575e;
	font-size: 13px;
	font-weight: 500;
	line-height: 1.4;
}

/* Two rows of hosted inputs (card number, then expiry + CVV side by side). Each row is 43px
   plus a 12px gutter at the font size we hand the hosted form, so 110px of content — the
   frame cannot scroll, so keep a little headroom over that and no more. */
#moneris-api-ht-frame {
	display: block;
	width: 100%;
	height: 122px;
	border: 0;
	background: transparent;
}

.moneris-api-secure-note {
	display: flex;
	align-items: center;
	gap: 6px;
	margin: 4px 0 0;
	color: #50575e;
	font-size: 0.82em;
	line-height: 1.4;
}

.moneris-api-lock {
	font-size: 0.95em;
}

.moneris-api-error {
	margin-top: 0.6em;
	padding: 10px 12px;
	border-radius: 6px;
	background: #fcf0f1;
	color: #b32d2e;
	font-size: 0.92em;
	line-height: 1.4;
}


/* --- Checkout processing overlay ----------------------------------------- */

/* blockUI centres this over the form while we tokenize / authenticate. WooCommerce draws its
   own spinner on the overlay via ::before; suppress it on the form we blocked so the two do
   not sit on top of each other (and so there is still a spinner where that CSS never loads). */
.woocommerce .moneris-api-blocking > .blockUI.blockOverlay::before,
.moneris-api-blocking > .blockUI.blockOverlay::before {
	content: none !important;
}

/* blockUI writes its own pixel top/left inline; !important wins over that so the spinner is
   always in view, not parked 40% down a checkout form the shopper has scrolled past. */
.moneris-api-blocking > .blockUI.blockMsg {
	position: fixed !important;
	top: 50% !important;
	left: 50% !important;
	width: auto !important;
	transform: translate(-50%, -50%);
}

.moneris-api-block-message {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 10px;
	color: #1e1e1e;
	font-size: 0.95em;
	line-height: 1.4;
}

.moneris-api-spinner {
	margin: 0 auto;
}
