.gls {
	position: relative;
	display: inline-block;
}

.gls-toggle {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	background: none;
	border: 0;
	color: #fff;
	font: inherit;
	font-size: 15px;
	line-height: 1.2;
	cursor: pointer;
	padding: 6px 4px;
	transition: color .2s, background-color .2s;
}

.gls-toggle:focus-visible {
	outline: 2px solid currentColor;
	outline-offset: 2px;
}

.gls-icon {
	display: inline-flex;
	align-items: center;
}

.gls-icon svg,
.gls-icon i {
	width: 18px;
	height: 18px;
	font-size: 18px;
	fill: none;
}

.gls-menu {
	position: absolute;
	top: 100%;
	left: 50%;
	transform: translateX(-50%);
	margin: 8px 0 0;
	padding: 8px 0;
	list-style: none;
	background: #fff;
	border-radius: 8px;
	box-shadow: 0 6px 20px rgba(0, 0, 0, .15);
	min-width: 110px;
	z-index: 9999;
	opacity: 0;
	visibility: hidden;
	transition: opacity .15s ease, visibility .15s ease;
}

/* invisible bridge so the menu stays open while moving the mouse down */
.gls-menu::before {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	top: -14px;
	height: 14px;
}

.gls-pos-left .gls-menu {
	left: 0;
	transform: none;
}

.gls-pos-right .gls-menu {
	left: auto;
	right: 0;
	transform: none;
}

.gls-menu li {
	margin: 0;
	padding: 0;
	list-style: none;
}

.gls-menu a {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 8px 20px;
	color: #111;
	text-decoration: none;
	font-size: 15px;
	white-space: nowrap;
	transition: background-color .15s, color .15s;
}

.gls-menu a:hover {
	background: #f2f5f8;
}

.gls-flag {
	width: 16px;
	height: auto;
}

.gls[data-trigger="hover"]:hover .gls-menu,
.gls.open .gls-menu {
	opacity: 1;
	visibility: visible;
}
