.opv-card-form input[type="text"] { width: 100%; box-sizing: border-box; }
.opv-card-form .form-row { margin-bottom: 12px; }
.opv-demo-notice { background: #fff8e5; border: 1px solid #f0c36d; padding: 6px 10px; border-radius: 3px; font-size: 0.9em; }

/*
 * Closed state: invisible but still laid out. Never use display:none here: Viva's script runs the
 * bank's 3D Secure frames inside this box, and they fail (event 12005) if the box is not rendered.
 */
.opv-modal.opv-closed { visibility: hidden; pointer-events: none; }
.opv-modal {
	position: fixed; inset: 0; z-index: 100000;
	background: rgba(0, 0, 0, 0.6);
	display: flex; align-items: center; justify-content: center;
	padding: 12px;
}
.opv-modal-box {
	background: #fff; width: 100%; max-width: 440px; max-height: 92vh;
	border-radius: 6px; display: flex; flex-direction: column; overflow: hidden;
}
.opv-modal-head { display: flex; align-items: center; justify-content: space-between; padding: 10px 14px; border-bottom: 1px solid #e2e2e2; }
.opv-modal-head h2 { margin: 0; font-size: 1.05em; }
.opv-modal-close { background: none; border: 0; font-size: 28px; line-height: 1; cursor: pointer; padding: 0 6px; color: #333; }
.opv-modal-body { overflow: auto; -webkit-overflow-scrolling: touch; min-height: 300px; }
.opv-modal-body iframe { width: 100%; min-height: 400px; border: 0; }
@media (max-width: 480px) {
	.opv-modal { padding: 0; }
	.opv-modal-box { max-width: none; max-height: 100vh; height: 100%; border-radius: 0; }
}

/* Cart & Checkout Blocks card form. */
.opv-block-card { margin: 4px 0 0; }
.opv-block-card .opv-demo-note { margin: 0 0 12px; padding: 8px 12px; border: 1px solid #f0c36d; background: #fff8e5; border-radius: 4px; font-size: 0.9em; }
.opv-block-card .opv-block-row { margin-bottom: 12px; }
.opv-block-card label { display: block; margin-bottom: 4px; font-size: 0.9em; }
.opv-block-card .opv-block-input { width: 100%; box-sizing: border-box; min-height: 44px; padding: 8px 12px; border: 1px solid #949494; border-radius: 4px; font-size: 16px; background: #fff; color: #1e1e1e; }
.opv-block-card .opv-block-input:focus { outline: 2px solid #2271b1; outline-offset: 1px; }
.opv-block-card .opv-block-pair { display: flex; gap: 12px; }
.opv-block-card .opv-block-half { flex: 1 1 0; min-width: 0; }

/* Bank's 3D Secure page for a saved card. */
#opv-3ds-container .opv-3ds-frame { width: 100%; min-height: 460px; border: 0; display: block; background: #fff; }

/* Apple Pay and Google Pay buttons (above the card form). */
.opv-wallets[hidden] { display: none; }
.opv-wallets { margin: 0 0 14px; }
.opv-wallet-buttons > * { display: block; width: 100%; margin: 0 0 8px; }
.opv-apple-pay-button {
	-webkit-appearance: -apple-pay-button;
	-apple-pay-button-type: plain;
	-apple-pay-button-style: black;
	display: block; width: 100%; height: 44px; min-height: 44px;
	border: 0; border-radius: 4px; padding: 0; cursor: pointer;
}
.opv-google-pay-button { height: 44px; }
.opv-google-pay-button button { width: 100%; }
.opv-wallets-or { display: flex; align-items: center; gap: 10px; margin: 4px 0 12px; font-size: 0.9em; color: #646970; }
.opv-wallets-or::before, .opv-wallets-or::after { content: ""; flex: 1 1 auto; border-top: 1px solid #dcdcde; }
.opv-wallet-error { color: #b32d2e; margin: 0 0 8px; font-size: 0.9em; }

/* Express checkout (Google Pay) on the cart page and at the top of the checkout. */
.opv-express[hidden] { display: none; }
.opv-express { margin: 0 0 16px; }
.opv-express-title { margin: 0 0 8px; font-weight: 600; }
.opv-express-button { min-height: 48px; }
.opv-express-button button { width: 100%; }
.opv-express-error { margin: 8px 0 0; color: #b32d2e; font-size: 0.9em; }
.opv-express-error[hidden] { display: none; }
.opv-express-or { display: flex; align-items: center; gap: 10px; margin: 12px 0 0; font-size: 0.9em; color: #646970; }
.opv-express-or::before, .opv-express-or::after { content: ""; flex: 1 1 auto; border-top: 1px solid #dcdcde; }
.opv-express-in-block .opv-express-or { display: none; }

/* Product page: "Or buy now with" and the wallet buttons under the add-to-cart form. */
.opv-express-product { margin: 14px 0 0; max-width: 420px; }
.opv-express-product .opv-express-or { margin: 0 0 10px; }
.opv-express-product .opv-express-button { display: grid; gap: 8px; }
