/**
 * Canvas Protect — front-end styles.
 * <a> — no plugin styles (theme / browser defaults only).
 */

.canvas-protect-wrap {
	display: inline-block;
	line-height: 0;
	font-size: 0;
	vertical-align: baseline;
	padding: 0;
	margin: 0;
	overflow: hidden;
	white-space: nowrap;
}

.canvas-protect-wrap canvas {
	display: inline-block;
	vertical-align: baseline;
	max-width: none;
	border: 0;
	padding: 0;
	margin: 0;
	background: transparent;
}

.canvas-protect-wrap:focus-within {
	outline: 2px solid currentColor;
	outline-offset: 2px;
}

.screen-reader-text {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

@media (prefers-reduced-motion: reduce) {
	.canvas-protect-wrap {
		transition: none;
	}
}

.canvas-protect-email-unit {
	display: inline-flex;
	align-items: center;
	vertical-align: baseline;
	gap: 0.35rem;
	max-width: 100%;
}

.canvas-protect-copy-email {
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	align-self: center;
	width: auto;
	height: 1em;
	min-height: 16px;
	padding: 0;
	margin: 0;
	border: 0;
	background: transparent;
	cursor: pointer;
	line-height: 0;
	color: inherit;
	vertical-align: baseline;
}

.canvas-protect-copy-email__icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	height: 100%;
	line-height: 0;
}

.canvas-protect-copy-email__icon svg {
	display: block;
	height: 100%;
	width: auto;
	fill: currentColor;
}

.canvas-protect-copy-email::after {
	content: attr(data-tooltip);
	position: absolute;
	left: 50%;
	top: 100%;
	transform: translateX(-50%);
	margin-top: 6px;
	padding: 6px 12px;
	background: #101828;
	color: #fff;
	font-size: 12px;
	font-weight: 500;
	line-height: 1.4;
	white-space: nowrap;
	border-radius: 4px;
	pointer-events: none;
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.15s ease, visibility 0.15s ease;
	z-index: 10;
}

.canvas-protect-copy-email.is-copied::after {
	content: attr(data-tooltip-copied);
}

.canvas-protect-copy-email:hover::after,
.canvas-protect-copy-email:focus-visible::after,
.canvas-protect-copy-email.is-copied::after {
	opacity: 1;
	visibility: visible;
}

.canvas-protect-copy-email:focus-visible {
	outline: 2px solid currentColor;
	outline-offset: 2px;
}
