/* LY LY Translator – responsive v1.4.0 (stays at document top)
 * Centers the EXISTING GTranslate selector at the top of the DOCUMENT,
 * rather than fixing it to the viewport. No DOM movement. GTranslate controls language choices and all dropdown states.
 */
html body.lyly-mt-ready {
  /* Respect any existing body padding, plus one narrow language-selector row. */
  padding-top: calc(var(--lyly-mt-base-padding-top, 0px) + var(--lyly-mt-row-height, 64px)) !important;
}

html body.lyly-mt-ready .lyly-mt-centered {
  position: absolute !important;
  top: var(--lyly-mt-top, 8px) !important;
  left: 50% !important;
  right: auto !important;
  bottom: auto !important;
  transform: translateX(-50%) !important;
  margin: 0 !important;
  padding: 4px !important;
  width: var(--lyly-mt-width, 230px) !important;
  max-width: calc(100vw - 32px) !important;
  min-height: 52px !important;
  box-sizing: border-box !important;
  z-index: 9990 !important;
  border: 1px solid rgba(210, 172, 106, .82) !important;
  border-radius: 12px !important;
  background: rgba(10, 14, 12, .96) !important;
  box-shadow: 0 10px 28px rgba(0, 0, 0, .36) !important;
  backdrop-filter: blur(4px) !important;
}

/* Only style the CLOSED/current language row. Do not touch the list of languages. */
html body.lyly-mt-ready .lyly-mt-centered .gt_switcher,
html body.lyly-mt-ready .lyly-mt-centered .gt_selected {
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
}
html body.lyly-mt-ready .lyly-mt-centered .gt_selected > a,
html body.lyly-mt-ready .lyly-mt-centered .gt-selected .gt-current-lang {
  box-sizing: border-box !important;
  min-height: 44px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 10px !important;
  padding: 8px 14px !important;
  width: 100% !important;
  max-width: 100% !important;
  border: 1px solid rgba(97, 72, 36, .18) !important;
  border-radius: 8px !important;
  background: linear-gradient(180deg, #f1d39b 0%, #d8ad67 100%) !important;
  color: #24180d !important;
  font: 700 15px/1.3 system-ui, -apple-system, 'Segoe UI', sans-serif !important;
  text-decoration: none !important;
  white-space: nowrap !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.35) !important;
}
html body.lyly-mt-ready .lyly-mt-centered .gt_selected > a img,
html body.lyly-mt-ready .lyly-mt-centered .gt-selected .gt-current-lang img {
  max-height: 22px;
  width: auto;
  flex: 0 0 auto;
}
html body.lyly-mt-ready .lyly-mt-centered :is(a, button, select):focus-visible {
  outline: 2px solid #f0d7a8 !important;
  outline-offset: 2px !important;
}

/* Four balanced widths across all devices; no mutation of headers or language list. */
@media (max-width: 359px) {
  html body.lyly-mt-ready .lyly-mt-centered { width: 204px !important; }
  html body.lyly-mt-ready .lyly-mt-centered .gt_selected > a { font-size: 13px !important; }
}
@media (min-width: 360px) and (max-width: 767px) {
  html body.lyly-mt-ready .lyly-mt-centered { width: 224px !important; }
}
@media (min-width: 768px) and (max-width: 1023px) {
  html body.lyly-mt-ready .lyly-mt-centered { width: 244px !important; }
}
@media (min-width: 1024px) {
  html body.lyly-mt-ready .lyly-mt-centered { width: 264px !important; }
  html body.lyly-mt-ready .lyly-mt-centered .gt_selected > a { font-size: 15px !important; }
}


html body.lyly-mt-ready .lyly-mt-centered .gt_selected > a *,
html body.lyly-mt-ready .lyly-mt-centered .gt-selected .gt-current-lang * {
  color: inherit !important;
  fill: currentColor !important;
  stroke: currentColor !important;
}
html body.lyly-mt-ready .lyly-mt-centered .gt_selected,
html body.lyly-mt-ready .lyly-mt-centered .gt-selected {
  background: transparent !important;
}
html body.lyly-mt-ready .lyly-mt-centered .gt_selected > a:hover,
html body.lyly-mt-ready .lyly-mt-centered .gt_selected > a:active,
html body.lyly-mt-ready .lyly-mt-centered .gt-selected .gt-current-lang:hover {
  filter: brightness(1.03) !important;
}

/* v1.3.0: Keep GTranslate's expanded list OUT of the control's layout.
   Do not change display, click handlers, language choices or widget position. */
html body.lyly-mt-ready .lyly-mt-centered .gt_switcher {
  position: relative !important;
  overflow: visible !important;
  height: 46px !important;
  min-height: 46px !important;
}
html body.lyly-mt-ready .lyly-mt-centered .gt_selected {
  position: relative !important;
  z-index: 2 !important;
  overflow: visible !important;
}
html body.lyly-mt-ready .lyly-mt-centered .gt_selected > a {
  justify-content: flex-start !important;
  padding-right: 38px !important;
  position: relative !important;
}
/* A separate, visible arrow. Native GTranslate arrow sprite may be too faint. */
html body.lyly-mt-ready .lyly-mt-centered .gt_selected > a::after {
  content: '▾' !important;
  display: block !important;
  position: absolute !important;
  right: 13px !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  color: #24180d !important;
  font-size: 18px !important;
  font-weight: 700 !important;
  line-height: 1 !important;
  pointer-events: none !important;
}
/* Preserve the GT plugin's own show/hide and selection behavior. */
html body.lyly-mt-ready .lyly-mt-centered .gt_switcher > .gt_option,
html body.lyly-mt-ready .lyly-mt-centered .gt_switcher .gt_option {
  position: absolute !important;
  top: calc(100% + 6px) !important;
  bottom: auto !important;
  left: 0 !important;
  right: auto !important;
  box-sizing: border-box !important;
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  max-height: min(36vh, 230px) !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
  overscroll-behavior: contain !important;
  z-index: 3 !important;
  border: 1px solid #c7a46a !important;
  border-radius: 10px !important;
  background: #f7f3eb !important;
  box-shadow: 0 12px 28px rgba(0,0,0,.42) !important;
}
html body.lyly-mt-ready .lyly-mt-centered .gt_switcher .gt_option a {
  box-sizing: border-box !important;
  min-height: 40px !important;
  padding: 7px 12px !important;
  width: 100% !important;
  background: #f7f3eb !important;
  color: #2b2117 !important;
  font: 500 14px/1.35 system-ui, -apple-system, 'Segoe UI', sans-serif !important;
  text-decoration: none !important;
}
html body.lyly-mt-ready .lyly-mt-centered .gt_switcher .gt_option a:hover,
html body.lyly-mt-ready .lyly-mt-centered .gt_switcher .gt_option a:focus-visible {
  background: #e8d5af !important;
  color: #24180d !important;
}
/* Avoid overriding flag SVG colors: text is dark, actual flag colors untouched. */
html body.lyly-mt-ready .lyly-mt-centered .gt_selected > a span,
html body.lyly-mt-ready .lyly-mt-centered .gt_selected > a font {
  color: #24180d !important;
}
/* GTranslate versions using the newer floating-style controls. */
html body.lyly-mt-ready .lyly-mt-centered.gt_float_switcher .gt_options {
  max-height: min(36vh, 230px) !important;
  overflow-y: auto !important;
  overscroll-behavior: contain !important;
}
@media (max-width: 359px) {
  html body.lyly-mt-ready .lyly-mt-centered .gt_switcher .gt_option {
    max-height: min(32vh, 200px) !important;
  }
}
