/* UI language modal + header switch — LTR layout, Cairo on Arabic UI strings only */

.miraz-lang-modal-open {
  overflow: hidden;
}

.miraz-lang-modal[hidden] {
  display: none !important;
}

.miraz-lang-modal {
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.miraz-lang-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(20, 16, 12, 0.55);
}

.miraz-lang-modal__dialog {
  position: relative;
  z-index: 1;
  width: min(100%, 380px);
  padding: 28px 24px 24px;
  background: #fff;
  border: 1px solid rgba(200, 164, 93, 0.35);
  text-align: center;
}

.miraz-lang-modal__title {
  margin: 0 0 20px;
  font-size: 1.15rem;
  font-weight: 600;
  color: #2a241c;
  line-height: 1.35;
}

.miraz-lang-modal__actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.miraz-lang-modal__btn {
  appearance: none;
  border: 1px solid #2a241c;
  background: #fff;
  color: #2a241c;
  padding: 14px 10px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  line-height: 1.2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.miraz-lang-modal__btn:hover,
.miraz-lang-modal__btn:focus-visible {
  background: #2a241c;
  color: #fff;
  outline: none;
}

.miraz-lang-modal__flag {
  display: flex;
  line-height: 0;
}

.miraz-lang-flag {
  display: block;
  border-radius: 2px;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.12);
}

/* Arabic mode: Cairo on ALL text (override theme Sofia/Instrument !important).
   Keep icon fonts / SVG alone. Layout stays LTR. */
html[data-miraz-lang="ar"] body,
html[data-miraz-lang="ar"] body *:not(i):not(svg):not(svg *):not(path):not(use):not(text):not([class*="icon"]):not([class*="Icon"]):not(.fa):not(.fas):not(.far):not(.fab):not(.nutreko-icon-search) {
  font-family: Cairo, "Segoe UI", Tahoma, sans-serif !important;
}

html[data-miraz-lang="ar"] body {
  letter-spacing: 0;
}

.miraz-lang-modal__btn--ar .miraz-lang-modal__lang,
.miraz-lang-switch [data-side="ar"] {
  font-family: Cairo, "Segoe UI", Tahoma, sans-serif !important;
}


/* Header switch */
.miraz-lang-switch-wrap {
  display: flex;
  align-items: center;
}

.miraz-lang-switch {
  appearance: none;
  border: 0;
  background: transparent;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 6px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: inherit;
  line-height: 1;
}

.miraz-lang-switch [data-side] {
  opacity: 0.45;
}

.miraz-lang-switch [data-side].is-active {
  opacity: 1;
  color: var(--primary, #c8a45d);
}

.miraz-lang-switch__sep {
  opacity: 0.35;
  font-weight: 400;
}

.miraz-lang-switch [data-side="ar"] {
  font-family: Cairo, "Segoe UI", Tahoma, sans-serif !important;
  font-size: 13px;
}

/* LE MIX IDÉAL — Arabic 2-line stack (الخلطة / المثالية) */
html[data-miraz-lang="ar"] .elementor-element-1b4423e .elementor-headline {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}
html[data-miraz-lang="ar"] .elementor-element-1b4423e .elementor-headline-plain-text,
html[data-miraz-lang="ar"] .elementor-element-1b4423e .elementor-headline-dynamic-wrapper {
  display: block;
  width: 100%;
}
html[data-miraz-lang="ar"] .elementor-element-1b4423e .elementor-headline-plain-text:last-child {
  display: none !important;
}

@media (max-width: 767px) {
  .miraz-lang-switch {
    padding: 4px 4px;
    font-size: 11px;
  }
}
