/* RTL support layer
   Default pages remain LTR. These rules apply only when <html dir="rtl"> is active. */

html[dir="rtl"]{
  direction:rtl;
}

html[dir="rtl"] body{
  direction:rtl;
  text-align:right;
}

/* Keep technical values readable */
html[dir="rtl"] input[type="email"],
html[dir="rtl"] input[type="tel"],
html[dir="rtl"] input[type="url"],
html[dir="rtl"] input[type="number"],
html[dir="rtl"] input[name="email"],
html[dir="rtl"] input[name="phone"],
html[dir="rtl"] code,
html[dir="rtl"] pre{
  direction:ltr;
  text-align:left;
  unicode-bidi:isolate;
}

/* Header and navigation */
html[dir="rtl"] .header-inner,
html[dir="rtl"] .brand,
html[dir="rtl"] .main-nav,
html[dir="rtl"] .header-actions,
html[dir="rtl"] .nav-group-trigger,
html[dir="rtl"] .search-trigger,
html[dir="rtl"] .lang-trigger{
  direction:rtl;
}

html[dir="rtl"] .header-actions{
  margin-left:0;
  margin-right:auto;
}

html[dir="rtl"] .brand small,
html[dir="rtl"] .brand strong,
html[dir="rtl"] .nav-dropdown a{
  text-align:right;
}

html[dir="rtl"] .nav-dropdown a{
  justify-content:flex-start;
}

html[dir="rtl"] .nav-dropdown a.isactive::before,
html[dir="rtl"] .nav-dropdown a[aria-current="page"]::before{
  margin-right:0!important;
  margin-left:8px!important;
}

/* Mobile drawer */
html[dir="rtl"] .mobile-links,
html[dir="rtl"] .mobile-group-head,
html[dir="rtl"] .mobile-subnav,
html[dir="rtl"] .mobile-search-form{
  direction:rtl;
  text-align:right;
}

html[dir="rtl"] .mobile-subnav-toggle::before{
  transform:rotate(135deg);
}

/* Lists and content blocks */
html[dir="rtl"] .hero-points li,
html[dir="rtl"] .check-list li{
  padding-left:0!important;
  padding-right:26px!important;
}

html[dir="rtl"] .hero-points li::before,
html[dir="rtl"] .check-list li::before{
  left:auto!important;
  right:0!important;
}

html[dir="rtl"] .section-head,
html[dir="rtl"] .card-body,
html[dir="rtl"] .info-card,
html[dir="rtl"] .article-card,
html[dir="rtl"] .download-card,
html[dir="rtl"] .product-summary,
html[dir="rtl"] .inquiry-aside,
html[dir="rtl"] .rfq-form,
html[dir="rtl"] .result-list,
html[dir="rtl"] .article-layout,
html[dir="rtl"] .content-card,
html[dir="rtl"] .breadcrumb,
html[dir="rtl"] .hero-copy,
html[dir="rtl"] .cta-card,
html[dir="rtl"] .filter-bar,
html[dir="rtl"] .resource-list,
html[dir="rtl"] .download-row,
html[dir="rtl"] .faq-list,
html[dir="rtl"] .faq-item,
html[dir="rtl"] .faq-q,
html[dir="rtl"] .faq-a,
html[dir="rtl"] .table-wrap,
html[dir="rtl"] table,
html[dir="rtl"] th,
html[dir="rtl"] td,
html[dir="rtl"] caption{
  direction:rtl;
  text-align:right;
}

html[dir="rtl"] .cta-actions,
html[dir="rtl"] .hero-actions{
  direction:rtl;
  justify-content:flex-start;
}

/* Forms */
html[dir="rtl"] .form-grid,
html[dir="rtl"] .minimal-form-grid,
html[dir="rtl"] .form-field,
html[dir="rtl"] .message-field,
html[dir="rtl"] .download-filter,
html[dir="rtl"] .rfq-form fieldset{
  direction:rtl;
  text-align:right;
}

html[dir="rtl"] input,
html[dir="rtl"] textarea,
html[dir="rtl"] select{
  text-align:right;
}

html[dir="rtl"] input[type="email"],
html[dir="rtl"] input[type="tel"],
html[dir="rtl"] input[name="email"],
html[dir="rtl"] input[name="phone"]{
  text-align:left;
}

/* Language dropdown */
html[dir="rtl"] .lang-dialog,
html[dir="rtl"] .lang-panel,
html[dir="rtl"] .lang-head,
html[dir="rtl"] .lang-grid,
html[dir="rtl"] .lang-option{
  direction:rtl!important;
  text-align:right!important;
}

html[dir="rtl"] .lang-panel{
  right:auto!important;
  left:var(--lang-dropdown-left,20px)!important;
  width:min(var(--lang-dropdown-width,360px),calc(100vw - 24px))!important;
}

html[dir="rtl"] .lang-panel::before,
html[dir="rtl"] .lang-panel:before{
  right:auto!important;
  left:56px!important;
}

