/* Mloun Translate - language switcher (front end) */

.mt-switch ul {
	display: flex;
	align-items: center;
	gap: 2px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.mt-switch li {
	margin: 0;
	padding: 0;
	list-style: none;
}

.mt-switch li::marker { content: none; }

.mt-switch a {
	display: block;
	padding: 7px 13px;
	border-radius: 999px;
	color: inherit;
	text-decoration: none;
	font-size: 13px;
	font-weight: 500;
	line-height: 1.2;
	white-space: nowrap;
	transition: background-color .15s ease, color .15s ease;
}

.mt-switch a:hover { background: rgba(0, 0, 0, .06); }
.mt-switch li.is-current a { background: #111827; color: #fff; }

/* ---------------------------------------------------------------- floating */

.mt-floating {
	position: fixed;
	z-index: 9998;
	max-width: calc(100vw - 20px);
	box-sizing: border-box;
	padding: 5px;
	background: rgba(255, 255, 255, .95);
	border: 1px solid rgba(0, 0, 0, .08);
	border-radius: 999px;
	box-shadow: 0 8px 30px rgba(0, 0, 0, .12);
	-webkit-backdrop-filter: blur(10px);
	backdrop-filter: blur(10px);
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	line-height: 1;
}

.mt-floating.mt-pos-bottom-right { right: 18px; left: auto;   bottom: 18px; top: auto; }
.mt-floating.mt-pos-bottom-left  { left: 18px;  right: auto;  bottom: 18px; top: auto; }
.mt-floating.mt-pos-top-right    { right: 18px; left: auto;   top: 18px;    bottom: auto; }
.mt-floating.mt-pos-top-left     { left: 18px;  right: auto;  top: 18px;    bottom: auto; }

body.admin-bar .mt-floating.mt-pos-top-right,
body.admin-bar .mt-floating.mt-pos-top-left { top: 50px; }

body.mt-editing .mt-floating.mt-pos-bottom-right,
body.mt-editing .mt-floating.mt-pos-bottom-left { bottom: 62px; }

.mt-floating .mt-switch a {
	padding: 8px 14px;
	font-size: 12.5px;
	color: #1f2937;
}
.mt-floating .mt-switch li.is-current a { background: #111827; color: #fff; }

/* dark-background adaptation (toggled by switcher.js) */
.mt-floating.mt-dark,
.mt-floating.mt-theme-dark {
	background: rgba(17, 24, 39, .94);
	border-color: rgba(255, 255, 255, .14);
	box-shadow: 0 8px 30px rgba(0, 0, 0, .45);
}
.mt-floating.mt-dark .mt-switch-toggle,
.mt-floating.mt-theme-dark .mt-switch-toggle { color: #fff; }
.mt-floating.mt-dark .mt-switch-toggle:hover,
.mt-floating.mt-theme-dark .mt-switch-toggle:hover { background: rgba(255, 255, 255, .12); }
.mt-floating.mt-dark .mt-switch-caret,
.mt-floating.mt-theme-dark .mt-switch-caret { opacity: .85; }
.mt-floating.mt-dark .mt-switch .mt-switch-menu,
.mt-floating.mt-theme-dark .mt-switch .mt-switch-menu {
	background: #111827;
	border-color: rgba(255, 255, 255, .12);
}
.mt-floating.mt-dark .mt-switch .mt-switch-menu a,
.mt-floating.mt-theme-dark .mt-switch .mt-switch-menu a { color: #e5e7eb; }
.mt-floating.mt-dark .mt-switch .mt-switch-menu a:hover,
.mt-floating.mt-theme-dark .mt-switch .mt-switch-menu a:hover { background: #1f2937; }
.mt-floating.mt-dark .mt-switch .mt-switch-menu li.is-current a,
.mt-floating.mt-theme-dark .mt-switch .mt-switch-menu li.is-current a { background: #fff; color: #111827; }

/* ------------------------------------------------------------------- menu */

.menu-item.mt-menu-item > a { white-space: nowrap; }
.menu-item.mt-menu-item.is-current > a { font-weight: 600; }
.mt-menu-caret { margin-left: 2px; font-size: .8em; opacity: .7; }
.menu-item.mt-menu-current > a { display: inline-flex; align-items: center; gap: 3px; }

/* the theme's sub-menu may add bullets — neutralise them */
.menu-item.mt-menu-item ul.sub-menu { list-style: none; margin: 0; padding: 0; }
.menu-item.mt-menu-item ul.sub-menu li.mt-menu-sub { list-style: none; }
.menu-item.mt-menu-item ul.sub-menu li.mt-menu-sub > a { display: block; white-space: nowrap; }

/* ----------------------------------------------------------------- dropdown */

.mt-switch-dropdown { position: relative; }

.mt-switch-toggle {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	width: auto;
	max-width: 100%;
	box-sizing: border-box;
	margin: 0;
	padding: 8px 14px;
	border: 0;
	border-radius: 999px;
	background: transparent;
	color: inherit;
	font: inherit;
	font-size: 12.5px;
	font-weight: 600;
	line-height: 1.2;
	cursor: pointer;
	white-space: nowrap;
	user-select: none;
	-webkit-tap-highlight-color: transparent;
}
.mt-switch-toggle:hover { background: rgba(0, 0, 0, .06); }

.mt-switch-caret { transition: transform .18s ease; opacity: .6; }
.mt-switch-dropdown.is-open .mt-switch-caret { transform: rotate(180deg); }

.mt-switch .mt-switch-menu {
	position: absolute;
	right: 0;
	bottom: calc(100% + 8px);
	display: none;
	min-width: 150px;
	margin: 0;
	padding: 6px;
	list-style: none;
	background: #fff;
	border: 1px solid rgba(0, 0, 0, .07);
	border-radius: 14px;
	box-shadow: 0 14px 40px rgba(0, 0, 0, .16);
	flex-direction: column;
}

.mt-switch.mt-switch-dropdown.is-open .mt-switch-menu { display: block; }

.mt-switch .mt-switch-menu li { margin: 0; }
.mt-switch .mt-switch-menu a {
	display: block;
	padding: 9px 12px;
	border-radius: 9px;
	color: #1f2937;
	font-size: 13px;
	text-decoration: none;
	white-space: nowrap;
}
.mt-switch .mt-switch-menu a:hover { background: #f3f4f6; }
.mt-switch .mt-switch-menu li.is-current a { background: #111827; color: #fff; }

/* dropdown in a top position must open downwards */
.mt-floating.mt-pos-top-left .mt-switch .mt-switch-menu,
.mt-floating.mt-pos-top-right .mt-switch .mt-switch-menu {
	top: calc(100% + 8px);
	bottom: auto;
}

/* the menu must never leave the viewport: align it to the outer edge */
.mt-floating.mt-pos-bottom-left .mt-switch .mt-switch-menu,
.mt-floating.mt-pos-top-left .mt-switch .mt-switch-menu {
	left: 0;
	right: auto;
}

/* ------------------------------------------------------------------- inline */

.mt-switch-inline { display: inline-block; }
.mt-switch-inline ul { gap: 8px; }
.mt-switch-inline a { background: rgba(0, 0, 0, .04); padding: 6px 12px; }
.mt-switch-inline li.is-current a { background: #111827; color: #fff; }

.mt-switch-label {
	display: inline-block;
	margin-right: 8px;
	font-size: 12px;
	opacity: .6;
}

@media (max-width: 600px) {
	.mt-floating.mt-pos-bottom-right,
	.mt-floating.mt-pos-bottom-left { bottom: 10px; }
	.mt-floating.mt-pos-bottom-right { right: 10px; }
	.mt-floating.mt-pos-bottom-left { left: 10px; }
	.mt-floating .mt-switch a,
	.mt-switch-toggle { padding: 7px 11px; font-size: 12px; }
}


/* Flags */
.mt-switch .mt-flag { font-size: 1.15em; line-height: 1; margin-right: 6px; font-family: "Apple Color Emoji","Segoe UI Emoji","Noto Color Emoji",sans-serif; }
.mt-switch .mt-lang-name { white-space: nowrap; }


/* SVG flags */
.mt-switch .mt-flag { display: inline-block; vertical-align: -2px; margin-right: 6px;
	object-fit: cover; box-shadow: 0 0 0 1px rgba(0,0,0,.08); background: #fff; }
.mt-switch .mt-flag-rect { width: 24px; height: 18px; border-radius: 2px; }
.mt-switch .mt-flag-square { width: 18px; height: 18px; border-radius: 2px; }
.mt-switch .mt-flag-circle { width: 18px; height: 18px; border-radius: 50%; }


/* Flag + label alignment */
.mt-switch a, .mt-switch .mt-switch-toggle, .mt-switch .mt-switch-current { line-height: 1; }
.mt-switch .mt-flag { vertical-align: middle; margin-right: 8px; margin-top: -1px; }
.mt-switch .mt-lang-name { vertical-align: middle; }
.mt-switch li a { display: inline-flex; align-items: center; gap: 8px; }
.mt-switch li a .mt-flag { margin-right: 0; }
.mt-switch .mt-switch-toggle { display: inline-flex; align-items: center; gap: 6px; }


/* Menu items: flag + label spacing and vertical centering */
.mt-menu-item, .menu-item .mt-flag, .mt-menu-preview-item { vertical-align: middle; }
.mt-menu-preview { display: flex; align-items: center; gap: 22px; padding: 10px 16px;
	background: #fff; border: 1px solid #e5e7eb; border-radius: 6px; }
.mt-menu-preview-item { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; color: #111827; }
.mt-menu-preview-item .mt-flag { vertical-align: middle; }
.mt-preview-box-nav { padding: 0; background: transparent; border: 0; }


/* RTL-safe spacing for flags inside menus and the floating switcher */
.mt-flag { margin-inline-end: 6px; }
.mt-switch .mt-flag, .mt-menu-item .mt-flag, .menu-item .mt-flag {
	display: inline-block; vertical-align: middle;
}
[dir="rtl"] .mt-flag { margin-inline-end: 0; margin-inline-start: 6px; }


/* Theme: dark / light — applies to floating AND shortcode */
.mt-theme-dark .mt-switch-toggle,
.mt-theme-dark .mt-switch-inline a {
	color: #fff !important;
	background: rgba(255,255,255,.14) !important;
	border: 1px solid rgba(255,255,255,.22) !important;
}
.mt-theme-dark .mt-switch-toggle:hover { background: rgba(255,255,255,.24) !important; }
.mt-theme-dark .mt-switch-menu { background: #1f2937 !important; border-color: #374151 !important; }
.mt-theme-dark .mt-switch-menu a { color: #f3f4f6 !important; }

.mt-theme-light .mt-switch-toggle,
.mt-theme-light .mt-switch-inline a {
	color: #1f2937 !important;
	background: #fff !important;
	border: 1px solid #e5e7eb !important;
	box-shadow: 0 1px 3px rgba(0,0,0,.08) !important;
}
.mt-theme-light .mt-switch-menu { background: #fff !important; border-color: #e5e7eb !important; }
.mt-theme-light .mt-switch-menu a { color: #1f2937 !important; }


/* ---- Dropdown direction + readable hover/current states (all themes) ---- */
/* Direction depends on where the switcher sits */
.mt-switch-dropdown .mt-switch-menu { top: calc(100% + 6px) !important; bottom: auto !important; }
.mt-floating.mt-pos-bottom-left .mt-switch-dropdown .mt-switch-menu,
.mt-floating.mt-pos-bottom-right .mt-switch-dropdown .mt-switch-menu {
	top: auto !important;
	bottom: calc(100% + 6px) !important;
}
.mt-floating.mt-pos-top-left .mt-switch-dropdown .mt-switch-menu,
.mt-floating.mt-pos-top-right .mt-switch-dropdown .mt-switch-menu {
	top: calc(100% + 6px) !important;
	bottom: auto !important;
}

.mt-switch .mt-switch-menu a { color: #1f2937; }
.mt-switch .mt-switch-menu a:hover { background: rgba(14,145,227,.10) !important; color: #0e91e3 !important; }
.mt-switch .mt-switch-menu li.is-current a,
.mt-switch li.is-current a { background: #0e91e3 !important; color: #fff !important; }

.mt-theme-dark .mt-switch-menu { background: #1f2937 !important; border-color: #374151 !important; }
.mt-theme-dark .mt-switch-menu a { color: #f3f4f6 !important; }
.mt-theme-dark .mt-switch-menu a:hover { background: rgba(255,255,255,.16) !important; color: #fff !important; }
.mt-theme-dark .mt-switch-menu li.is-current a { background: #0e91e3 !important; color: #fff !important; }

.mt-theme-light .mt-switch-menu { background: #fff !important; border-color: #e5e7eb !important; }
.mt-theme-light .mt-switch-menu a { color: #1f2937 !important; }
.mt-theme-light .mt-switch-menu a:hover { background: rgba(14,145,227,.10) !important; color: #0e91e3 !important; }
.mt-theme-light .mt-switch-menu li.is-current a { background: #0e91e3 !important; color: #fff !important; }


/* Stacking: the dropdown must sit above theme headers, sliders and sticky bars */
.mt-switch { position: relative; }
.mt-switch-dropdown { z-index: 99990; }
.mt-switch .mt-switch-menu {
	z-index: 99999 !important;
	position: absolute !important;
}
.mt-floating { z-index: 99995 !important; }
.mt-floating .mt-switch-menu { z-index: 100000 !important; }


/* ---- Shortcode looks: pill / plain x dark / light ---- */
.mt-look-dark-pill .mt-switch-toggle,
.mt-look-dark-pill .mt-switch-inline a {
	background: rgba(17,24,39,.85) !important; color: #fff !important;
	border: 0 !important; border-radius: 999px !important; padding: 7px 14px !important;
	box-shadow: 0 4px 14px rgba(0,0,0,.18) !important;
}
.mt-look-light-pill .mt-switch-toggle,
.mt-look-light-pill .mt-switch-inline a {
	background: #fff !important; color: #1f2937 !important;
	border: 1px solid #e5e7eb !important; border-radius: 999px !important; padding: 7px 14px !important;
	box-shadow: 0 4px 14px rgba(0,0,0,.10) !important;
}
.mt-look-dark-plain .mt-switch-toggle,
.mt-look-dark-plain .mt-switch-inline a {
	background: transparent !important; color: #fff !important;
	border: 0 !important; box-shadow: none !important; padding: 4px 0 !important;
}
.mt-look-light-plain .mt-switch-toggle,
.mt-look-light-plain .mt-switch-inline a {
	background: transparent !important; color: #1f2937 !important;
	border: 0 !important; box-shadow: none !important; padding: 4px 0 !important;
}
.mt-look-dark-plain .mt-switch a:hover,
.mt-look-dark-plain .mt-switch a:focus {
	background: transparent !important; color: #fff !important;
	border-color: transparent !important; text-decoration: none !important; box-shadow: none !important;
}
.mt-look-light-plain .mt-switch a:hover,
.mt-look-light-plain .mt-switch a:focus {
	background: transparent !important; color: #1f2937 !important;
	border-color: transparent !important; text-decoration: none !important; box-shadow: none !important;
}
.mt-look-dark-plain .mt-switch-toggle:hover,
.mt-look-light-plain .mt-switch-toggle:hover { background: transparent !important; }


/* Outline variants (no fill, bordered pill) */
.mt-look-dark-border .mt-switch-toggle,
.mt-look-dark-border .mt-switch-inline a {
	background: transparent !important; color: #fff !important;
	border: 1px solid rgba(255,255,255,.6) !important; border-radius: 999px !important;
	padding: 7px 14px !important; box-shadow: none !important;
}
.mt-look-light-border .mt-switch-toggle,
.mt-look-light-border .mt-switch-inline a {
	background: transparent !important; color: #1f2937 !important;
	border: 1px solid #cfd8e3 !important; border-radius: 999px !important;
	padding: 7px 14px !important; box-shadow: none !important;
}
.mt-look-dark-border .mt-switch-inline a:hover { background: rgba(255,255,255,.12) !important; }
.mt-look-light-border .mt-switch-inline a:hover { background: rgba(14,145,227,.10) !important; color:#0e91e3 !important; }


/* "No background" looks: the current language must have no fill either */
.mt-look-dark-plain .mt-switch li.is-current a,
.mt-look-light-plain .mt-switch li.is-current a {
	background: transparent !important;
	border: 0 !important;
	box-shadow: none !important;
	border-radius: 0 !important;
}
.mt-look-dark-plain .mt-switch li.is-current a { color: #fff !important; font-weight: 600 !important; }
.mt-look-light-plain .mt-switch li.is-current a { color: #1f2937 !important; font-weight: 600 !important; }
.mt-look-dark-plain .mt-switch .mt-switch-current,
.mt-look-light-plain .mt-switch .mt-switch-current { background: transparent !important; }


/* --- Strict scoping: floating uses only floating_* ; shortcode only shortcode_* --- */
.mt-floating .mt-switch-toggle { }
.mt-floating .mt-switch-menu { }
.mt-shortcode .mt-switch-toggle { }
.mt-shortcode .mt-switch-menu { }


/* Floating: only the toggle should look like a button — no outer ring */
.mt-floating,
.mt-floating.mt-dark,
.mt-floating.mt-theme-dark,
.mt-floating.mt-theme-light {
	background: transparent !important;
	border: 0 !important;
	box-shadow: none !important;
	padding: 0 !important;
	border-radius: 0 !important;
}
.mt-floating .mt-switch-dropdown { background: transparent !important; border: 0 !important; box-shadow: none !important; padding: 0 !important; }


/* Floating switcher only: solid black pill (shortcode keeps its own look) */
.mt-floating.mt-theme-dark .mt-switch-toggle,
.mt-floating.mt-theme-dark .mt-switch-inline a {
	background: #111827 !important;
	color: #fff !important;
}
.mt-floating.mt-theme-dark .mt-switch-toggle:hover { background: #1f2937 !important; }


/* Dark pill dropdown: fixed dark panel, no hover colour change */
.mt-look-dark-pill .mt-switch-menu {
	background: #1f2937 !important;
	border-color: #374151 !important;
}
.mt-look-dark-pill .mt-switch-menu a,
.mt-look-dark-pill .mt-switch-menu a:hover,
.mt-look-dark-pill .mt-switch-menu a:focus,
.mt-look-dark-pill .mt-switch-menu a:active {
	background: transparent !important;
	color: #f3f4f6 !important;
	text-decoration: none !important;
}
.mt-look-dark-pill .mt-switch-menu li.is-current a {
	background: #0e91e3 !important;
	color: #fff !important;
}


/* Dark pill: parent toggle keeps its dark fill on hover; menu items get feedback */
.mt-look-dark-pill .mt-switch-toggle,
.mt-look-dark-pill .mt-switch-toggle:hover,
.mt-look-dark-pill .mt-switch-toggle:focus,
.mt-look-dark-pill .mt-switch-toggle:active {
	background: #111827 !important;
	color: #fff !important;
	border: 0 !important;
}
.mt-look-dark-pill .mt-switch-menu a { background: transparent !important; color: #f3f4f6 !important; }
.mt-look-dark-pill .mt-switch-menu a:hover,
.mt-look-dark-pill .mt-switch-menu a:focus {
	background: rgba(255,255,255,.12) !important;
	color: #fff !important;
}


/* "No background" looks: dropdown items keep hover feedback */
.mt-look-dark-plain .mt-switch-menu a:hover,
.mt-look-dark-plain .mt-switch-menu a:focus {
	background: rgba(255,255,255,.14) !important;
	color: #fff !important;
}
.mt-look-light-plain .mt-switch-menu a:hover,
.mt-look-light-plain .mt-switch-menu a:focus {
	background: rgba(14,145,227,.10) !important;
	color: #0e91e3 !important;
}
/* the toggle itself stays flat */
.mt-look-dark-plain .mt-switch-toggle:hover,
.mt-look-light-plain .mt-switch-toggle:hover {
	background: transparent !important;
}


/* Menu items preview: breathing room between languages */
.mt-menu-preview { display: flex !important; flex-direction: row !important; align-items: center !important;
	justify-content: flex-start !important; flex-wrap: wrap !important; gap: 34px !important; padding: 14px 20px !important; }
.mt-menu-preview-item { padding: 4px 2px; }
.mt-menu-preview-item + .mt-menu-preview-item { border-left: 0; }
