
/* lang-switcher.css — segmented language switcher (clean layout) */

/* Base look */
.lang-switcher.segmented {
  --seg-bg: #fff;
  --seg-br: 12px;
  --seg-border: 1px solid rgba(0,0,0,.12);
  --seg-shadow: 0 1px 2px rgba(0,0,0,.06);
  --seg-gap: 2px;
  --seg-pad: 4px;
  --seg-font: clamp(0.9rem, 2.2vw, 1rem);
  --seg-height: 42px; /* comfortable by default */
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--seg-gap);
  background: var(--seg-bg);
  border: var(--seg-border);
  border-radius: var(--seg-br);
  padding: var(--seg-pad);
  box-shadow: var(--seg-shadow);
  width: min(280px, 90vw);
  user-select: none;
  -webkit-user-select: none;
}

.lang-switcher.segmented a {
  position: relative;
  display: grid;
  place-items: center;
  height: var(--seg-height);
  border-radius: calc(var(--seg-br) - var(--seg-pad));
  text-decoration: none;
  font-weight: 600;
  font-size: var(--seg-font);
  color: #0f172a;
  z-index: 1;
}

/* slider */
.lang-switcher.segmented::before {
  content: "";
  position: absolute;
  inset: var(--seg-pad);
  width: calc((100% - (var(--seg-gap) * 2) - var(--seg-pad)*2) / 3);
  height: calc(100% - var(--seg-pad)*2);
  border-radius: calc(var(--seg-br) - var(--seg-pad));
  background: rgba(15,23,42,.06);
  transition: transform 220ms ease;
  z-index: 0;
}
.lang-switcher.segmented[data-active="de"]::before { transform: translateX(0%); }
.lang-switcher.segmented[data-active="en"]::before { transform: translateX(100%); }
.lang-switcher.segmented[data-active="fr"]::before { transform: translateX(200%); }
.lang-switcher.segmented a[aria-selected="true"] { color: #0b61d8; }
.lang-switcher.segmented a:focus-visible { outline: 2px solid #0b61d8; outline-offset: 2px; }

/* Placement defaults: NOT fixed anywhere by default */
.lang-switcher.segmented { margin: .5rem auto 1rem; }

/* Dark bg support */
@media (prefers-color-scheme: dark) {
  .lang-switcher.segmented {
    --seg-bg: rgba(255,255,255,.06);
    --seg-border: 1px solid rgba(255,255,255,.16);
    --seg-shadow: none;
  }
  .lang-switcher.segmented a { color: #e5e7eb; }
  .lang-switcher.segmented::before { background: rgba(255,255,255,.12); }
  .lang-switcher.segmented a[aria-selected="true"] { color: #93c5fd; }
}

/* Mobile tuning (≤640px) — still comfortable */
@media (max-width: 640px) {
  .lang-switcher.segmented {
    --seg-height: 40px;
    --seg-font: clamp(0.9rem, 3.2vw, 1rem);
    width: min(300px, 92vw);
  }
}

/* VIDEO CV pages only (body.page-vcv): pin bottom-right and make bigger for thumb use */
.page-vcv .lang-switcher.segmented {
  position: fixed;
  bottom: 1rem;
  right: 1rem;
  margin: 0;
  z-index: 30;
}
@media (max-width: 640px) {
  .page-vcv .lang-switcher.segmented {
    --seg-height: 48px;
    --seg-font: clamp(1rem, 4vw, 1.1rem);
    width: min(320px, 94vw);
    bottom: .75rem;
    right: .75rem;
  }
}
\n
/* === Override: make the soft shadow follow the active language === */
.lang-switcher.segmented a{ box-shadow: none !important; transition: background .2s ease, box-shadow .2s ease; }
.lang-switcher.segmented a.active{ box-shadow: 0 8px 24px rgba(0,0,0,.12) !important; }


/* === Hard override for segmented language switcher ===
   Make the gray capsule & shadow follow the .active item
   and remove any first-child default styling. */
.lang-switcher.segmented a {
  background: transparent !important;
  box-shadow: none !important;
  transition: background .2s ease, box-shadow .2s ease, color .2s ease;
}
.lang-switcher.segmented a.active {
  background: #eef0f3 !important; /* light gray like on DE */
  box-shadow: 0 8px 24px rgba(0,0,0,.12) !important;
}
.lang-switcher.segmented a:not(.active) {
  color: #111 !important;
}


/* === Final normalize for segmented language switcher ===
   Clean capsule rendering so the active pill is the ONLY element with a filled bg+shadow. */
.lang-switcher.segmented{
  display: inline-flex !important;
  gap: 12px !important;
  padding: 6px !important;
  background: #fff !important;
  border: 2px solid #ECEFF1 !important;
  border-radius: 16px !important;
  box-shadow: 0 8px 24px rgba(0,0,0,.08) !important;
  overflow: hidden;
}
.lang-switcher.segmented a{
  display:inline-flex !important;
  align-items:center !important;
  justify-content:center !important;
  min-width:72px !important;
  padding: 10px 18px !important;
  border-radius: 12px !important;
  font-weight: 700 !important;
  text-decoration: none !important;
  color: #111 !important;
  background: transparent !important;
  box-shadow: none !important;
  transition: background .2s ease, box-shadow .2s ease, color .2s ease;
}
.lang-switcher.segmented a.active{
  background: #EEF0F3 !important;
  box-shadow: 0 8px 24px rgba(0,0,0,.14) !important;
  color: #0A58CA !important;
}
/* Remove any gradient artifacts that some themes inject */
.lang-switcher.segmented::before,
.lang-switcher.segmented::after{
  content:none !important;
}
