/**
 * AUTX global RTL / LTR layout — sitewide (not home-only).
 * Avoids Elementor column collapse by using logical alignment, not blanket row-reverse.
 */

html[dir="rtl"] body.autx-site {
  direction: rtl;
}

html[dir="ltr"] body.autx-site {
  direction: ltr;
}

/* Text alignment */
html[dir="rtl"] body.autx-site,
html[dir="rtl"] body.autx-site .topbar,
html[dir="rtl"] body.autx-site .top-contact,
html[dir="rtl"] body.autx-site .menu-title,
html[dir="rtl"] body.autx-site .banner-title,
html[dir="rtl"] body.autx-site .banner-description,
html[dir="rtl"] body.autx-site .content-banner,
html[dir="rtl"] body.autx-site .widget-title,
html[dir="rtl"] body.autx-site .entry-title,
html[dir="rtl"] body.autx-site .woocommerce ul.products li.product .woocommerce-loop-product__title,
html[dir="rtl"] body.autx-site .elementor-heading-title,
html[dir="rtl"] body.autx-site .elementor-widget-text-editor {
  text-align: right;
}

html[dir="ltr"] body.autx-site .banner-description,
html[dir="ltr"] body.autx-site .banner-title,
html[dir="ltr"] body.autx-site .content-banner {
  text-align: left;
}

/* Header / nav */
html[dir="rtl"] body.autx-site .tbay-mainmenu .caret,
html[dir="rtl"] body.autx-site .navbar-nav .caret,
html[dir="rtl"] body.autx-site .menu .caret {
  margin-left: 0;
  margin-right: 0.35em;
}

html[dir="rtl"] body.autx-site .tbay-mainmenu .dropdown-menu,
html[dir="rtl"] body.autx-site .navbar-nav .dropdown-menu {
  text-align: right;
  left: auto !important;
  right: 0 !important;
}

html[dir="rtl"] body.autx-site .tbay-search-form input[type="text"],
html[dir="rtl"] body.autx-site .tbay-search-form input[type="search"] {
  text-align: right;
}

/* Banner overlays — stop absolute LTR pinning that causes overlaps in RTL */
html[dir="rtl"] body.autx-site .tbay-element-banner,
html[dir="ltr"] body.autx-site .tbay-element-banner {
  position: relative;
  overflow: hidden;
}

html[dir="rtl"] body.autx-site .wrapper-content-banner,
html[dir="rtl"] body.autx-site .content-banner {
  left: auto !important;
  right: 0 !important;
  text-align: right !important;
  max-width: 100%;
  box-sizing: border-box;
  padding-inline: 1rem;
}

html[dir="ltr"] body.autx-site .wrapper-content-banner,
html[dir="ltr"] body.autx-site .content-banner {
  right: auto;
  text-align: left;
  max-width: 100%;
  box-sizing: border-box;
}

html[dir="rtl"] body.autx-site .banner-description,
html[dir="ltr"] body.autx-site .banner-description {
  white-space: normal;
  line-height: 1.35;
}

/* Elementor: keep columns sharing space */
html[dir="rtl"] body.autx-site .elementor-section > .elementor-container {
  flex-wrap: wrap;
}

html[dir="rtl"] body.autx-site .elementor-column,
html[dir="rtl"] body.autx-site .elementor-widget-wrap {
  min-width: 0;
}

/*
 * Home hero (Elementor top section 28cad59): mirror column order in RTL
 * so the main carousel sits on the reading-start side without shrinking images.
 */
html[dir="rtl"] body.autx-home .elementor-element-28cad59 > .elementor-container {
  flex-direction: row-reverse !important;
}

html[dir="rtl"] body.autx-home .elementor-element-28cad59 .elementor-column {
  min-width: 0;
}

html[dir="rtl"] body.autx-home .elementor-element-28cad59 .elementor-widget-image-carousel,
html[dir="rtl"] body.autx-home .elementor-element-28cad59 .elementor-widget-image-carousel .swiper,
html[dir="rtl"] body.autx-home .elementor-element-28cad59 .elementor-widget-image-carousel img,
html[dir="rtl"] body.autx-home .elementor-element-28cad59 .tbay-element-banner,
html[dir="rtl"] body.autx-home .elementor-element-28cad59 .tbay-element-banner img {
  width: 100% !important;
  max-width: 100% !important;
}

/* Search bar: put submit control on the inline-start side for RTL */
html[dir="rtl"] body.autx-site .tbay-search-form .input-group,
html[dir="rtl"] body.autx-site form.searchform .input-group,
html[dir="rtl"] body.autx-site .fana-ajax-search .input-group {
  display: flex !important;
  flex-direction: row-reverse !important;
  align-items: stretch;
  width: 100%;
}

html[dir="rtl"] body.autx-site .tbay-search-form .input-group .form-control,
html[dir="rtl"] body.autx-site .tbay-search-form .input-group input[type="text"],
html[dir="rtl"] body.autx-site .tbay-search-form .input-group input[type="search"] {
  text-align: right !important;
  flex: 1 1 auto;
  min-width: 0;
}

html[dir="rtl"] body.autx-site .tbay-search-form .button-search,
html[dir="rtl"] body.autx-site .tbay-search-form .input-group-btn,
html[dir="rtl"] body.autx-site .tbay-search-form .input-group-append {
  flex: 0 0 auto;
}

html[dir="ltr"] body.autx-home .elementor-element-28cad59 > .elementor-container {
  flex-direction: row !important;
}

html[dir="rtl"] body.autx-site .elementor-widget-image,
html[dir="rtl"] body.autx-site .elementor-widget-image-carousel,
html[dir="rtl"] body.autx-site .tbay-element-banner .banner-image,
html[dir="rtl"] body.autx-site .tbay-element-banner img {
  width: 100%;
  max-width: 100%;
}

/* Product cards */
html[dir="rtl"] body.autx-site ul.products li.product,
html[dir="rtl"] body.autx-site .product-block,
html[dir="rtl"] body.autx-site .product-wrapper {
  text-align: right;
}

html[dir="rtl"] body.autx-site ul.products li.product .price,
html[dir="rtl"] body.autx-site .product-block .price,
html[dir="rtl"] body.autx-site [data-autx-inr],
html[dir="rtl"] body.autx-site .autx-plan__price {
  direction: ltr;
  unicode-bidi: isolate;
  display: inline-block;
}

/* Platform CTA overlays */
body.autx-site .tbay-element-banner,
body.autx-site .elementor-widget-image-carousel .swiper-slide {
  position: relative;
}

body.autx-site a.autx-platform-link {
  position: absolute !important;
  inset: 0 !important;
  z-index: 6 !important;
  display: block !important;
  text-indent: -9999px !important;
  overflow: hidden !important;
  background: transparent !important;
  border: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  box-shadow: none !important;
}

body.autx-site .elementor-widget-image-carousel .swiper-slide {
  cursor: pointer;
}

/* Switcher stays self-aligned */
html[dir="rtl"] body.autx-site .autx-switcher,
html[dir="ltr"] body.autx-site .autx-switcher {
  text-align: initial;
}

/* Footer text direction */
html[dir="rtl"] footer#tbay-footer {
  direction: rtl;
  text-align: right;
}

html[dir="ltr"] footer#tbay-footer {
  direction: ltr;
  text-align: left;
}
