/**
 * PWP Billing Region Modal
 *
 * Every rule is scoped under .pwp-billing-modal-* so nothing can leak into the
 * Blocksy theme, Stackable blocks, or existing button styles. Typography is
 * inherited from the theme rather than imported.
 */

.pwp-billing-modal-overlay {
	position: fixed;
	inset: 0;
	z-index: 999999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
	background: rgba(15, 23, 32, 0.65);
	opacity: 0;
	transition: opacity 160ms ease;
	-webkit-overflow-scrolling: touch;
	overflow-y: auto;
}

.pwp-billing-modal-overlay[hidden] {
	display: none !important;
}

.pwp-billing-modal-overlay.pwp-billing-modal-open {
	opacity: 1;
}

.pwp-billing-modal-dialog {
	position: relative;
	box-sizing: border-box;
	width: 100%;
	max-width: 420px;
	margin: auto;
	padding: 36px 32px 32px;
	border-radius: 16px;
	background: #ffffff;
	box-shadow: 0 20px 60px rgba(15, 23, 32, 0.3);
	text-align: center;
	font-family: inherit;
	transform: translateY(8px) scale(0.98);
	transition: transform 160ms ease;
}

.pwp-billing-modal-open .pwp-billing-modal-dialog {
	transform: translateY(0) scale(1);
}

.pwp-billing-modal-title {
	margin: 0 0 10px;
	padding: 0;
	font-size: 22px;
	line-height: 1.3;
	font-weight: 700;
	color: #16202b;
	font-family: inherit;
}

.pwp-billing-modal-desc {
	margin: 0 0 26px;
	padding: 0;
	font-size: 15px;
	line-height: 1.55;
	color: #55606c;
	font-family: inherit;
}

.pwp-billing-modal-actions {
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.pwp-billing-modal-button {
	display: block;
	width: 100%;
	margin: 0;
	padding: 15px 20px;
	border: 0;
	border-radius: 8px;
	background: #1d76bb;
	color: #ffffff;
	font-family: inherit;
	font-size: 16px;
	font-weight: 600;
	line-height: 1.2;
	letter-spacing: 0.02em;
	text-align: center;
	cursor: pointer;
	transition: background-color 140ms ease;
	-webkit-appearance: none;
	appearance: none;
}

.pwp-billing-modal-button:hover,
.pwp-billing-modal-button:focus {
	background: #175e96;
}

.pwp-billing-modal-button:focus-visible,
.pwp-billing-modal-close:focus-visible {
	outline: 3px solid #9ccbec;
	outline-offset: 2px;
}

.pwp-billing-modal-close {
	position: absolute;
	top: 10px;
	right: 10px;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: transparent;
	color: #6b7683;
	cursor: pointer;
	transition: background-color 140ms ease, color 140ms ease;
	-webkit-appearance: none;
	appearance: none;
}

.pwp-billing-modal-close:hover,
.pwp-billing-modal-close:focus {
	background: #f0f3f6;
	color: #16202b;
}

.pwp-billing-modal-close svg {
	display: block;
	width: 18px;
	height: 18px;
}

@media (max-width: 480px) {
	.pwp-billing-modal-dialog {
		padding: 32px 22px 24px;
	}

	.pwp-billing-modal-title {
		font-size: 20px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.pwp-billing-modal-overlay,
	.pwp-billing-modal-dialog,
	.pwp-billing-modal-button,
	.pwp-billing-modal-close {
		transition: none;
	}
}
