@import 'mediawiki.skin.variables.less';

@size-mw-search-spinner: 12px;

.client-js {
	.mw-search-form-wrapper {
		min-height: 122.6px;
	}

	/* stylelint-disable-next-line selector-max-id */
	#mw-content-text {
		position: relative;
	}

	.mw-search-spinner {
		position: absolute;
		left: 25em;
		top: 7em;
		margin-left: (-3 * @size-mw-search-spinner / 2);
		white-space: nowrap;
		animation: mw-search-fadein 1500ms cubic-bezier( 1, -0.5, 1, 1 );

		&::before,
		&::after,
		& .mw-search-spinner-bounce {
			content: '';
			background-color: #72777d;
			display: block;
			float: left;
			width: @size-mw-search-spinner;
			height: @size-mw-search-spinner;
			border-radius: @border-radius-circle;
			animation: mw-search-bounceDelay 1600ms ease-in-out -160ms infinite both;
		}

		&::before {
			margin-right: 4px;
			animation-delay: -330ms;
		}

		&::after {
			margin-left: 4px;
			animation-delay: 0s;
		}
	}

	/* stylelint-disable-next-line selector-max-id */
	#mw-searchoptions,
	.mw-search-profile-tabs {
		display: none;
	}

	@keyframes mw-search-bounceDelay {
		0%,
		50%,
		100% {
			transform: scale( 0.625 );
		}

		20% { // equals 320ms
			opacity: 0.87;
			transform: scale( 1 );
		}
	}

	@keyframes mw-search-fadein {
		from {
			opacity: 0;
		}

		to {
			opacity: 1;
		}
	}
}
