/* ============================================================
 * Billing Booking Gate (Phase 2 / Component Q)
 * Styled modal that fires when a customer with bad card or AR
 * tries to click into the booking flow.
 *
 * Brand: pink #FF0095, dark purple #2A0A3D.
 * Self-contained namespace (.wbbg-*) — never clashes with theme
 * or other plugin modals. NO native dialog usage anywhere.
 * ============================================================ */

.wbbg-modal {
	position: fixed;
	inset: 0;
	z-index: 999999;
	display: flex;
	align-items: center;
	justify-content: center;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
	animation: wbbg-fade-in 200ms ease-out;
}

@keyframes wbbg-fade-in {
	from { opacity: 0; }
	to   { opacity: 1; }
}

.wbbg-backdrop {
	position: absolute;
	inset: 0;
	background: rgba(15, 8, 25, 0.65);
	backdrop-filter: blur(4px);
	-webkit-backdrop-filter: blur(4px);
}

.wbbg-card {
	position: relative;
	background: #fff;
	max-width: 480px;
	width: calc(100% - 32px);
	padding: 32px;
	border-radius: 16px;
	border-top: 4px solid #FF0095;
	box-shadow: 0 24px 48px rgba(0, 0, 0, 0.25), 0 0 0 1px rgba(0, 0, 0, 0.05);
	animation: wbbg-scale-in 220ms cubic-bezier(0.16, 1, 0.3, 1);
	box-sizing: border-box;
}

@keyframes wbbg-scale-in {
	from { opacity: 0; transform: scale(0.94) translateY(8px); }
	to   { opacity: 1; transform: scale(1) translateY(0); }
}

.wbbg-close {
	position: absolute;
	top: 12px;
	right: 12px;
	width: 32px;
	height: 32px;
	background: transparent;
	border: 0;
	border-radius: 8px;
	font-size: 22px;
	line-height: 1;
	color: #6b7280;
	cursor: pointer;
	transition: background-color 150ms;
}
.wbbg-close:hover {
	background: #f3f4f6;
	color: #2A0A3D;
}

.wbbg-title {
	color: #2A0A3D;
	font-size: 22px;
	font-weight: 600;
	margin: 0 0 16px;
	line-height: 1.3;
}

.wbbg-reasons {
	margin: 16px 0 24px;
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.wbbg-reason {
	padding: 12px 16px;
	background: #fdf2f8;
	border-left: 3px solid #FF0095;
	border-radius: 6px;
	color: #2A0A3D;
	font-size: 14px;
	line-height: 1.5;
}

.wbbg-actions {
	display: flex;
	flex-direction: column;
	gap: 10px;
	margin-top: 24px;
}

@media (min-width: 540px) {
	.wbbg-actions {
		flex-direction: row;
		flex-wrap: wrap;
	}
	.wbbg-actions .wbbg-btn {
		flex: 1 1 auto;
		min-width: 140px;
	}
}

.wbbg-btn {
	display: inline-block;
	padding: 12px 24px;
	border-radius: 8px;
	font-size: 14px;
	font-weight: 600;
	text-decoration: none;
	text-align: center;
	cursor: pointer;
	border: 2px solid transparent;
	transition: background-color 150ms, border-color 150ms, transform 100ms;
	font-family: inherit;
	line-height: 1.2;
}
.wbbg-btn:active {
	transform: translateY(1px);
}

.wbbg-btn-primary {
	background: #FF0095;
	color: #fff;
	border-color: #FF0095;
}
.wbbg-btn-primary:hover {
	background: #d6007d;
	border-color: #d6007d;
	color: #fff;
	text-decoration: none;
}

.wbbg-btn-ghost {
	background: transparent;
	color: #2A0A3D;
	border-color: #2A0A3D;
}
.wbbg-btn-ghost:hover {
	background: #2A0A3D;
	color: #fff;
	text-decoration: none;
}

.wbbg-btn-override {
	background: transparent;
	color: #6b7280;
	border-color: transparent;
	font-size: 12px;
	font-weight: 500;
	padding: 8px 12px;
	text-transform: uppercase;
	letter-spacing: 0.04em;
}
.wbbg-btn-override:hover {
	color: #2A0A3D;
	background: #f3f4f6;
}

/* Smaller screens — keep readable */
@media (max-width: 540px) {
	.wbbg-card {
		padding: 24px 20px;
		border-radius: 12px;
	}
	.wbbg-title {
		font-size: 18px;
	}
	.wbbg-reason {
		font-size: 13px;
		padding: 10px 14px;
	}
}

/* Loading state (during AJAX eligibility check) */
.wbbg-loading {
	display: inline-block;
	width: 14px;
	height: 14px;
	border: 2px solid #FF0095;
	border-top-color: transparent;
	border-radius: 50%;
	animation: wbbg-spin 700ms linear infinite;
	margin-right: 8px;
	vertical-align: middle;
}
@keyframes wbbg-spin {
	to { transform: rotate(360deg); }
}
