.nq-language-switcher {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px;
  border: 1px solid rgba(166, 108, 26, 0.26);
  border-radius: 999px;
  background: rgba(255, 252, 246, 0.96);
  box-shadow: 0 10px 30px rgba(72, 43, 5, 0.12);
  direction: ltr;
  z-index: 99998;
}

.nq-language-switcher--floating {
  position: fixed;
  right: 18px;
  bottom: 18px;
}

.nq-lang-btn {
  appearance: none;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #21170c;
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
  padding: 10px 12px;
  white-space: nowrap;
}

.nq-lang-btn:hover,
.nq-lang-btn:focus-visible,
.nq-lang-btn.is-active {
  background: #21170c;
  color: #fffaf0;
  outline: none;
}

.nq-translation-overlay {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(255, 250, 240, 0.78);
  backdrop-filter: blur(2px);
  z-index: 999999;
}

.nq-translation-overlay__box {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 15px 18px;
  border: 1px solid rgba(166, 108, 26, 0.22);
  border-radius: 16px;
  background: #fffdf8;
  color: #21170c;
  box-shadow: 0 20px 60px rgba(72, 43, 5, 0.16);
  direction: rtl;
  font-size: 14px;
  font-weight: 700;
}

.nq-spinner {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(33, 23, 12, 0.18);
  border-top-color: #a66c1a;
  border-radius: 50%;
  animation: nq-spin 0.75s linear infinite;
}

.nq-translation-toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  max-width: min(90vw, 520px);
  padding: 12px 16px;
  border-radius: 12px;
  background: #2b1711;
  color: #fff;
  box-shadow: 0 16px 44px rgba(0, 0, 0, 0.2);
  direction: rtl;
  text-align: center;
  z-index: 1000000;
}

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

html[dir="rtl"] .woocommerce,
html[dir="rtl"] .woocommerce-page,
html[dir="rtl"] form,
html[dir="rtl"] table {
  text-align: right;
}

@keyframes nq-spin {
  to { transform: rotate(360deg); }
}

@media (max-width: 767px) {
  .nq-language-switcher--floating {
    left: 12px !important;
    right: auto !important;
    bottom: 12px;
  }

  .nq-lang-btn {
    padding: 9px 10px;
    font-size: 12px;
  }
}
