/**
 * Bottom clearance for the fixed Cirrus Sidekick.
 *
 * --pmr-sidekick-height is the measured height of the medium horizontal
 * floating player (100px on phone and desktop). 72px was an unmeasured
 * placeholder and is no longer the default. Palapa Mac Core replaces this
 * value from the pmr_sidekick_height filter.
 *
 * --pmr-sidekick-offset is the gap Cirrus leaves under the player
 * (`bottom: 14px` on #b_PMR.ssiFloatingPlayerEmbed, measured at 1280px and
 * 375px). The player covers height + offset (114px) of the viewport, so that
 * is the clearance. The theme reads it via --pm-player-height.
 */
:root {
	--pmr-sidekick-height: 100px;
	--pmr-sidekick-offset: 14px;
	--pmr-sidekick-clearance: calc(var(--pmr-sidekick-height) + var(--pmr-sidekick-offset));
}

html body {
	padding-bottom: calc(var(--pmr-sidekick-clearance) + env(safe-area-inset-bottom, 0px));
}

/*
 * Once the player mounts, Cirrus adds .ssiFloatingPlayer_bodyFloating to body
 * with `padding-bottom: 80px !important` (embed.css), which is 34px short of
 * the measured footprint. Only a more specific !important can restore it.
 */
html body.ssiFloatingPlayer_bodyFloating {
	padding-bottom: calc(var(--pmr-sidekick-clearance) + env(safe-area-inset-bottom, 0px)) !important;
}

/*
 * "The player isn't loading" message (assets/js/sidekick-status.js) sits
 * where the Sidekick would be and fits inside the same clearance.
 */
.pmr-player-unavailable {
	position: fixed;
	right: 16px;
	bottom: var(--pmr-sidekick-offset);
	left: 16px;
	z-index: 99;
	box-sizing: border-box;
	max-height: var(--pmr-sidekick-height);
	margin: 0 auto;
	max-width: 760px;
	overflow: auto;
	padding: 12px 16px;
	border: 1px solid rgba(8, 44, 69, 0.18);
	border-left: 4px solid #B31717;
	border-radius: 12px;
	background: #FFFFFF;
	color: #17212B;
	font-size: 0.9375rem;
	line-height: 1.4;
	box-shadow: 0 4px 16px rgba(8, 44, 69, 0.12);
}

.pmr-player-unavailable p {
	margin: 0;
}

.pmr-player-unavailable__what {
	color: #082C45;
	font-weight: 700;
}

.pmr-player-unavailable a {
	color: #24317A;
	font-weight: 700;
}
