/*
 * The premium dialogs (js/iBroadcastPremium.js): the upgrade offer, and running out of streaming or storage.
 *
 * Colours come from the theme's --premium-* variables (common-light.css, common-dark.css, common-lights-out.css).
 * The plan panel's blue and the usage bars' yellow are the same in every theme.
 */

.mgr-premium-modal {
	position: fixed;
	inset: 0;
	z-index: 1000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 16px;
	box-sizing: border-box;
	background-color: rgba(4, 10, 20, .55);
	animation: mgr-premium-fade .2s ease;
}

@keyframes mgr-premium-fade {
	from { opacity: 0; }
	to { opacity: 1; }
}

@keyframes mgr-premium-rise {
	from { opacity: 0; transform: translateY(12px) scale(.98); }
	to { opacity: 1; transform: none; }
}

.mgr-premium-dialog {
	position: relative;
	display: flex;
	max-width: 100%;
	max-height: calc(100vh - 32px);
	overflow: auto;
	box-sizing: border-box;
	border: 1px solid var(--premium-card-border);
	border-radius: 18px;
	background-color: var(--premium-surface);
	color: var(--premium-text);
	box-shadow: var(--premium-shadow);
	animation: mgr-premium-rise .25s ease;
}

.mgr-premium-dialog:focus {
	outline: none;
}

.mgr-premium-dialog *,
.mgr-premium-dialog *::before,
.mgr-premium-dialog *::after {
	box-sizing: border-box;
}

.mgr-premium-dialog button {
	font-family: inherit;
	cursor: pointer;
}

.mgr-premium-dialog svg {
	flex: none;
	width: 20px;
	height: 20px;
	fill: none;
	stroke: currentColor;
	stroke-width: 2;
	stroke-linecap: round;
	stroke-linejoin: round;
}

.mgr-premium-close {
	position: absolute;
	top: 20px;
	inset-inline-end: 20px;
	z-index: 1;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	border: 0;
	border-radius: 50%;
	background-color: var(--premium-close);
	color: var(--premium-heading);
}

.mgr-premium-headline {
	margin: 22px 0 14px;
	color: var(--premium-heading);
	font-size: 42px;
	font-weight: bold;
	line-height: 1.1;
	letter-spacing: -.02em;
}


/* the upgrade offer: what Premium gets you, and the plans */

.mgr-premium-upsell {
	width: 1080px;
}

.mgr-premium-offer {
	flex: 1 1 58%;
	padding: 48px 52px 36px;
}

.mgr-premium-badge {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 7px 14px;
	border: 1px solid var(--premium-accent-border);
	border-radius: 999px;
	background-color: var(--premium-accent-soft);
	color: var(--premium-accent);
	font-size: 13px;
	font-weight: bold;
	letter-spacing: .06em;
	text-transform: uppercase;
}

.mgr-premium-badge svg {
	width: 16px;
	height: 16px;
}

.mgr-premium-intro {
	margin: 0 0 28px;
	font-size: 17px;
	line-height: 1.6;
}

.mgr-premium-cards {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 14px;
}

.mgr-premium-card {
	padding: 20px 22px;
	border: 1px solid var(--premium-card-border);
	border-radius: 14px;
	background-color: var(--premium-card);
}

.mgr-premium-card-wide {
	grid-column: 1 / -1;
	display: grid;
	grid-template-columns: 40px 1fr;
	column-gap: 16px;
}

.mgr-premium-icon-tile {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	border-radius: 10px;
	background-color: var(--premium-accent-soft);
	color: var(--premium-accent);
}

.mgr-premium-card-title {
	display: flex;
	align-items: center;
	gap: 10px;
	color: var(--premium-heading);
	font-size: 17px;
	font-weight: bold;
	line-height: 1.3;
}

.mgr-premium-card-title svg {
	color: var(--premium-accent);
}

.mgr-premium-card-text {
	margin-top: 6px;
	font-size: 14px;
	line-height: 1.5;
}

.mgr-premium-chip {
	display: inline-block;
	margin-top: 14px;
	padding: 5px 12px;
	border-radius: 999px;
	background-color: var(--premium-track);
	color: var(--premium-muted);
	font-size: 12px;
	line-height: 1.4;
}

