/*
 * Drift: Cookie Consent front-end styles: the placeholder shown over blocked videos.
 */

.drift-cookie-consent-video-wrapper {
	position: relative;
	width: 100%;
	overflow: hidden;
	background: #000;
}

.drift-cookie-consent-video-wrapper .drift-cookie-consent-managed-iframe {
	display: none;
	width: 100%;
	height: 100%;
	aspect-ratio: 16 / 9;
	border: 0;
}

.drift-cookie-consent-video-wrapper.drift-cookie-consent-consent-granted .drift-cookie-consent-managed-iframe {
	display: block;
}

.drift-cookie-consent-video-wrapper .drift-cookie-consent-placeholder {
	position: relative;
	width: 100%;
	aspect-ratio: 16 / 9;
}

.drift-cookie-consent-video-wrapper.drift-cookie-consent-consent-granted .drift-cookie-consent-placeholder {
	display: none;
}

/* Inside a theme ratio box (.embed-container, .videoWrapper, FitVids, .wp-has-aspect-ratio):
   the parent already reserves the height, so fill it instead of adding our own 16:9. */
.drift-cookie-consent-video-wrapper--fill {
	position: absolute;
	inset: 0;
	height: 100%;
}

.drift-cookie-consent-video-wrapper--fill .drift-cookie-consent-placeholder,
.drift-cookie-consent-video-wrapper--fill .drift-cookie-consent-managed-iframe {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	aspect-ratio: auto;
}

.drift-cookie-consent-placeholder-image {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.drift-cookie-consent-placeholder-shade {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.55);
}

.drift-cookie-consent-overlay-content {
	position: absolute;
	inset: 0;
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: center;
	text-align: center;
	padding: 1rem;
	gap: 0.75rem;
}

/* !important: theme `p` and `a` rules (colour, borders) otherwise win and make
   the message unreadable on the dark shade. */
.drift-cookie-consent-overlay-text {
	margin: 0;
	color: #fff !important;
	font-size: 1rem;
	line-height: 1.45;
	max-width: 40rem;
}

.drift-cookie-consent-overlay-link {
	display: inline-block;
	padding: 0.625rem 1rem;
	border: 0 !important;
	border-radius: 999px;
	color: #000;
	text-decoration: none;
	font-weight: 600;
	background: #fff;
	transition: background-color 0.2s ease, color 0.2s ease;
}

.drift-cookie-consent-overlay-link:hover,
.drift-cookie-consent-overlay-link:focus {
	color: #fff;
	background: #000;
}
