/* Ghekko Language Switch — design "slide": text only, a coloured block slides to the chosen language.
   Loaded only for this design, after style.css. */
.ghekko-lang--design-slide {
  --g-lang-on-accent: #fff;
  --g-lang-slide-radius: 0;
  --g-lang-slide-speed: .28s;
}
.ghekko-lang .ghekko-lang__slide {
  position: relative;
  display: inline-flex;
  align-items: stretch;
  gap: 2px;
  isolation: isolate;
}
.ghekko-lang__slide--rounded { --g-lang-slide-radius: 6px; }
.ghekko-lang__slide--pill    { --g-lang-slide-radius: 999px; }

.ghekko-lang .ghekko-lang__slide a {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--g-lang-slide-py, 4px) var(--g-lang-slide-px, 10px);
  font-size: var(--g-lang-slide-font, inherit);
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
  border-radius: var(--g-lang-slide-radius);
  transition: color var(--g-lang-slide-speed) ease;
}
.ghekko-lang .ghekko-lang__slide .is-current > a { color: var(--g-lang-on-accent); }

/* The sliding block; the script sets its position and size */
.ghekko-lang__slider {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 0;
  width: 0;
  height: 0;
  background: var(--g-lang-accent);
  border-radius: var(--g-lang-slide-radius);
  opacity: 0;
  pointer-events: none;
}
.ghekko-lang__slide.is-measured .ghekko-lang__slider { opacity: 1; }
.ghekko-lang__slide.is-animated .ghekko-lang__slider {
  transition: transform var(--g-lang-slide-speed) cubic-bezier(.4, 0, .2, 1), width var(--g-lang-slide-speed) cubic-bezier(.4, 0, .2, 1), height var(--g-lang-slide-speed) ease;
}

/* Without the script: the active language gets the block directly */
.ghekko-lang:not(.is-ready) .ghekko-lang__slide .is-active > a { background: var(--g-lang-accent); }

.ghekko-lang .ghekko-lang__slide a:focus-visible { outline: 2px solid var(--g-lang-accent); outline-offset: 2px; }

/* Style "glass": translucent pill track, light pill block, small spaced capitals.
   Track and text follow the template's text colour, so it works on dark and light backgrounds. */
.ghekko-lang .ghekko-lang__slide--style-glass {
  gap: 0;
  padding: 4px;
  background: color-mix(in srgb, currentColor 12%, transparent);
  border: 1px solid color-mix(in srgb, currentColor 28%, transparent);
  border-color: var(--g-lang-border, color-mix(in srgb, currentColor 28%, transparent));
  border-radius: 999px;
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}
.ghekko-lang .ghekko-lang__slide--style-glass a {
  min-width: 3.4em;
  padding: var(--g-lang-slide-py, .55em) var(--g-lang-slide-px, 1.1em);
  font-size: var(--g-lang-slide-font, .8em);
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: color-mix(in srgb, currentColor 72%, transparent);
}
.ghekko-lang .ghekko-lang__slide--style-glass .is-current > a { color: var(--g-lang-glass-on-block, #2b2b2b); }
.ghekko-lang__slide--style-glass .ghekko-lang__slider {
  background: var(--g-lang-glass-block, rgba(255, 255, 255, .94));
  box-shadow: 0 2px 8px rgba(0, 0, 0, .18);
}
.ghekko-lang:not(.is-ready) .ghekko-lang__slide--style-glass .is-active > a { background: var(--g-lang-glass-block, rgba(255, 255, 255, .94)); }

@media (prefers-reduced-motion: reduce) {
  .ghekko-lang__slide.is-animated .ghekko-lang__slider,
  .ghekko-lang .ghekko-lang__slide a { transition: none; }
}
