.teb-ls{display:block;position:relative;--teb-ls-item-width:220px}
.teb-ls__button{display:flex;align-items:center;gap:.35rem;background:transparent;border:0;padding:.2rem .6rem;color:#111;cursor:pointer;line-height:1;border-radius:.375rem}
.teb-ls__badge{display:inline-flex;align-items:center;justify-content:center;min-width:1.6rem;height:1.2rem;padding:0 .3rem;border-radius:.32rem;background:#9ca3af;color:#fff;font-weight:600;font-size:.75rem;line-height:1}
.teb-ls__caret{font-size:.8rem;opacity:.85}
.teb-ls__dropdown{background:#fff;color:#111;border-radius:.5rem;box-shadow:0 10px 20px rgba(0,0,0,.12),0 3px 6px rgba(0,0,0,.08);display:none;position:absolute;top:100%;right:0;left:auto;min-width:220px;white-space:nowrap;z-index:1000;padding:.25rem 0}
/* Desktop: csak hover/focus/JS-nyitás esetén */
@media (min-width: 1025px){
.menu-item-teb-ls:hover > .teb-ls__dropdown,
.menu-item-teb-ls:focus-within > .teb-ls__dropdown,
.menu-item-teb-ls.teb-ls--open > .teb-ls__dropdown{display:block}
}
/* Mobil/tablet: saját, egyszerű accordion viselkedés a biztos működéshez */
@media (max-width: 1024px){
  .menu-item-teb-ls{position:static}
  .menu-item-teb-ls > .teb-ls__dropdown{position:static;left:auto;right:auto;min-width:0;width:100%;box-shadow:none;border-radius:0;white-space:normal;display:none;padding:0;margin:0}
  .menu-item-teb-ls.teb-ls--open > .teb-ls__dropdown{display:block}
  .menu-item-teb-ls.menu-item-expanded > .teb-ls__dropdown{display:block}
}

/* Tablet (641–1024px): helyes sor- és szélességkezelés, ne csússzon össze */
@media (min-width: 641px) and (max-width: 1024px){
  .menu-item-teb-ls .teb-ls__link{display:flex;align-items:center;gap:.5rem;padding:.5rem .6rem}
  .menu-item-teb-ls .teb-ls__badge{flex:0 0 auto;min-width:1.7rem;height:1.2rem;font-size:.74rem}
  .menu-item-teb-ls .teb-ls__text{display:flex;flex-direction:row;align-items:baseline;gap:.6rem;flex:1 1 auto;min-width:0}
  .menu-item-teb-ls .teb-ls__english{font-size:.95rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  .menu-item-teb-ls .teb-ls__native{margin-left:auto;font-size:.82rem;opacity:.8;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
}

/* Mobil (≤640px): kompaktabb tipográfia és paddings */
@media (max-width: 640px){
  .menu-item-teb-ls .teb-ls__link{padding:.45rem .55rem}
  .menu-item-teb-ls .teb-ls__badge{min-width:1.5rem;height:1.15rem;font-size:.72rem}
  .menu-item-teb-ls .teb-ls__english{font-size:.92rem}
  .menu-item-teb-ls .teb-ls__native{font-size:.78rem;opacity:.75}
}
.teb-ls__list{list-style:none;margin:0;padding:0;max-height:60vh;overflow:auto}
.teb-ls__list,.teb-ls__item{display:block}
.teb-ls__item{margin:0;padding:0;width:auto}
.teb-ls__link{display:flex;align-items:flex-start;gap:.45rem;padding:.35rem .4rem;border-radius:.5rem;color:#111;text-decoration:none;width:100%}
.teb-ls__link:hover,.teb-ls__link:focus{background:#f3f4f6;color:#111}
.teb-ls__text{display:flex;flex-direction:column}
.teb-ls__english{font-weight:600;font-size:.92rem}
.teb-ls__native{opacity:.8;font-size:.8rem}
.menu-item-teb-ls{display:block;padding:0}

/* Téma által generált második nyíl elrejtése csak a nyelvváltón */
/* Visszaengedjük a téma nyilát (a mi saját caretünk eltávolítva) */

/* a dropdown pozicionálását/nyitását a téma kezeli (sub-menu) – nem írjuk felül */

/* Tablet breakpoint – inline szélesség */
@media (max-width: 1024px){
.teb-ls{--teb-ls-item-width:calc(100vw - 2rem)}
.teb-ls__english{font-size:.95rem}
.teb-ls__native{font-size:.82rem}
/* Biztosítsuk, hogy ne lógjon ki a viewportból */
.menu-item-teb-ls,.teb-ls--mobile-inline{max-width:100vw}
.teb-ls--mobile-inline .teb-ls__dropdown{width:100%}
}

/* Mobile breakpoint */
@media (max-width: 640px){
.teb-ls{--teb-ls-item-width:calc(100vw - 2rem)}
.teb-ls__list{max-height:70vh;-webkit-overflow-scrolling:touch}
.teb-ls__link{padding:.55rem .6rem;align-items:center;display:flex !important;flex-direction:row}
.teb-ls__english{font-size:1rem}
.teb-ls__native{font-size:.85rem}
.teb-ls__badge{min-width:1.7rem;height:1.25rem;margin-right:.5rem;flex:0 0 auto}
/* Nyelv kód + angol név egy sorban, natív név jobbra */
.teb-ls__text{display:flex;flex-direction:row;align-items:baseline;gap:.6rem;width:100%;min-width:0}
.teb-ls__english{white-space:nowrap}
.teb-ls__native{margin-left:auto;opacity:.75;white-space:nowrap}
}

/* Overlay és scroll-lock mobilon */
.teb-ls__overlay{position:fixed;inset:0;background:rgba(0,0,0,.2);opacity:0;transition:opacity .15s ease;z-index:999}
.teb-ls__overlay--visible{opacity:1}
.teb-ls--scroll-lock{overflow:hidden;touch-action:none}

@media (prefers-reduced-motion: reduce){
.teb-ls__dropdown{transition:none}
.teb-ls__overlay{transition:none}
}

/* Mobil/tablet: teljesen natív WP menü viselkedés – a téma kezeli a .sub-menu-t */
@media (max-width: 1024px){
/* Semmi felülírás – a téma .menu-item-has-children > .sub-menu CSS-jére hagyatkozunk */
}

/* Mobil finomhangolás - a téma alapú sub-menu kezeléshez */
@media (max-width: 640px){
.menu-item-teb-ls .teb-ls__link{padding:.55rem .6rem;align-items:center;display:flex !important;flex-direction:row}
.menu-item-teb-ls .teb-ls__badge{min-width:1.7rem;height:1.25rem;margin-right:.5rem;flex:0 0 auto}
.menu-item-teb-ls .teb-ls__text{display:flex;flex-direction:row;align-items:baseline;gap:.6rem;width:100%;min-width:0}
.menu-item-teb-ls .teb-ls__english{white-space:nowrap;font-size:1rem}
.menu-item-teb-ls .teb-ls__native{margin-left:auto;opacity:.75;white-space:nowrap;font-size:.85rem}
}
