/* Wrapper switcher */
.tei-lang-switcher{
  display:flex;
  align-items:center;
  line-height:1;
}

/* link item */
.tei-lang-switcher .tei-lang-item{
  display:inline-flex;
  box-sizing:border-box;
  justify-content:center;
  align-items:center;
  gap:6px;
  text-decoration:none;
}

/* active */
.tei-lang-switcher .tei-lang-item.is-active{
  opacity:1;
}

/* symbol wrap */
.tei-lang-switcher .tei-lang-symbol{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  line-height:1;
}

/* svg img */
.tei-lang-switcher .tei-flag-img{
  display:block;
  object-fit:cover;
}

/* emoji */
.tei-lang-switcher .tei-flag-emoji{
  display:inline-flex;
  align-items:center;
  line-height:1;
}

/* label */
.tei-lang-switcher .tei-lang-label{
  display:inline-flex;
  align-items:center;
  line-height:1;
  white-space:nowrap;
}

/* MODE LOGIC: show/hide */
.tei-mode-flags_only .tei-lang-label{ display:none !important; }
.tei-mode-text_only  .tei-lang-symbol{ display:none !important; }
.tei-mode-code_only  .tei-lang-symbol{ display:none !important; }
/* both: show both */
.tei-mode-both .tei-lang-symbol,
.tei-mode-both .tei-lang-label{ display:inline-flex !important; }
/* flags_code: show both */
.tei-mode-flags_code .tei-lang-symbol,
.tei-mode-flags_code .tei-lang-label{ display:inline-flex !important; }

.tei-flag-img-svg{max-width:none;}


/* TEI translated text editor: keep outer spacing closer to editor preview */
.tei-tr-wrap[data-tei-type="text-editor"] .elementor-widget-container > :first-child{margin-top:0;}
.tei-tr-wrap[data-tei-type="text-editor"] .elementor-widget-container > :last-child{margin-bottom:0;}
