/**
 * Breeze - Joliet Group: "Make a Payment" popup.
 *
 * Intentionally self-contained and theme-agnostic. Colors lean on Breeze's
 * brand palette but are plain values so this works before the theme loads.
 */

.bjp-overlay {
	position: fixed;
	inset: 0;
	z-index: 99999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
	background: rgba(10, 22, 51, 0.6);
}

.bjp-overlay[hidden] {
	display: none;
}

.bjp-modal {
	position: relative;
	width: 100%;
	max-width: 440px;
	max-height: calc(100vh - 40px);
	overflow-y: auto;
	padding: 32px;
	border-radius: 8px;
	background: #fff;
	box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
	font-family: inherit;
}

.bjp-close {
	position: absolute;
	top: 12px;
	right: 12px;
	width: 36px;
	height: 36px;
	padding: 0;
	border: 0;
	background: transparent;
	font-size: 28px;
	line-height: 1;
	color: #6b7280;
	cursor: pointer;
}

.bjp-close:hover {
	color: #111827;
}

.bjp-title {
	margin: 0 0 8px;
	font-size: 1.5rem;
	color: #0a1633;
}

.bjp-intro {
	margin: 0 0 20px;
	font-size: 0.9375rem;
	line-height: 1.5;
	color: #4b5563;
}

.bjp-field {
	margin-bottom: 16px;
}

.bjp-field label {
	display: block;
	margin-bottom: 6px;
	font-size: 0.875rem;
	font-weight: 600;
	color: #1f2937;
}

.bjp-field input,
.bjp-field select {
	width: 100%;
	padding: 11px 12px;
	border: 1px solid #cbd5e1;
	border-radius: 6px;
	font-size: 1rem;
	color: #111827;
	background: #fff;
	box-sizing: border-box;
}

.bjp-field select {
	-webkit-appearance: none;
	-moz-appearance: none;
	appearance: none;
	padding-right: 36px;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%236b7280' d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 13px center;
	cursor: pointer;
}

/* Hide the legacy expand arrow that IE/Edge render alongside our caret. */
.bjp-field select::-ms-expand {
	display: none;
}

.bjp-field input:focus,
.bjp-field select:focus {
	outline: none;
	border-color: #1d4ed8;
	box-shadow: 0 0 0 3px rgba(29, 78, 216, 0.15);
}

.bjp-amount-wrap {
	position: relative;
}

.bjp-amount-symbol {
	position: absolute;
	top: 50%;
	left: 12px;
	transform: translateY(-50%);
	color: #6b7280;
	pointer-events: none;
}

.bjp-amount-wrap input {
	padding-left: 26px;
}

.bjp-message {
	margin: 0 0 16px;
	padding: 10px 12px;
	border-radius: 6px;
	font-size: 0.875rem;
	background: #fef2f2;
	color: #b91c1c;
}

.bjp-message[hidden] {
	display: none;
}

.bjp-submit {
	width: 100%;
	padding: 13px 16px;
	border: 0;
	border-radius: 6px;
	background: #0b2b90;
	color: #fff;
	font-size: 1rem;
	font-weight: 600;
	cursor: pointer;
}

.bjp-submit:hover {
	background: #0099f3;
}

.bjp-submit:disabled {
	opacity: 0.6;
	cursor: progress;
}

/* Lock background scroll while the popup is open. */
body.bjp-open {
	overflow: hidden;
}

/* --- Embedded payment lightbox ------------------------------------------- */

.bjp-frame-overlay {
	position: fixed;
	inset: 0;
	z-index: 100000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
	background: rgba(10, 22, 51, 0.6);
}

.bjp-frame-overlay[hidden] {
	display: none;
}

.bjp-frame-modal {
	position: relative;
	width: 100%;
	max-width: 740px; /* ~700px inner = Authorize.net's native form width */
	max-height: calc(100vh - 40px);
	overflow-x: hidden; /* clip the empty left padding cropped off the iframe */
	overflow-y: auto;
	padding: 44px 20px 24px;
	border-radius: 8px;
	background: #fff;
	box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

/* Logo header on the payment popups. */
.bjp-brand {
	max-width: 200px;
	margin: 0 auto 20px;
	text-align: center;
}

.bjp-brand svg,
.bjp-brand img {
	display: block;
	width: 100%;
	height: auto;
}

.bjp-frame-close {
	position: absolute;
	top: 8px;
	right: 12px;
	width: 36px;
	height: 36px;
	padding: 0;
	border: 0;
	background: transparent;
	font-size: 28px;
	line-height: 1;
	color: #6b7280;
	cursor: pointer;
}

.bjp-frame-close:hover {
	color: #111827;
}

.bjp-iframe {
	display: block;
	/* Crop Authorize.net's empty side padding so the form sits balanced; the
	   modal clips the overflow. Left pull = 40px, right trim = 16px (~40% of
	   the right gap). Width = 100% + leftPull + rightTrim. */
	width: calc(100% + 56px);
	margin-left: -40px;
	min-height: 400px;
	border: 0;
}

/* On narrow screens the hosted form reflows to a single column, so don't
   crop the left — it would clip the fields. */
@media (max-width: 600px) {
	.bjp-iframe {
		width: 100%;
		margin-left: 0;
	}
}

.bjp-frame-status {
	margin: 0 0 12px;
	padding: 14px 16px;
	border-radius: 6px;
	font-size: 1rem;
	line-height: 1.5;
	text-align: center;
}

.bjp-frame-status[hidden] {
	display: none;
}

.bjp-frame-status--success {
	background: #ecfdf5;
	color: #065f46;
}

.bjp-frame-status--error {
	background: #fef2f2;
	color: #b91c1c;
}
