.rwp-overlay {
	position: fixed;
	inset: 0;
	z-index: 999999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 16px;
	background: rgba(0, 0, 0, 0.55);
	opacity: 0;
	transition: opacity 0.25s ease;
	-webkit-tap-highlight-color: transparent;
}
.rwp-overlay[hidden] { display: none; }
.rwp-overlay.rwp-open { opacity: 1; }

.rwp-dialog {
	position: relative;
	box-sizing: border-box;
	width: 100%;
	max-width: 480px;
	max-height: calc(100vh - 32px);
	max-height: calc(100dvh - 32px);
	overflow-y: auto;
	-webkit-overflow-scrolling: touch;
	padding: 32px 28px 28px;
	background: var(--black, #0f0f0f);
	color: var(--rch-beige, #F6E8D2);
	border-radius: 2px;
	box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
	transform: translateY(16px) scale(0.98);
	transition: transform 0.25s ease;
	font-size: 16px;
	line-height: 1.55;
	text-align: left;
}
.rwp-open .rwp-dialog { transform: none; }
.rwp-dialog:focus { outline: none; }

.rwp-close {
	position: absolute;
	top: 8px;
	right: 8px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	padding: 0;
	margin: 0;
	border: 0;
	border-radius: 50%;
	background: transparent;
	color: var(--rch-beige, #F6E8D2);
	cursor: pointer;
	line-height: 1;
	box-shadow: none;
}
.rwp-close:hover { background: rgba(246, 232, 210, 0.12); }
.rwp-close:focus-visible { outline: 2px solid currentColor; outline-offset: 2px; }

.rwp-title {
	margin: 0 36px 12px 0;
	font-size: 1.4em;
	line-height: 1.25;
	color: inherit;
}
.rwp-body > :first-child { margin-top: 0; }
.rwp-body > :last-child { margin-bottom: 0; }
.rwp-body img { max-width: 100%; height: auto; }
.rwp-body, .rwp-body p, .rwp-body li, .rwp-body h3, .rwp-body h4 { color: inherit; }
.rwp-body a { color: inherit; text-decoration: underline; }

.rwp-actions { margin-top: 24px; }
.rwp-button {
	display: inline-block;
	box-sizing: border-box;
	min-height: 44px;
	padding: 12px 24px;
	border: 0;
	border-radius: 2px;
	background: var(--rch-beige, #F6E8D2);
	color: var(--black, #0f0f0f) !important;
	font: inherit;
	font-weight: 600;
	text-decoration: none !important;
	text-align: center;
	cursor: pointer;
}
.rwp-button:hover { opacity: 0.88; }
.rwp-button:focus-visible { outline: 2px solid var(--rch-beige, #F6E8D2); outline-offset: 3px; }

html.rwp-lock, html.rwp-lock body { overflow: hidden; }

@media (max-width: 600px) {
	.rwp-overlay { align-items: flex-end; padding: 0; }
	.rwp-dialog {
		max-width: none;
		max-height: 85vh;
		max-height: 85dvh;
		padding: 28px 20px calc(20px + env(safe-area-inset-bottom));
		border-radius: 2px 2px 0 0;
		transform: translateY(100%);
	}
	.rwp-button { display: block; width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
	.rwp-overlay, .rwp-dialog { transition: none; }
}
