/* Medcare Hero Video */

.medcare-hero-video {
	position: relative;
	display: block;
	width: 100%;
	max-width: 100%;
	box-sizing: border-box;
}

.medcare-hero-video[hidden] {
	display: none !important;
}

.medcare-hero-video__frame {
	position: relative;
	width: 100%;
	aspect-ratio: 16 / 9;
	overflow: hidden;
	border-radius: var(--medcare-hero-video-radius, 0);
	background: #000;
	/* Keeps rounded corners clipping the iframe in Safari. */
	isolation: isolate;
	transform: translateZ(0);
}

.medcare-hero-video--ratio-9-16 .medcare-hero-video__frame { aspect-ratio: 9 / 16; }
.medcare-hero-video--ratio-4-3 .medcare-hero-video__frame { aspect-ratio: 4 / 3; }
.medcare-hero-video--ratio-1-1 .medcare-hero-video__frame { aspect-ratio: 1 / 1; }

.medcare-hero-video__player,
.medcare-hero-video__frame iframe {
	position: absolute;
	top: 0;
	left: 0;
	width: 100% !important;
	height: 100% !important;
	border: 0;
}

/* Transparent layer: a tap on the video is caught by the page (sound on).
   Removed after the first tap so the YouTube controls become reachable. */
.medcare-hero-video__shield {
	position: absolute;
	top: 0;
	right: 0;
	bottom: 0;
	left: 0;
	z-index: 1;
	cursor: pointer;
}

.medcare-hero-video.is-activated .medcare-hero-video__shield {
	display: none;
}

.medcare-hero-video__button {
	position: absolute;
	z-index: 2;
	bottom: 12px;
	right: 12px;
	min-height: 44px;
	max-width: calc(100% - 24px);
	margin: 0;
	padding: 10px 16px;
	border: 0;
	border-radius: 999px;
	background: rgba(0, 0, 0, 0.75);
	color: #fff;
	font: 600 15px/1.2 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
	letter-spacing: normal;
	text-transform: none;
	text-align: center;
	white-space: normal;
	cursor: pointer;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
	-webkit-tap-highlight-color: transparent;
	transition: background-color 0.2s ease;
}

.medcare-hero-video__button[hidden] {
	display: none !important;
}

.medcare-hero-video__button:hover {
	background: rgba(0, 0, 0, 0.9);
}

.medcare-hero-video__button:focus {
	outline: none;
}

.medcare-hero-video__button:focus-visible {
	outline: 3px solid #fff;
	outline-offset: 2px;
	box-shadow: 0 0 0 6px #1e5bb8;
}

.medcare-hero-video--pos-bottom-left .medcare-hero-video__button {
	right: auto;
	left: 12px;
}

.medcare-hero-video--pos-center .medcare-hero-video__button {
	right: auto;
	bottom: auto;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
}

/* Fallback (sound refused): keep the message clear of YouTube's bottom control bar. */
.medcare-hero-video.is-fallback:not(.medcare-hero-video--pos-center) .medcare-hero-video__button {
	bottom: auto;
	top: 12px;
}

@media (prefers-reduced-motion: reduce) {
	.medcare-hero-video__button {
		transition: none;
	}
}