/* each membership's room: name, a bar, how much */
.mgr-premium-rows {
	grid-column: 1 / -1;
	display: grid;
	grid-template-columns: auto 1fr auto;
	gap: 10px 16px;
	align-items: center;
	margin-top: 16px;
	font-size: 13px;
}

.mgr-premium-row-label {
	color: var(--premium-muted);
}

.mgr-premium-row-value {
	text-align: end;
	white-space: nowrap;
}

.mgr-premium-rows .mgr-premium-strong {
	color: var(--premium-heading);
	font-weight: bold;
}

.mgr-premium-bar {
	height: 6px;
	overflow: hidden;
	border-radius: 3px;
	background-color: var(--premium-track);
}

.mgr-premium-bar > div {
	height: 100%;
	border-radius: 3px;
	background-color: var(--premium-muted);
}

.mgr-premium-bar.mgr-premium-strong > div {
	background-color: var(--premium-accent);
}

.mgr-premium-more {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 10px;
	margin-top: 22px;
	font-size: 15px;
}

.mgr-premium-more > svg {
	color: var(--premium-accent);
}

.mgr-premium-see-all {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	color: var(--premium-accent);
	font-weight: bold;
	text-decoration: none;
}

.mgr-premium-see-all:hover {
	text-decoration: underline;
}

.mgr-premium-see-all svg {
	width: 16px;
	height: 16px;
}

.mgr-premium-plans {
	flex: 1 1 42%;
	display: flex;
	flex-direction: column;
	padding: 40px 44px 32px;
	background-color: #0b5fd6;
	color: #fff;
}

.mgr-premium-upsell .mgr-premium-close {
	background-color: rgba(255, 255, 255, .16);
	color: #fff;
}

.mgr-premium-eq {
	display: flex;
	align-items: flex-end;
	justify-content: center;
	gap: 9px;
	height: 110px;
	margin: 24px 0 28px;
}

.mgr-premium-eq span {
	width: 7px;
	border-radius: 4px;
	background-color: #8db9ff;
}

.mgr-premium-eq span.mgr-premium-eq-peak {
	background-color: #f5c242;
}

.mgr-premium-plans-title {
	color: #fff;
	font-size: 26px;
	font-weight: bold;
}

.mgr-premium-plans-sub {
	margin: 6px 0 18px;
	color: #dbe8ff;
	font-size: 15px;
}

.mgr-premium-plans-sub.mgr-premium-trial {
	color: #ffd666;
	font-weight: bold;
}

.mgr-premium-frequency {
	display: flex;
	margin-bottom: 18px;
	padding: 4px;
	border-radius: 999px;
	background-color: rgba(0, 0, 0, .18);
}

.mgr-premium-frequency button {
	flex: 1;
	padding: 8px;
	border: 0;
	border-radius: 999px;
	background: none;
	color: #dbe8ff;
	font-size: 14px;
	font-weight: bold;
}

.mgr-premium-frequency button.mgr-selected {
	background-color: #fff;
	color: #0b5fd6;
}

.mgr-premium-plan {
	position: relative;
	display: grid;
	grid-template-columns: 22px 1fr auto;
	gap: 14px;
	align-items: center;
	width: 100%;
	margin-bottom: 14px;
	padding: 18px 20px;
	border: 1.5px solid rgba(255, 255, 255, .4);
	border-radius: 14px;
	background: none;
	color: #fff;
	text-align: start;
}

.mgr-premium-plan.mgr-selected {
	border-color: #fff;
	background-color: #fff;
	color: #0f1b2e;
}

.mgr-premium-radio {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 22px;
	height: 22px;
	border: 2px solid currentColor;
	border-radius: 50%;
}

.mgr-premium-plan.mgr-selected .mgr-premium-radio {
	border-color: #0b5fd6;
}

.mgr-premium-plan.mgr-selected .mgr-premium-radio::after {
	content: "";
	width: 10px;
	height: 10px;
	border-radius: 50%;
	background-color: #0b5fd6;
}

.mgr-premium-plan-name {
	font-size: 17px;
	font-weight: bold;
}

.mgr-premium-plan-detail {
	margin-top: 2px;
	font-size: 13px;
	line-height: 1.4;
	opacity: .85;
}

