.p4u-static-language-switcher {
  bottom: max(74px, calc(env(safe-area-inset-bottom) + 64px));
  filter: drop-shadow(0 8px 22px rgba(15, 23, 42, 0.22));
  position: fixed;
  right: max(18px, env(safe-area-inset-right));
  z-index: 2147482000;
}

body[class*='p4u-language-'] .gt_switcher_wrapper,
body[class*='p4u-language-'] a.glink {
  display: none !important;
}

.p4u-static-language-switcher select {
  appearance: auto;
  background: #fff;
  border: 1px solid rgba(15, 23, 42, 0.18);
  border-radius: 8px;
  color: #172033;
  cursor: pointer;
  font: 600 14px/1.2 Arial, sans-serif;
  min-height: 42px;
  min-width: 150px;
  padding: 9px 34px 9px 12px;
}

.p4u-static-language-switcher select:focus-visible {
  outline: 3px solid rgba(37, 99, 235, 0.35);
  outline-offset: 2px;
}

.p4u-language-changing .p4u-static-language-switcher {
  opacity: 0.72;
}

/* Restore the original widgets automatically when PhotoSwipe closes. */
html.p4u-gallery-open :is(.p4u-static-language-switcher, .ht-ctc-chat, #wpadminbar) {
  visibility: hidden !important;
  pointer-events: none !important;
}

html.p4u-gallery-open .pswp {
  top: 0 !important;
  height: 100% !important;
  z-index: 2147483647;
}

.p4u-language-rtl .site-content,
.p4u-language-rtl main {
  direction: rtl;
}

/* WooCommerce's existing FlexSlider uses LTR offsets on this English-base site.
   Keep its image track LTR; Arabic text elsewhere retains RTL layout. */
.p4u-language-rtl .woocommerce-product-gallery {
  direction: ltr;
}

.p4u-table-scroll {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
  margin-block: 12px 20px;
}

.p4u-table-scroll:focus-visible {
  outline: 2px solid #2563eb;
  outline-offset: 2px;
}

.p4u-table-scroll-hint {
  color: #4b5563;
  font-size: 13px;
  line-height: 1.5;
  margin-block: 12px 4px;
}

.p4u-table-scroll table.p4u-spec-table--compact {
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  height: auto !important;
  table-layout: fixed;
}

.p4u-spec-table--compact :is(col, colgroup, th, td) {
  width: auto !important;
  min-width: 0 !important;
  max-width: 100%;
}

@media (max-width: 921px) {
  .p4u-spec-table--compact :is(th, td) {
    height: auto !important;
    padding: 10px 7px !important;
    vertical-align: top;
    overflow-wrap: anywhere;
    white-space: normal !important;
    line-height: 1.5;
  }

  .p4u-spec-table--compact :is(th, td) :is(p, span, div) {
    white-space: normal !important;
    overflow-wrap: anywhere;
  }
}

@media (max-width: 600px) {
  .p4u-static-language-switcher {
    bottom: max(72px, calc(env(safe-area-inset-bottom) + 62px));
    right: max(12px, env(safe-area-inset-right));
  }

  .p4u-static-language-switcher select {
    font-size: 13px;
    min-height: 40px;
    min-width: 138px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .p4u-static-language-switcher {
    transition: none;
  }
}