html[dir="rtl"] .lang-head{
  flex-direction:row!important;
}

html[dir="rtl"] .lang-head > div{
  text-align:right!important;
}

html[dir="rtl"] .lang-close{
  margin-right:auto!important;
  margin-left:0!important;
}

html[dir="rtl"] .lang-option{
  justify-items:start!important;
}

html[dir="rtl"] .lang-option span,
html[dir="rtl"] .lang-option small{
  text-align:right!important;
  justify-self:start!important;
}

html[dir="rtl"] .lang-option[aria-current="page"]{
  padding-left:14px!important;
  padding-right:14px!important;
  box-shadow:inset -4px 0 0 rgba(245,130,32,.72)!important;
}

@media (min-width:900px){
  html[dir="rtl"] .lang-panel{
    width:min(var(--lang-dropdown-width,360px),calc(100vw - 24px))!important;
    max-height:min(72dvh,520px)!important;
    left:var(--lang-dropdown-left,20px)!important;
    right:auto!important;
    margin-top:0!important;
  }

  html[dir="rtl"] .lang-grid{
    grid-template-columns:1fr!important;
    max-height:calc(min(72dvh,520px) - 84px)!important;
    overflow-y:auto!important;
  }

  html[dir="rtl"] .lang-panel::before,
  html[dir="rtl"] .lang-panel:before{
    left:56px!important;
    right:auto!important;
  }
}

@media(max-width:800px){
  html[dir="rtl"] .lang-panel{
    right:auto!important;
    left:var(--lang-dropdown-left,max(12px,env(safe-area-inset-left)))!important;
    width:min(300px,calc(100vw - 20px))!important;
  }

  html[dir="rtl"] .lang-panel::before,
  html[dir="rtl"] .lang-panel:before{
    right:auto!important;
    left:56px!important;
  }
}

/* Search modal */
html[dir="rtl"] .site-search-panel,
html[dir="rtl"] .search-card,
html[dir="rtl"] .search-card-head,
html[dir="rtl"] .site-search-form,
html[dir="rtl"] .quick-search{
  direction:rtl;
  text-align:right;
}

html[dir="rtl"] .search-close{
  margin-left:0;
  margin-right:auto;
}

html[dir="rtl"] .site-search-row{
  direction:rtl;
}

html[dir="rtl"] .site-search-row input{
  text-align:right;
}

html[dir="rtl"] .quick-search{
  justify-content:flex-start;
}

/* Footer */
html[dir="rtl"] .site-footer,
html[dir="rtl"] .site-footer.footer-v56,
html[dir="rtl"] .footer-main,
html[dir="rtl"] .footer-intro,
html[dir="rtl"] .footer-nav-group,
html[dir="rtl"] .footer-contact-group,
html[dir="rtl"] .footer-link-list,
html[dir="rtl"] .footer-bottom{
  direction:rtl;
  text-align:right;
}

html[dir="rtl"] .site-footer.footer-v56 h3{
  text-align:right!important;
  padding-left:0!important;
  padding-right:0!important;
}

html[dir="rtl"] .site-footer.footer-v56 h3::before,
html[dir="rtl"] .site-footer.footer-v56 h3::after{
  left:auto!important;
  right:0!important;
}

html[dir="rtl"] .site-footer.footer-v56 .footer-link-list{
  justify-items:start!important;
  text-align:right!important;
}

html[dir="rtl"] .site-footer.footer-v56 .footer-link-list a{
  direction:rtl!important;
  text-align:right!important;
  justify-content:flex-start!important;
  padding-left:0!important;
  padding-right:0!important;
}

html[dir="rtl"] .site-footer.footer-v56 .footer-link-list a:hover{
  transform:translateX(-2px)!important;
}

html[dir="rtl"] .site-footer.footer-v56 .footer-link-list a::after{
  display:none!important;
  content:none!important;
}

html[dir="rtl"] .site-footer.footer-v56 .footer-contact-list div{
  direction:rtl;
}

html[dir="rtl"] .site-footer.footer-v56 .footer-contact-list dt,
html[dir="rtl"] .site-footer.footer-v56 .footer-contact-list dd{
  text-align:right!important;
}

html[dir="rtl"] .site-footer.footer-v56 .footer-social-icons{
  justify-content:flex-start;
  direction:rtl;
}

@media(max-width:760px){
  html[dir="rtl"] .site-footer.footer-v56 .footer-main > .footer-nav-group{
    text-align:right!important;
  }

  html[dir="rtl"] .site-footer.footer-v56 .footer-link-list{
    align-items:start!important;
    justify-items:start!important;
  }

  html[dir="rtl"] .site-footer.footer-v56 .footer-link-list a{
    position:relative!important;
    display:block!important;
    width:max-content!important;
    max-width:100%!important;
    padding:2px 12px 2px 0!important;
    margin-right:0!important;
    margin-left:auto!important;
    text-align:right!important;
  }

  html[dir="rtl"] .site-footer.footer-v56 .footer-link-list a::before{
    display:block!important;
    content:""!important;
    position:absolute!important;
    left:auto!important;
    right:0!important;
    top:.78em!important;
    width:3px!important;
    height:3px!important;
    border-radius:999px!important;
    background:rgba(255,126,27,.72)!important;
    margin:0!important;
  }
}

