.sr-episode-gateway-trigger {
	width: 100%;
	font-family: inherit;
	font-size: inherit;
	text-align: start;
	cursor: pointer;
}

.sr-episode-item .sr-episode-gateway-trigger:hover { border-color: #ff7890; }

html.sr-episode-gateway-open { overflow: hidden; }

.sr-episode-gateway {
	box-sizing: border-box;
	width: min(520px, calc(100% - 24px));
	max-height: calc(100vh - 24px);
	max-height: calc(100dvh - 24px);
	margin: auto;
	padding: 0;
	overflow: auto;
	overscroll-behavior: contain;
	border: 1px solid #41495a;
	border-radius: 16px;
	background: #171b25;
	color: #f5f7fb;
	color-scheme: dark;
}

.sr-episode-gateway:not([open]),
.sr-gateway-qr[hidden] { display: none; }
.sr-episode-gateway::backdrop { background: rgba(5, 7, 11, 0.78); }
.sr-gateway-panel { position: relative; padding: clamp(12px, 4vw, 24px); }
.sr-gateway-heading { margin-bottom: 12px; padding-inline-end: 48px; }
.sr-gateway-heading h2 { margin: 0; }
.sr-gateway-heading p { margin: 3px 0 0; }
.sr-gateway-close-form { position: absolute; inset: 8px 8px auto auto; }
.sr-episode-gateway button { cursor: pointer; }
.sr-gateway-close { position: relative; }

.sr-gateway-official,
.sr-gateway-sponsored { padding: 12px; border: 1px solid #41495a; border-radius: 10px; }
.sr-gateway-official { background: #252b39; }
.sr-gateway-sponsored { margin-top: 10px; }
.sr-episode-gateway h3 { margin: 0 0 4px; font-size: 1.05rem; }
.sr-episode-gateway section p { margin: 0 0 8px; font-size: .875rem; line-height: 1.4; }
.sr-gateway-unavailable { margin: 0; color: #cbd1df; }
.sr-gateway-label { display: block; color: #ffd45c; font-size: .75rem; }
.sr-gateway-qr { margin-block: 10px; text-align: center; }
.sr-gateway-qr-image { width: max-content; margin: 0 auto 6px; padding: 20px; background: #fff; }
.sr-gateway-qr-image :is(img, canvas) { max-width: 100%; height: auto; }

.sr-episode-gateway .sr-gateway-action {
	display: inline-flex;
	align-items: center;
	min-height: 44px;
	max-width: 100%;
	padding: 6px 12px;
	border: 1px solid #c52144;
	border-radius: 8px;
	background: #c52144;
	color: #fff;
	font-weight: 700;
	text-decoration: none;
	overflow-wrap: anywhere;
}

.sr-episode-gateway .sr-gateway-action:hover { border-color: #ff7890; }
.sr-gateway-dismiss { margin-top: 8px; text-align: center; }
.sr-gateway-dismiss button { min-height: 44px; padding: 6px 8px; background: transparent; color: #fff; text-decoration: underline; }
.sr-episode-gateway :is(a, button):focus-visible,
.sr-episode-gateway-trigger:focus-visible { outline: 2px solid #ffd45c; outline-offset: 2px; }

@media (max-width: 767px) {
	.sr-gateway-qr { display: none; }
}
