/* GH Multilingual Translate - frontend styles */

#gh-lang-widget {
	position: fixed;
	right: 20px;
	bottom: 20px;
	z-index: 999999;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
		"Helvetica Neue", Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
	line-height: 1.4;
}

#gh-lang-widget.gh-floating-off .gh-globe-btn {
	display: none;
}

#gh-lang-widget.gh-floating-off .gh-panel {
	bottom: 20px;
}

/* Invisible hover bridge: covers the gap between the globe button and the
   panel so the pointer never "leaves" the widget while moving between them.
   (panel sits at bottom:66px, button is 54px tall -> 12px gap) */
#gh-lang-widget:not(.gh-floating-off)::after {
	content: '';
	position: absolute;
	right: 0;
	bottom: 54px;
	width: 54px;
	height: 12px;
}

.gh-globe-btn {
	width: 54px;
	height: 54px;
	border: none;
	border-radius: 50%;
	background: linear-gradient(135deg, #2f6fed 0%, #1e9ff2 100%);
	box-shadow: 0 6px 18px rgba(30, 111, 237, 0.42);
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	transition: transform 0.2s ease, box-shadow 0.2s ease;
	padding: 0;
}

.gh-globe-btn:hover,
.gh-globe-btn:focus-visible {
	transform: scale(1.08);
	box-shadow: 0 8px 24px rgba(30, 111, 237, 0.55);
	outline: none;
}

.gh-globe-btn .gh-globe-flag {
	font-size: 26px;
	line-height: 1;
}

.gh-panel {
	position: absolute;
	right: 0;
	bottom: 66px;
	background: #ffffff;
	border: 1px solid #e8ecf2;
	border-radius: 14px;
	box-shadow: 0 12px 36px rgba(15, 35, 70, 0.16);
	padding: 8px;
	min-width: 200px;
	max-height: 62vh;
	overflow-y: auto;
	opacity: 0;
	transform: translateY(10px) scale(0.98);
	pointer-events: none;
	transition: opacity 0.18s ease, transform 0.18s ease;
}

.gh-panel.open {
	opacity: 1;
	transform: none;
	pointer-events: auto;
}

.gh-panel-title {
	font-size: 12px;
	color: #8a94a6;
	padding: 6px 12px 6px;
	letter-spacing: 0.02em;
}

.gh-lang-row {
	display: flex;
	align-items: center;
	gap: 10px;
	width: 100%;
	padding: 9px 12px;
	border: none;
	background: none;
	border-radius: 9px;
	cursor: pointer;
	font-size: 14px;
	color: #232a35;
	text-align: left;
	transition: background 0.12s ease;
}

.gh-lang-row:hover,
.gh-lang-row:focus-visible {
	background: #f0f5ff;
	outline: none;
}

.gh-lang-row.active {
	background: #e8f1ff;
	color: #1e6fed;
	font-weight: 600;
}

.gh-lang-flag {
	font-size: 20px;
	line-height: 1;
	flex: 0 0 auto;
}

.gh-lang-name {
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.gh-divider {
	height: 1px;
	background: #eef1f6;
	margin: 6px 6px;
}

/* Toast */

#gh-toast.gh-toast {
	position: fixed;
	left: 50%;
	bottom: 34px;
	transform: translateX(-50%);
	background: rgba(18, 28, 48, 0.92);
	color: #ffffff;
	padding: 10px 20px;
	border-radius: 999px;
	font-size: 14px;
	z-index: 999999;
	display: flex;
	align-items: center;
	gap: 9px;
	max-width: 86vw;
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}

.gh-spinner {
	width: 14px;
	height: 14px;
	border: 2px solid rgba(255, 255, 255, 0.35);
	border-top-color: #ffffff;
	border-radius: 50%;
	animation: gh-spin 0.8s linear infinite;
	flex: 0 0 auto;
}

@keyframes gh-spin {
	to {
		transform: rotate(360deg);
	}
}

/* Menu trigger (styled minimally so themes stay in charge) */

.gh-menu-lang-item a#gh-menu-lang-btn {
	cursor: pointer;
}

@media (max-width: 600px) {
	#gh-lang-widget {
		right: 14px;
		bottom: 14px;
	}

	.gh-globe-btn {
		width: 48px;
		height: 48px;
	}

	.gh-globe-btn .gh-globe-flag {
		font-size: 23px;
	}

	.gh-panel {
		bottom: 58px;
		min-width: 176px;
	}

	/* mobile: button is 48px tall, panel at 58px -> 10px gap */
	#gh-lang-widget:not(.gh-floating-off)::after {
		bottom: 48px;
		width: 48px;
		height: 10px;
	}
}