.mgr-premium-plan-price {
	font-size: 24px;
	font-weight: bold;
	text-align: end;
	white-space: nowrap;
}

.mgr-premium-plan-price small {
	display: block;
	font-size: 12px;
	font-weight: normal;
	opacity: .8;
}

.mgr-premium-plan-badge {
	position: absolute;
	top: -10px;
	inset-inline-end: 18px;
	padding: 3px 10px;
	border-radius: 6px;
	background-color: #f5c242;
	color: #3a2a00;
	font-size: 11px;
	font-weight: bold;
	letter-spacing: .06em;
	text-transform: uppercase;
}

.mgr-premium-cta {
	margin-top: auto;
	padding-top: 20px;
}

.mgr-premium-go {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	width: 100%;
	padding: 16px;
	border: 0;
	border-radius: 14px;
	background-color: #fff;
	color: #0b3f8f;
	font-size: 17px;
	font-weight: bold;
}

.mgr-premium-later {
	display: block;
	margin: 14px auto 0;
	border: 0;
	background: none;
	color: #fff;
	font-size: 15px;
}


/* out of streaming or storage */

.mgr-premium-limit {
	display: block;
	width: 640px;
	padding: 40px 40px 28px;
}

.mgr-premium-limit .mgr-premium-icon-tile {
	width: 60px;
	height: 60px;
	border-radius: 14px;
}

.mgr-premium-limit .mgr-premium-icon-tile svg {
	width: 28px;
	height: 28px;
}

.mgr-premium-limit .mgr-premium-headline {
	margin: 24px 0 12px;
	font-size: 28px;
	line-height: 1.2;
}

.mgr-premium-limit-text {
	font-size: 16px;
	line-height: 1.6;
}

.mgr-premium-limit-note {
	margin-top: 10px;
	color: var(--premium-muted);
	font-size: 14px;
}

.mgr-premium-meter {
	margin: 24px 0 26px;
}

.mgr-premium-meter-head {
	display: flex;
	justify-content: space-between;
	gap: 16px;
	margin-bottom: 8px;
	color: var(--premium-muted);
	font-size: 13px;
}

.mgr-premium-meter-head b {
	color: var(--premium-warning);
}

.mgr-premium-meter-bar {
	height: 8px;
	overflow: hidden;
	border-radius: 4px;
	background-color: var(--premium-track);
}

.mgr-premium-meter-bar > div {
	height: 100%;
	border-radius: 4px;
	background-color: #f5c242;
}

.mgr-premium-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 14px;
}

.mgr-premium-actions button {
	flex: 1 1 200px;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	padding: 16px 18px;
	border: 0;
	border-radius: 12px;
	font-size: 16px;
	font-weight: bold;
}

.mgr-premium-actions .mgr-premium-secondary {
	flex: 1 1 auto;
	padding-inline: 32px;
	background-color: var(--premium-secondary-button);
	color: var(--premium-secondary-text);
}

.mgr-premium-actions .mgr-premium-primary {
	flex: 3 1 auto;
	background-color: #0b63d6;
	color: #fff;
}

.mgr-premium-footnote {
	min-height: 18px;
	margin-top: 14px;
	color: var(--premium-muted);
	font-size: 13px;
	text-align: end;
}


/* hover and focus */

.mgr-premium-dialog button:hover {
	filter: brightness(1.08);
}

.mgr-premium-dialog button:focus-visible {
	outline: 2px solid #ffd666;
	outline-offset: 2px;
}


/* narrow screens: the offer above the plans */

@media (max-width: 820px) {

	.mgr-premium-upsell {
		flex-direction: column;
	}

	.mgr-premium-offer,
	.mgr-premium-plans {
		padding: 32px 24px 24px;
	}

	.mgr-premium-headline {
		font-size: 32px;
	}

	.mgr-premium-eq {
		display: none;
	}

	/* over the offer now, not the blue */
	.mgr-premium-upsell .mgr-premium-close {
		background-color: var(--premium-close);
		color: var(--premium-heading);
	}

	.mgr-premium-limit {
		padding: 32px 22px 22px;
	}
}

@media (max-width: 520px) {

	.mgr-premium-cards {
		grid-template-columns: 1fr;
	}

	.mgr-premium-offer {
		padding-top: 72px;
	}
}
