/* AutoLang Custom Switcher Styles & Google Whitelabeling */

/* -------------------------------------------------------------------------
   1. Google Translate Whitelabeling (Hiding Branding)
------------------------------------------------------------------------- */

/* Hide the top banner frame - Aggressive */
.goog-te-banner-frame,
iframe.goog-te-banner-frame,
.goog-te-banner-frame.skiptranslate,
.VIpgJd-ZVi9od-ORHb-OEVmcd,
.VIpgJd-ZVi9od-ORHb,
.goog-te-gadget-icon,
.goog-logo-link,
iframe[id^=":"][class*="skiptranslate"] {
	display: none !important;
	visibility: hidden !important;
	height: 0 !important;
	width: 0 !important;
	opacity: 0 !important;
	pointer-events: none !important;
	z-index: -99999 !important;
}

/* Hide the specific container div that Google wraps the iframe in */
div.skiptranslate,
body>div.skiptranslate {
	display: none !important;
	visibility: hidden !important;
	height: 0 !important;
	width: 0 !important;
	opacity: 0 !important;
}

/* Hide internal Google attribution text */
.goog-te-gadget {
	color: transparent !important;
	font-size: 0 !important;
}

.goog-te-gadget img {
	display: none !important;
}

/* Restore body position (Google adds 40px top margin usually) */
body {
	top: 0px !important;
	position: static !important;
	margin-top: 0 !important;
}

/* Hide the standard Google Translate widget container */
#google_translate_element {
	/* display: none !important; */
	/* Do NOT use display none, or JS might fail */
	visibility: hidden !important;
	position: absolute !important;
	top: 0 !important;
	left: 0 !important;
	height: 0 !important;
	width: 0 !important;
	overflow: hidden !important;
}

/* Hide Google tooltips on hover */
.goog-tooltip {
	display: none !important;
}

.goog-tooltip:hover {
	display: none !important;
}

.goog-text-highlight {
	background-color: transparent !important;
	border: none !important;
	box-shadow: none !important;
}

/* Hide "Original Text" popup */
#goog-gt-tt {
	display: none !important;
	visibility: hidden !important;
}

/* -------------------------------------------------------------------------
   2. Custom Switcher Design
------------------------------------------------------------------------- */

.autolang-switcher-wrapper {
	position: fixed;
	bottom: 30px;
	right: 30px;
	z-index: 9999999;
	font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
	display: block !important;
	visibility: visible !important;
}

/* The Main Floating Button */
.autolang-toggle-btn {
	background: #ffffff;
	width: 60px;
	height: 60px;
	border-radius: 50%;
	box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
	position: relative;
	border: 1px solid rgba(0, 0, 0, 0.04);
}

.autolang-toggle-btn:hover {
	transform: translateY(-4px);
	box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
}

/* Icon SVG */
.autolang-toggle-btn svg {
	width: 32px;
	height: 32px;
	fill: #4a90e2;
	transition: transform 0.3s ease;
}

.autolang-toggle-btn.active svg {
	transform: rotate(45deg);
	/* Maybe change icon or rotate */
}

/* The Dropdown List */
.autolang-lang-list {
	position: absolute;
	bottom: 80px;
	right: 0;
	background: white;
	width: 200px;
	border-radius: 12px;
	box-shadow: 0 5px 30px rgba(0, 0, 0, 0.15);
	padding: 10px 0;
	opacity: 0;
	visibility: hidden;
	transform: translateY(20px) scale(0.95);
	transform-origin: bottom right;
	transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
	max-height: 400px;
	overflow-y: auto;
	border: 1px solid rgba(0, 0, 0, 0.04);
	overscroll-behavior: contain;
	/* TECHNICAL FIX: Prevents main page from scrolling when mouse is over this list */
}

.autolang-lang-list.open {
	opacity: 1;
	visibility: visible;
	transform: translateY(0) scale(1);
}

/* List Items */
.autolang-lang-item {
	padding: 10px 20px;
	display: flex;
	align-items: center;
	cursor: pointer;
	font-size: 15px;
	color: #333;
	transition: background 0.2s;
	font-weight: 500;
}

.autolang-lang-item:hover {
	background-color: #f5f7fa;
	color: #4a90e2;
}

.autolang-lang-item img.flag-icon {
	width: 24px;
	height: 24px;
	margin-right: 12px;
	border-radius: 50%;
	object-fit: cover;
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.autolang-lang-item.current-lang {
	background-color: #eff6ff;
	color: #4a90e2;
	pointer-events: none;
}

/* -------------------------------------------------------------------------
   3. Alternative Themes (Dark & Glass)
------------------------------------------------------------------------- */

/* Dark Theme */
.style-dark .autolang-toggle-btn {
	background: #1a1a1a;
	border: 1px solid rgba(255, 255, 255, 0.1);
}

.style-dark .autolang-toggle-btn svg {
	fill: #ffffff;
	stroke: #ffffff !important;
}

.style-dark .autolang-toggle-btn svg path {
	stroke: #ffffff !important;
}

.style-dark .autolang-lang-list {
	background: #1a1a1a;
	border: 1px solid rgba(255, 255, 255, 0.1);
	box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
}

.style-dark .autolang-lang-item {
	color: #eeeeee;
}

.style-dark .autolang-lang-item:hover {
	background: #333333;
	color: #ffffff;
}

.style-dark .autolang-lang-item.current-lang {
	background: #2b3a4a;
	color: #4a90e2;
}

/* Glassmorphism Theme */
.style-glass .autolang-toggle-btn {
	background: rgba(255, 255, 255, 0.2);
	backdrop-filter: blur(10px);
	-webkit-backdrop-filter: blur(10px);
	border: 1px solid rgba(255, 255, 255, 0.3);
}

.style-glass .autolang-toggle-btn svg {
	fill: #333;
}

.style-glass .autolang-lang-list {
	background: rgba(255, 255, 255, 0.15);
	backdrop-filter: blur(15px);
	-webkit-backdrop-filter: blur(15px);
	border: 1px solid rgba(255, 255, 255, 0.2);
	box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.style-glass .autolang-lang-item {
	color: #1a1a1a;
	text-shadow: 0 1px 1px rgba(255, 255, 255, 0.3);
}

.style-glass .autolang-lang-item:hover {
	background: rgba(255, 255, 255, 0.4);
}

.style-glass .autolang-lang-item.current-lang {
	background: rgba(74, 144, 226, 0.2);
	color: #4a90e2;
}

/* Minimalist Theme */
.style-minimal .autolang-toggle-btn {
	background: #f8f9fa;
	border: 1px solid #ddd;
	box-shadow: none;
	width: 50px;
	height: 50px;
}

.style-minimal .autolang-toggle-btn svg {
	width: 24px;
	height: 24px;
	fill: #666;
}

.style-minimal .autolang-lang-list {
	background: #f8f9fa;
	border: 1px solid #ddd;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
	width: 180px;
}

.style-minimal .autolang-lang-item {
	font-size: 14px;
	color: #666;
	padding: 8px 15px;
}

.style-minimal .autolang-lang-item:hover {
	background: #eee;
	color: #333;
}

.style-minimal .autolang-lang-item.current-lang {
	background: #ddd;
	color: #000;
}


/* Scrollbar for list */
.autolang-lang-list::-webkit-scrollbar {
	width: 6px;
}

.autolang-lang-list::-webkit-scrollbar-track {
	background: transparent;
}

.autolang-lang-list::-webkit-scrollbar-thumb {
	background-color: rgba(0, 0, 0, 0.1);
	border-radius: 4px;
}