/* Only the lightbox shell is styled. Content elements retain their theme styles. */
dialog.shlb-dialog {
	box-sizing: border-box;
	position: fixed;
	inset: 0;
	margin: auto;
	padding: 0;
	border: 0;
	width: calc(100% - 32px);
	max-width: 1000px;
	max-height: calc(100vh - 32px);
	max-height: calc(100dvh - 32px);
	overflow: visible;
	background: #fff;
	color: inherit;
	font: inherit;
	z-index: 2147483647;
}

dialog.shlb-dialog:not([open]) { display: none; }
dialog.shlb-dialog::backdrop { background: rgba(0, 0, 0, 0.7); }

.shlb-dialog > .shlb-content {
	box-sizing: border-box;
	padding: 48px 24px 24px;
	max-height: calc(100vh - 32px);
	max-height: calc(100dvh - 32px);
	overflow: auto;
	overscroll-behavior: contain;
	-webkit-overflow-scrolling: touch;
}

.shlb-dialog > .shlb-close {
	box-sizing: border-box;
	position: absolute;
	top: 4px;
	right: 4px;
	z-index: 1;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	min-width: 0;
	min-height: 0;
	margin: 0;
	padding: 0;
	border: 1px solid #777;
	border-radius: 4px;
	background: #fff;
	color: #111;
	font: 32px/1 sans-serif;
	letter-spacing: normal;
	text-decoration: none;
	cursor: pointer;
}

.shlb-dialog > .shlb-close:focus-visible {
	outline: 3px solid #1559b7;
	outline-offset: 2px;
}

@media (max-width: 480px) {
	.shlb-dialog > .shlb-content { padding: 48px 16px 16px; }
}
