/* Icon with Rotating Text (widgets/rotating-text-icon.php).
   A square badge; the outline, the text circle and the icon circle are centred in it. The style controls set the
   custom properties; ms-rotating-text-icon.js draws the text circle (viewBox in real pixels). */
.ms-rti {
	position: relative;
	width: var(--rti-size, 220px);
	max-width: 100%;
	aspect-ratio: 1 / 1;
	margin-left: auto;
	margin-right: auto;
	color: var(--rti-text-color, currentColor);
}
.ms-rti__inner {
	position: absolute;
	inset: 0;
	display: block;
	border-radius: 50%;
	background: var(--rti-bg, transparent);
	color: inherit;
	text-decoration: none;
	transition: color 0.3s ease;
	-webkit-tap-highlight-color: transparent;
}
.ms-rti__inner:hover,
.ms-rti__inner:focus-visible {
	color: var(--rti-text-color-hover, currentColor);
	text-decoration: none;
}
.ms-rti__inner:focus { outline: none; }
.ms-rti__inner:focus-visible { outline: 1px solid currentColor; outline-offset: 4px; }

/* Outline. Empty colour = the text colour. */
.ms-rti__ring {
	position: absolute;
	inset: var(--rti-ring-inset, 0px);
	border: var(--rti-ring-width, 1px) var(--rti-ring-style, solid) var(--rti-ring-color, currentColor);
	border-radius: 50%;
	pointer-events: none;
}

/* Text on the circle: centred on the line (dominant-baseline), turning with the whole svg. */
.ms-rti__text {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	overflow: visible;
	pointer-events: none;
}
.ms-rti__text text {
	fill: currentColor;
	dominant-baseline: central;
}
.ms-rti--spin .ms-rti__text {
	animation: ms-rti-spin var(--rti-speed, 30s) linear infinite;
}
.ms-rti--reverse .ms-rti__text { animation-direction: reverse; }
.ms-rti--pause .ms-rti__inner:hover .ms-rti__text,
.ms-rti--pause .ms-rti__inner:focus-visible .ms-rti__text { animation-play-state: paused; }
@keyframes ms-rti-spin {
	to { transform: rotate(360deg); }
}
@media (prefers-reduced-motion: reduce) {
	.ms-rti--spin .ms-rti__text { animation: none; }
}

/* Icon circle. */
.ms-rti__icon {
	position: absolute;
	top: 50%;
	left: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	box-sizing: border-box;
	width: var(--rti-icon-box, 62%);
	aspect-ratio: 1 / 1;
	border-radius: 50%;
	background-color: var(--rti-icon-bg, #111);
	color: var(--rti-icon-color, #fff);
	font-size: var(--rti-icon-size, 30px);
	line-height: 1;
	transform: translate(-50%, -50%) scale(var(--rti-scale, 1));
	transition: transform 0.35s cubic-bezier(0.22, 0.61, 0.36, 1), background-color 0.3s ease, color 0.3s ease;
}
.ms-rti__inner:hover .ms-rti__icon,
.ms-rti__inner:focus-visible .ms-rti__icon {
	--rti-scale: var(--rti-hover-scale, 1.1);
	background-color: var(--rti-icon-bg-hover, var(--rti-icon-bg, #111));
	color: var(--rti-icon-color-hover, var(--rti-icon-color, #fff));
}
/* Font icons, Mauve SVG-mask icons and uploaded / inline SVG icons: a 1em box, centred both ways. */
.ms-rti__icon i,
.ms-rti__icon svg {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 1em;
	height: 1em;
	transform: rotate(var(--rti-icon-rotate, 0deg));
}
.ms-rti__icon svg { fill: currentColor; }
