.active-locales {
	margin: 1em 0;
}

.active-locales-list,
.inactive-locales-list {
	width: 25em;
	margin: 0 1em 1em 0;
	clear: both;
	float: left;
}

.active-locales-controls {
	clear: both;
}

.active-locales-controls ul {
	margin: 0;
}

.active-locales-controls .button {
	margin: 0;
}

@media screen and (min-width: 510px) {

	.active-locales-controls {
		clear: none;
	}
}

.active-locales-list {
	height: 98px;
	overflow-y: scroll;
	margin-top: 0;
	background: #fff;
	box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.07);
	border: 1px solid #ddd;
	color: #32373c;
	box-sizing: border-box;
}

.active-locales-list.empty-list {
	background: rgba(255, 255, 255, 0.5);
	border-color: rgba(222, 222, 222, 0.75);
	box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.04);
	display: flex;
	align-items: center;
}

.active-locales-list li {
	box-sizing: border-box;
	width: 100%;
	height: 28px;
	line-height: 28px;
	margin: 0;
	padding: 0 0 0 8px;
	cursor: pointer;
}

.active-locales-list li:hover {
	background: rgba(0, 0, 0, 0.07);
}

.active-locales-list li[aria-selected="true"] {
	background: rgba(0, 0, 0, 0.15);
}

#active-locales-empty-message {
	display: flex;
	justify-content: center;
	flex-direction: column;
	position: relative;
	text-align: center;
	width: 25em;
	height: 98px;
	margin-bottom: -98px;
	box-sizing: border-box;
	color: rgba(51, 51, 51, 0.5);
}

#active-locales-empty-message.hidden {
	display: none;
}

.inactive-locales {
	clear: both;
}

.inactive-locales select {
	width: 100%;
}

.preferred-languages .notice {
	display: inline-block;
}

/* stylelint-disable selector-id-pattern */
.js label[for="WPLANG"],
.js #WPLANG,
.no-js .preferred-languages,
.no-js #preferred-languages-label,
.no-js .user-preferred-languages-wrap {
	display: none;
}
/* stylelint-enable selector-id-pattern */

/* Tooltips inspired by https://github.com/primer/primer */

@-webkit-keyframes tooltip-appear {

	from {
		opacity: 0;
	}

	to {
		opacity: 1;
	}
}

@keyframes tooltip-appear {

	from {
		opacity: 0;
	}

	to {
		opacity: 1;
	}
}

.tooltipped {
	position: relative;
}

.tooltipped::before {
	position: absolute;
	z-index: 1000001;
	display: none;
	width: 0;
	height: 0;
	color: #191e23;
	pointer-events: none;
	content: "";
	border: 6px solid transparent;
	opacity: 0;
	top: -7px;
	right: 50%;
	bottom: auto;
	margin-right: -6px;
	border-top-color: #191e23;
}

.tooltipped::after {
	position: absolute;
	z-index: 1000000;
	display: none;
	padding: 0.5em 0.75em;
	font: normal 400 11px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
	-webkit-font-smoothing: subpixel-antialiased;
	color: #fff;
	text-align: center;
	text-decoration: none;
	text-shadow: none;
	text-transform: none;
	letter-spacing: normal;
	word-wrap: break-word;
	white-space: pre;
	pointer-events: none;
	content: attr(data-tooltip);
	background: #191e23;
	border-radius: 3px;
	opacity: 0;
	right: auto;
	left: 50%;
	margin-left: -16px;
	bottom: 100%;
	margin-bottom: 6px;
}

.tooltipped:hover::before,
.tooltipped:active::before,
.tooltipped:focus::before,
.tooltipped:hover::after,
.tooltipped:active::after,
.tooltipped:focus::after {
	opacity: 1;
	display: inline-block;
	text-decoration: none;
	-webkit-animation-name: tooltip-appear;
	        animation-name: tooltip-appear;
	-webkit-animation-duration: 0.1s;
	        animation-duration: 0.1s;
	-webkit-animation-fill-mode: backwards;
	        animation-fill-mode: backwards;
	-webkit-animation-timing-function: ease-in;
	        animation-timing-function: ease-in;
	-webkit-animation-delay: 0.4s;
	        animation-delay: 0.4s;
}

