/* ==========================================================================
   Peptira Gateway Rotator — Cart Page Modal
   Branded payment-method picker shown over the cart page when customer
   clicks "Proceed to Checkout."
   ========================================================================== */

/* Lock body scroll when modal is open. */
body.pgr-cg-locked {
	overflow: hidden;
}

.pgr-cart-gate-modal {
	position: fixed;
	inset: 0;
	z-index: 2147483600; /* max safe z-index, above FK Cart's modal (9999) */
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
	box-sizing: border-box;
}

.pgr-cart-gate-backdrop {
	position: absolute;
	inset: 0;
	background: rgba(15, 23, 42, 0.72);
	backdrop-filter: blur(4px);
	-webkit-backdrop-filter: blur(4px);
}

.pgr-cart-gate-dialog {
	position: relative;
	background: #ffffff;
	border-radius: 16px;
	box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.45);
	width: 100%;
	max-width: 560px;
	padding: 36px 32px 32px;
	box-sizing: border-box;
	max-height: calc(100vh - 40px);
	overflow-y: auto;
	animation: pgrCgFadeIn 0.18s ease-out;
}

@keyframes pgrCgFadeIn {
	from { opacity: 0; transform: translateY(12px); }
	to   { opacity: 1; transform: translateY(0); }
}

.pgr-cart-gate-close {
	position: absolute;
	top: 12px;
	right: 14px;
	background: transparent;
	border: 0;
	font-size: 28px;
	line-height: 1;
	color: #94a3b8;
	cursor: pointer;
	padding: 6px 10px;
	border-radius: 8px;
	transition: background 0.15s, color 0.15s;
}
.pgr-cart-gate-close:hover {
	background: #f1f5f9;
	color: #1e293b;
}

.pgr-cart-gate-title {
	margin: 0 0 6px;
	font-size: 22px;
	font-weight: 700;
	color: #0f172a;
	text-align: center;
	letter-spacing: -0.01em;
}

.pgr-cart-gate-subtitle {
	margin: 0 0 24px;
	font-size: 14px;
	color: #64748b;
	text-align: center;
	line-height: 1.5;
}

.pgr-cart-gate-options {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 12px;
}

.pgr-cg-option {
	display: flex !important;
	flex-direction: column !important;
	align-items: center !important;
	justify-content: center !important;
	gap: 12px !important;
	padding: 18px 14px !important;
	background: #ffffff !important;
	border: 2px solid #e2e8f0 !important;
	border-radius: 12px !important;
	cursor: pointer !important;
	font-family: inherit !important;
	font-size: 14px !important;
	font-weight: 600 !important;
	color: #1e293b !important;
	transition: border-color 0.15s, box-shadow 0.15s, transform 0.1s !important;
	text-align: center !important;
	min-height: 110px !important;
	width: 100% !important;
	box-sizing: border-box !important;
	text-transform: none !important;
	letter-spacing: normal !important;
	line-height: 1.3 !important;
	text-shadow: none !important;
	box-shadow: none !important;
	overflow: visible !important;
}
.pgr-cg-option:hover {
	border-color: #3b82f6 !important;
	box-shadow: 0 4px 12px -2px rgba(59, 130, 246, 0.25) !important;
	background: #ffffff !important;
	color: #1e293b !important;
}
.pgr-cg-option:active {
	transform: scale(0.98) !important;
}
.pgr-cg-option:focus,
.pgr-cg-option:focus-visible {
	outline: 3px solid #3b82f6 !important;
	outline-offset: 2px !important;
}

.pgr-cg-option-icon {
	display: flex !important;
	align-items: center !important;
	justify-content: center !important;
	height: 44px !important;
	min-height: 44px !important;
	min-width: 80px !important;
	width: auto !important;
	flex: 0 0 auto !important;
	line-height: 1 !important;
	padding: 0 !important;
	margin: 0 !important;
}
.pgr-cg-option-icon svg {
	width: 80px !important;
	height: 36px !important;
	max-width: 100% !important;
	max-height: 100% !important;
	display: inline-block !important;
	overflow: visible !important;
	vertical-align: middle !important;
}

.pgr-cg-option-gateway .pgr-cg-option-icon {
	color: #475569;
}
.pgr-cg-option-gateway .pgr-cg-option-icon svg {
	width: 100px !important;
	height: 36px !important;
}

.pgr-cg-option-label {
	display: block;
	line-height: 1.3;
	color: #0f172a;
}

.pgr-cart-gate-loading {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 14px;
	padding: 48px 20px;
	color: #475569;
	font-size: 15px;
}

.pgr-cart-gate-spinner {
	width: 40px;
	height: 40px;
	border: 4px solid #e2e8f0;
	border-top-color: #3b82f6;
	border-radius: 50%;
	animation: pgrCgSpin 0.85s linear infinite;
}

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

.pgr-cart-gate-error {
	margin-top: 18px;
	padding: 14px 16px;
	background: #fef2f2;
	border: 1px solid #fecaca;
	border-radius: 10px;
	color: #991b1b;
	font-size: 14px;
	line-height: 1.5;
	text-align: center;
}

.pgr-cg-empty {
	padding: 32px 16px;
	text-align: center;
	color: #64748b;
	font-size: 14px;
	line-height: 1.5;
}

/* --- MOBILE --- */
@media (max-width: 640px) {
	.pgr-cart-gate-dialog {
		padding: 28px 20px 24px;
		border-radius: 14px;
	}
	.pgr-cart-gate-title {
		font-size: 19px;
	}
	.pgr-cart-gate-options {
		grid-template-columns: repeat(2, 1fr);
		gap: 10px;
	}
	.pgr-cg-option {
		min-height: 88px;
		padding: 14px 10px;
		font-size: 13px;
	}
}