/* Contact values, emails and phone numbers */
html[dir="rtl"] .inquiry-contact-card,
html[dir="rtl"] .inquiry-contact-primary,
html[dir="rtl"] .inquiry-primary-item{
  direction:rtl!important;
  text-align:right!important;
  justify-items:stretch!important;
}

html[dir="rtl"] .inquiry-primary-item span,
html[dir="rtl"] .inquiry-primary-item em{
  direction:rtl!important;
  unicode-bidi:isolate!important;
  text-align:right!important;
  justify-self:stretch!important;
  width:100%!important;
}

html[dir="rtl"] .inquiry-primary-item b,
html[dir="rtl"] .inquiry-primary-item a[href^="mailto:"],
html[dir="rtl"] .inquiry-primary-item a[href^="tel:"],
html[dir="rtl"] .footer-contact-text,
html[dir="rtl"] a[href^="mailto:"],
html[dir="rtl"] a[href^="tel:"]{
  direction:ltr!important;
  unicode-bidi:isolate!important;
  display:inline-block!important;
  text-align:right!important;
}

html[dir="rtl"] .inquiry-primary-item b,
html[dir="rtl"] .inquiry-primary-item a[href^="mailto:"],
html[dir="rtl"] .inquiry-primary-item a[href^="tel:"]{
  display:block!important;
  justify-self:stretch!important;
  width:100%!important;
}

html[dir="rtl"] .inquiry-address-card,
html[dir="rtl"] .inquiry-address-card span,
html[dir="rtl"] .inquiry-address-card p{
  direction:rtl!important;
  text-align:right!important;
}

/* WeChat modal: mirror LTR layout, keep phone number readable */
html[dir="rtl"] .footer-wechat-modal{
  direction:rtl!important;
}

html[dir="rtl"] .footer-wechat-panel{
  direction:rtl!important;
  text-align:right!important;
  padding:23px!important;
}

html[dir="rtl"] .footer-wechat-close{
  right:auto!important;
  left:12px!important;
}

html[dir="rtl"] .footer-wechat-kicker,
html[dir="rtl"] .footer-wechat-panel .dialog-title,
html[dir="rtl"] .footer-wechat-note{
  text-align:right!important;
  direction:rtl!important;
}

html[dir="rtl"] .footer-wechat-fields{
  direction:rtl!important;
  text-align:right!important;
}

html[dir="rtl"] .footer-wechat-field{
  direction:ltr!important;
  display:grid!important;
  grid-template-columns:auto minmax(0,1fr) 54px!important;
  grid-template-areas:"copy value label"!important;
  gap:9px!important;
  align-items:center!important;
  padding:10px 11px!important;
  border:1px solid #e7edf4!important;
  border-radius:14px!important;
  background:#f8fafc!important;
}

html[dir="rtl"] .footer-wechat-field span{
  grid-area:label!important;
  justify-self:end!important;
  text-align:right!important;
  direction:rtl!important;
  white-space:nowrap!important;
}

html[dir="rtl"] .footer-wechat-field strong{
  grid-area:value!important;
  justify-self:stretch!important;
  display:block!important;
  width:100%!important;
  direction:ltr!important;
  unicode-bidi:isolate!important;
  text-align:right!important;
  word-break:normal!important;
}

html[dir="rtl"] .footer-copy-btn{
  grid-area:copy!important;
  justify-self:start!important;
  text-align:center!important;
}

@media(max-width:420px){
  html[dir="rtl"] .footer-wechat-panel{
    padding:20px!important;
    border-radius:18px!important;
  }

  html[dir="rtl"] .footer-wechat-field{
    grid-template-columns:auto minmax(0,1fr)!important;
    grid-template-areas:
      "label label"
      "copy value"!important;
    gap:8px 10px!important;
    padding:10px 11px!important;
  }

  html[dir="rtl"] .footer-wechat-field span{
    grid-area:label!important;
    justify-self:end!important;
    text-align:right!important;
  }

  html[dir="rtl"] .footer-wechat-field strong{
    grid-area:value!important;
    justify-self:stretch!important;
    text-align:right!important;
  }

  html[dir="rtl"] .footer-copy-btn{
    grid-area:copy!important;
    justify-self:start!important;
  }
}

/* Inquiry result modal */
html[dir="rtl"] .inquiry-result-modal,
html[dir="rtl"] .inquiry-result-panel{
  direction:rtl;
  text-align:center;
}

html[dir="rtl"] .inquiry-result-close{
  right:auto!important;
  left:14px!important;
}

/* Keep icons and logos visually stable */
html[dir="rtl"] svg,
html[dir="rtl"] .brand-mark{
  direction:ltr;
}
