/* WP Google Translator - frontend styles */

/* Hide Google Translate's extra chrome */
.goog-te-banner-frame.skiptranslate,
.goog-te-gadget-icon {
	display: none !important;
}

/* Remove the Google logo (shown in the horizontal layout) */
.goog-logo-link,
.goog-te-gadget img,
.goog-te-gadget span > a {
	display: none !important;
}
.goog-te-gadget span {
	font-size: 0 !important; /* hide the trailing "Google Translate" label */
}
body {
	top: 0 !important;
}
.goog-te-gadget {
	font-size: 0 !important; /* hide the extra "Powered by" text */
	color: transparent;
}
.goog-te-gadget .goog-te-combo {
	font-size: 14px;
	margin: 0;
	padding: 6px 8px;
	border: 1px solid #ccc;
	border-radius: 6px;
	background: #fff;
	color: #333;
	cursor: pointer;
	max-width: 220px;
}

/* Generic widget container */
.wpgt-translate-element {
	display: inline-block;
	line-height: normal;
}

/* ---- Custom flag dropdown ---- */
.wpgt-dd {
	position: relative;
	display: inline-block;
	font-size: 14px;
	line-height: 1.2;
}

/* Toggle button (!important so the theme's button styles don't bleed in) */
.wpgt-dd-toggle {
	display: inline-flex !important;
	align-items: center !important;
	gap: 8px !important;
	width: auto !important;
	min-width: 150px !important;
	margin: 0 !important;
	padding: 6px 10px !important;
	border: 1px solid #ccc !important;
	border-radius: 6px !important;
	background: #fff !important;
	color: #333 !important;
	font-size: 14px !important;
	line-height: 1.2 !important;
	cursor: pointer !important;
	box-shadow: none !important;
	text-transform: none !important;
}
.wpgt-dd-toggle:hover {
	border-color: #1a73e8 !important;
}
.wpgt-dd-current {
	display: inline-flex;
	align-items: center;
	gap: 8px;
}
.wpgt-dd-caret {
	margin-left: auto;
	font-size: 11px;
	color: #666;
}

/* Flag icon (SVG set as background via inlined per-flag CSS) */
.wpgt-flag {
	display: inline-block;
	width: 24px;
	height: 18px;
	border-radius: 2px;
	box-shadow: 0 0 1px rgba(0, 0, 0, 0.45);
	background-size: cover;
	background-position: center;
	background-repeat: no-repeat;
	flex: 0 0 auto;
	vertical-align: middle;
	line-height: 1;
}

/* Options list */
.wpgt-dd-list {
	position: absolute;
	left: 0;
	top: calc(100% + 4px);
	z-index: 99999;
	display: none;
	margin: 0 !important;
	padding: 4px !important;
	list-style: none !important;
	min-width: 100%;
	max-height: 280px;
	overflow-y: auto;
	background: #fff;
	border: 1px solid #ddd;
	border-radius: 8px;
	box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}
.wpgt-dd.wpgt-open .wpgt-dd-list {
	display: block;
}
.wpgt-dd-opt {
	display: flex !important;
	align-items: center;
	gap: 8px;
	margin: 0 !important;
	padding: 7px 10px !important;
	border-radius: 6px;
	list-style: none !important;
	white-space: nowrap;
	color: #333;
	cursor: pointer;
}
.wpgt-dd-opt:hover {
	background: #f1f5fb;
}
.wpgt-dd-opt[aria-selected="true"] {
	background: #e8f0fe;
	font-weight: 600;
}
.wpgt-dd-name {
	display: inline-block;
}

/* Hidden persistent widget: keeps the chosen language applied across pages.
   Moved off-screen (not display:none) so the gadget stays functional. */
.wpgt-persist {
	position: absolute !important;
	left: -9999px !important;
	top: 0 !important;
	width: 1px !important;
	height: 1px !important;
	overflow: hidden !important;
}
