/* MivoDeals Pay by Card — product-page form styles.
   Mobile-first: the form sits below the add-to-cart area on a single
   product page, in a bordered box that reads as one clear block. Uses the
   theme's own button + form-row classes where possible so it matches the
   store instead of fighting it. */

.mivodeals-pbc {
	border: 1px solid #e2e2e2;
	border-radius: 10px;
	padding: 18px;
	margin: 24px 0;
	background: #fff;
}

.mivodeals-pbc-title {
	margin: 0 0 4px;
	font-size: 1.15em;
}

.mivodeals-pbc-sub {
	margin: 0 0 16px;
	color: #555;
	font-size: 0.95em;
}

.mivodeals-pbc-message {
	padding: 12px 14px;
	border-radius: 6px;
	margin: 0 0 16px;
	font-size: 0.95em;
	line-height: 1.5;
}

.mivodeals-pbc-error {
	background: #fdecea;
	border: 1px solid #e0a19c;
	color: #7a1f1a;
}

.mivodeals-pbc-success {
	background: #e6f4ea;
	border: 1px solid #a3cfae;
	color: #1e5c2e;
}

.mivodeals-pbc-info {
	background: #e8f0fe;
	border: 1px solid #a8c0f0;
	color: #1a3a7a;
}

.mivodeals-pbc-form .form-row {
	margin-bottom: 14px;
}

.mivodeals-pbc-form label,
.mivodeals-pbc-card-label {
	display: block;
	font-weight: 600;
	margin-bottom: 5px;
}

.mivodeals-pbc-form input[type="text"],
.mivodeals-pbc-form input[type="email"],
.mivodeals-pbc-form input[type="tel"],
.mivodeals-pbc-form select {
	width: 100%;
	box-sizing: border-box;
	padding: 11px 12px;
	font-size: 16px; /* 16px prevents iOS Safari zooming on focus */
	border: 1px solid #ccc;
	border-radius: 6px;
	background: #fff;
}

.mivodeals-pbc-form input:focus,
.mivodeals-pbc-form select:focus {
	border-color: #007cba;
	outline: 2px solid rgba(0, 124, 186, 0.25);
	outline-offset: 0;
}

.mivodeals-pbc-form input:invalid {
	border-color: #c0392b;
}

.mivodeals-pbc-row {
	display: flex;
	gap: 12px;
}

.mivodeals-pbc-row .form-row {
	flex: 1 1 0;
	min-width: 0; /* lets flex children shrink on narrow screens */
}

/* Square hosted card element. The SDK renders its own iframe inside this
   box; the container needs a visible border and enough height. */
.mivodeals-pbc-card {
	border: 1px solid #ccc;
	border-radius: 6px;
	padding: 4px 8px;
	min-height: 48px;
	background: #fff;
}

.mivodeals-pbc-card:focus-within {
	border-color: #007cba;
	outline: 2px solid rgba(0, 124, 186, 0.25);
	outline-offset: 0;
}

.mivodeals-pbc-card-hint {
	display: block;
	font-weight: 400;
	color: #666;
	font-size: 0.9em;
	margin-bottom: 5px;
}

.mivodeals-pbc-total {
	font-weight: 700;
	font-size: 1.05em;
	margin: 4px 0 16px;
}

.mivodeals-pbc-terms label {
	font-weight: 400;
	display: flex;
	gap: 8px;
	align-items: flex-start;
}

.mivodeals-pbc-terms input[type="checkbox"] {
	margin-top: 3px;
	flex-shrink: 0;
}

.mivodeals-pbc-submit {
	width: 100%;
	padding: 14px;
	font-size: 1.05em;
}

.mivodeals-pbc-submit:disabled {
	opacity: 0.6;
	cursor: wait;
}

.mivodeals-pbc-continue {
	width: 100%;
	margin-top: 12px;
	text-align: center;
	display: block;
}

.mivodeals-pbc-fineprint {
	margin: 12px 0 0;
	color: #666;
	font-size: 0.85em;
	text-align: center;
}

.mivodeals-pbc-admin-note {
	background: #fff8e1;
	border: 1px dashed #d4a017;
	padding: 10px 12px;
	border-radius: 6px;
	font-size: 0.9em;
}

/* Small phones: stack the two-column rows. */
@media (max-width: 480px) {
	.mivodeals-pbc {
		padding: 14px;
		margin: 18px 0;
	}

	.mivodeals-pbc-row {
		flex-direction: column;
		gap: 0;
	}
}
