.ifp-overlay {
	position: fixed;
	inset: 0;
	background: rgb(0 0 0 / 50%);
	backdrop-filter: blur(2px);
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 2147483647;
}

.ifp-container {
	position: relative;
	width: 100vw;
	height: 100vh;
	background: #fff;
	overflow: hidden;
	display: flex;
	flex-direction: column;
}

.ifp-header {
	display: flex;
	align-items: center;
	justify-content: center;
	background: #fffbeb;
	color: #92400e;
	padding: calc(env(safe-area-inset-top, 0px) + 12px) 20px 12px;
	border-bottom: 1px solid #fde68a;
	box-sizing: border-box;
	position: relative;
}

.ifp-warning-text {
	flex: 1;
	text-align: center;
	font-size: 14px;
	font-weight: 500;
	line-height: 1.4;
	margin: 0;
}

.ifp-close {
	margin-left: 20px;
	background: transparent;
	color: #71717a;
	width: 32px;
	height: 32px;
	border: none;
	border-radius: 8px;
	font-size: 18px;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	transition:
		background 0.15s ease,
		color 0.15s ease;
}

.ifp-close:hover {
	background: #f4f4f5;
	color: #18181b;
}

.ifp-iframe {
	flex: 1;
	border: none;
	width: 100%;
	height: 100%;
}

.ifp-spinner-overlay {
	position: absolute;
	inset: 0;
	background: rgb(255 255 255 / 80%);
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 5;
}

.ifp-spinner-overlay::after {
	content: "";
	width: 32px;
	height: 32px;
	border: 3px solid #e4e4e7;
	border-top-color: #18181b;
	border-radius: 50%;
	animation: ifp-spin 0.8s linear infinite;
}

@keyframes ifp-spin {
	to {
		transform: rotate(360deg);
	}
}

/*
 * The deferred-payment (Multibanco) reference box — confirmation step, confirmation email,
 * customer dashboard, order/booking summary lightboxes. BEM-style classes so a merchant can
 * override any part of this from their own theme/custom CSS without touching plugin code.
 */
.ifthenpay-reference-box {
	margin: 16px 0;
	padding: 20px 22px;
	border: 1px solid #ececef;
	border-radius: 16px;
	background: #fff;
	box-shadow: 0 4px 12px rgb(0 0 0 / 6%);
}

.ifthenpay-reference-box.is-paid {
	background: #ecfdf5;
	border-color: #a7f3d0;
}

.ifthenpay-reference-box-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin: 0 0 16px;
}

.ifthenpay-reference-box-mark {
	display: block;
	flex: none;
	height: 24px;
	width: auto;
}

.ifthenpay-reference-box-order-id {
	font-size: 12px;
	font-weight: 500;
	color: #a1a1aa;
	white-space: nowrap;
}

.ifthenpay-reference-box-details {
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.ifthenpay-reference-box-row {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 12px;
}

.ifthenpay-reference-box-label {
	color: #71717a;
	font-size: 11px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.6px;
}

.ifthenpay-reference-box-value {
	font-weight: 700;
	font-size: 15px;
	color: #18181b;
	text-align: right;
}

.ifthenpay-reference-box-row-reference .ifthenpay-reference-box-value {
	font-family: SFMono-Regular, Consolas, "Liberation Mono", Menlo, monospace;
	font-size: 17px;
	letter-spacing: 1px;
}

.ifthenpay-reference-box-row-amount .ifthenpay-reference-box-value {
	color: #059669;
	font-size: 19px;
}

.ifthenpay-reference-box-row-status .ifthenpay-reference-box-value {
	color: #047857;
}

.ifthenpay-reference-box-instructions {
	margin: 0 0 14px;
	font-size: 12px;
	color: #71717a;
	line-height: 1.4;
}

.ifthenpay-reference-box-footer {
	display: flex;
	align-items: center;
	gap: 12px;
	margin-top: 14px;
	padding-top: 12px;
	border-top: 1px dashed #d4d4d8;
}

.ifthenpay-reference-box-deadline {
	font-size: 12px;
	font-weight: 600;
	color: #dc2626;
}

.ifthenpay-reference-box-powered-by {
	display: flex;
	align-items: center;
	gap: 6px;
	margin-left: auto;
}

.ifthenpay-reference-box-powered-by span {
	font-size: 11px;
	color: #a1a1aa;
}

.ifthenpay-reference-box-brand {
	height: 14px;
	width: auto;
}
