/* TranslatePress language switcher – same place and size in every language (also Arabic / RTL).
   Loaded on every page by the Ishtarik IPTV Product Page plugin. */

/* no sliding animation */
.trp-language-switcher > div{transition:none!important}

/* the button and the list always have the same width */
.trp-language-switcher .trp-ls-shortcode-current-language,
.trp-language-switcher .trp-ls-shortcode-language{width:120px!important;max-width:120px!important;box-sizing:border-box!important}

/* flag + language name in the same order in every language */
.trp-language-switcher > div > a{direction:ltr;text-align:left;white-space:nowrap}

/* Arabic (right-to-left): open the list from the right, exactly over the button */
html[dir="rtl"] .trp-language-switcher .trp-ls-shortcode-language,
html[dir="rtl"] .trp-language-switcher:hover .trp-ls-shortcode-language,
html[dir="rtl"] .trp-language-switcher:focus .trp-ls-shortcode-language,
html[dir="rtl"] .trp-language-switcher:focus-within .trp-ls-shortcode-language{left:auto!important;right:0!important}

/* keep the list above the header and the page */
.trp-language-switcher:hover .trp-ls-shortcode-language,
.trp-language-switcher:focus .trp-ls-shortcode-language,
.trp-language-switcher:focus-within .trp-ls-shortcode-language{z-index:99999!important}

/* Arabic: the switcher box is exactly as wide as the button (TranslatePress makes it 200px by default) */
html[dir="rtl"] .trp_language_switcher_shortcode,
html[dir="rtl"] .trp_language_switcher_shortcode .trp-language-switcher{width:120px!important;max-width:120px!important}

/* Arabic: the Elementor widget had a -68px side margin that pushed the button onto "Contact us".
   Give the widget the button's width and remove that margin in right-to-left pages only. */
html[dir="rtl"] .elementor-widget:has(.trp_language_switcher_shortcode){width:auto!important;min-width:120px!important;max-width:none!important;flex:0 0 auto!important;--container-widget-width:auto!important}
html[dir="rtl"] .elementor-widget:has(.trp_language_switcher_shortcode) > .elementor-widget-container{margin-left:0!important;margin-right:0!important}

/* the open language list is always above "Sale" badges and the page content */
.trp_language_switcher_shortcode,
.trp_language_switcher_shortcode .trp-language-switcher{position:relative;z-index:99999!important}

/* Only the visible button and list react to the mouse.
   TranslatePress's invisible 200px box used to lie over the cart, so hovering the cart opened the language list. */
.elementor-widget:has(.trp_language_switcher_shortcode),
.elementor-widget:has(.trp_language_switcher_shortcode) > .elementor-widget-container,
.elementor-widget:has(.trp_language_switcher_shortcode) .elementor-shortcode,
.trp_language_switcher_shortcode,
.trp_language_switcher_shortcode .trp-language-switcher{pointer-events:none!important}
.trp_language_switcher_shortcode .trp-language-switcher > div,
.trp_language_switcher_shortcode .trp-language-switcher > div *{pointer-events:auto!important}

/* ===== Header layers (phone and computer), top to bottom:
   1. Cart   2. Menu   3. Language switcher   4. "Sale" badge and image magnifier ===== */
.elementor-widget-woocommerce-menu-cart{position:relative;z-index:100030!important}
.elementor-widget-nav-menu{position:relative;z-index:100020!important}
.elementor-widget:has(.trp_language_switcher_shortcode){position:relative;z-index:100010!important}
.onsale,
.woocommerce-product-gallery__trigger{z-index:5!important}

/* ===== Header layout on computers: logo left, menu in the exact center, language + cart right
   (mirrored automatically in Arabic). Phones and tablets keep their own layout. ===== */
@media (min-width:1025px){
.e-con-inner:has(> .elementor-widget .trp_language_switcher_shortcode){justify-content:space-between!important}
/* logo: left side. Its 76px base = language-to-cart space, so the menu lands in the true center */
.e-con-inner:has(> .elementor-widget .trp_language_switcher_shortcode) > .elementor-widget-image{flex:1 1 76px!important;width:auto!important;max-width:none!important;min-width:0!important;--container-widget-width:auto!important;text-align:start!important}
.e-con-inner:has(> .elementor-widget .trp_language_switcher_shortcode) > .elementor-widget-image .elementor-widget-container{text-align:start!important}
.e-con-inner:has(> .elementor-widget .trp_language_switcher_shortcode) > .elementor-widget-image img{margin:0!important;width:180px!important;max-width:100%!important;height:auto!important}
/* menu: center */
.e-con-inner:has(> .elementor-widget .trp_language_switcher_shortcode) > .elementor-widget-nav-menu{flex:0 0 auto!important;width:auto!important;max-width:none!important;--container-widget-width:auto!important}
.e-con-inner:has(> .elementor-widget .trp_language_switcher_shortcode) > .elementor-widget-nav-menu .elementor-nav-menu--main > .elementor-nav-menu{justify-content:center!important;margin:0 auto!important}
/* language: right side, right next to the cart */
.e-con-inner:has(> .elementor-widget .trp_language_switcher_shortcode) > .elementor-widget-shortcode:has(.trp_language_switcher_shortcode){flex:1 1 0!important;width:auto!important;min-width:120px!important;max-width:none!important;--container-widget-width:auto!important;display:flex!important;justify-content:flex-end!important}
.e-con-inner:has(> .elementor-widget .trp_language_switcher_shortcode) > .elementor-widget-shortcode:has(.trp_language_switcher_shortcode) > .elementor-widget-container{width:auto!important;margin:0!important}
.e-con-inner:has(> .elementor-widget .trp_language_switcher_shortcode) .trp_language_switcher_shortcode,
.e-con-inner:has(> .elementor-widget .trp_language_switcher_shortcode) .trp_language_switcher_shortcode .trp-language-switcher{width:120px!important;max-width:120px!important}
.e-con-inner:has(> .elementor-widget .trp_language_switcher_shortcode) > .elementor-widget-woocommerce-menu-cart{flex:0 0 auto!important}
}
