/**
 * iCredit inline ("no page leave") express checkout styles.
 * Mobile-first, RTL-safe (uses logical properties), no fixed widths.
 */

.icredit-inline-panel {
	display: none;
	width: 100%;
	margin-block: 1.5em;
	border: 1px solid rgba( 0, 0, 0, 0.08 );
	border-radius: 12px;
	background: #fff;
	box-shadow: 0 6px 24px rgba( 0, 0, 0, 0.08 );
	overflow: hidden;
	position: relative;
}

.icredit-inline-panel.is-active {
	display: block;
}

.icredit-inline-frame-wrap {
	width: 100%;
}

.icredit-inline-frame {
	display: block;
	width: 100%;
	height: 700px;
	max-height: 90vh;
	border: 0;
}

/* Loading state shown until the iframe fires `load`. */
.icredit-inline-loading {
	position: absolute;
	inset: 0;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 0.75em;
	background: #fff;
	z-index: 2;
}

.icredit-inline-loading[aria-hidden="true"] {
	display: none;
}

.icredit-inline-loading-text {
	font-size: 0.95em;
	color: #555;
}

.icredit-inline-spinner {
	width: 38px;
	height: 38px;
	border-radius: 50%;
	border: 3px solid rgba( 37, 124, 225, 0.25 );
	border-top-color: #257CE1;
	animation: icreditSpin 0.8s linear infinite;
}

@keyframes icreditSpin {
	to {
		transform: rotate( 360deg );
	}
}

/* Reduced motion: don't spin. */
@media ( prefers-reduced-motion: reduce ) {
	.icredit-inline-spinner {
		animation: none;
	}
}

/* Smaller screens: let the frame use more vertical space. */
@media ( max-width: 600px ) {
	.icredit-inline-panel {
		margin-block: 1em;
		border-radius: 8px;
	}

	.icredit-inline-frame {
		height: 80vh;
		max-height: none;
	}
}
