/* =========================================================
   MSB Polylang Switcher — Window Repair UAE Theme
   White / Blue / Navy
   ========================================================= */

.switch-poly-msb-root,
.switch-poly-msb-root * {
  box-sizing: border-box !important;
}

.switch-poly-msb-root {
  position: relative !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: auto !important;
  height: auto !important;
  margin: 0 !important;
  padding: 0 !important;
  line-height: 1 !important;
  font-family: Arial, Helvetica, sans-serif !important;
}

.switch-poly-msb-trigger {
  min-width: 58px !important;
  height: 38px !important;
  min-height: 38px !important;
  max-height: 38px !important;

  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 7px !important;

  margin: 0 !important;
  padding: 0 12px !important;

  border-radius: 999px !important;
  border: 1px solid rgba(30, 90, 168, 0.22) !important;

  color: #1E5AA8 !important;
  background: #ffffff !important;

  cursor: pointer !important;
  outline: none !important;

  line-height: 1 !important;
  text-align: center !important;
  text-decoration: none !important;

  box-shadow: 0 8px 22px rgba(30, 90, 168, 0.10) !important;

  transition:
    color 0.25s ease,
    background 0.25s ease,
    border-color 0.25s ease,
    box-shadow 0.25s ease,
    transform 0.25s ease !important;
}

.switch-poly-msb-trigger:hover,
.switch-poly-msb-trigger[aria-expanded="true"] {
  color: #ffffff !important;
  background: #1E5AA8 !important;
  border-color: #1E5AA8 !important;
  box-shadow: 0 12px 28px rgba(30, 90, 168, 0.20) !important;
  transform: translateY(-1px) !important;
}

.switch-poly-msb-trigger:focus-visible {
  outline: 3px solid rgba(30, 90, 168, 0.22) !important;
  outline-offset: 3px !important;
}

.switch-poly-msb-trigger-flag {
  width: 20px !important;
  height: 20px !important;
  min-width: 20px !important;
  min-height: 20px !important;
  max-width: 20px !important;
  max-height: 20px !important;

  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;

  margin: 0 !important;
  padding: 0 !important;

  border-radius: 50% !important;
  overflow: hidden !important;

  background-position: center !important;
  background-repeat: no-repeat !important;
  background-size: cover !important;
  background-color: #f5f8fc !important;

  box-shadow:
    0 0 0 1px rgba(13, 46, 92, 0.10),
    0 4px 10px rgba(13, 46, 92, 0.10) !important;
}

.switch-poly-msb-trigger:hover .switch-poly-msb-trigger-flag,
.switch-poly-msb-trigger[aria-expanded="true"] .switch-poly-msb-trigger-flag {
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.55),
    0 4px 10px rgba(0, 0, 0, 0.18) !important;
}

.switch-poly-msb-current-code {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;

  margin: 0 !important;
  padding: 0 !important;

  color: currentColor !important;
  font-size: 14px !important;
  font-weight: 700 !important;
  line-height: 1 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.1px !important;
}

.switch-poly-msb-trigger-flag-text {
  color: #1E5AA8 !important;
  font-size: 9px !important;
  font-weight: 900 !important;
  text-transform: uppercase !important;
  letter-spacing: 0 !important;
  background: #eef5ff !important;
}

.switch-poly-msb-trigger:hover .switch-poly-msb-trigger-flag-text,
.switch-poly-msb-trigger[aria-expanded="true"] .switch-poly-msb-trigger-flag-text {
  color: #ffffff !important;
  background: rgba(255, 255, 255, 0.16) !important;
}

.switch-poly-msb-modal {
  position: fixed !important;
  inset: 0 !important;

  width: 100vw !important;
  height: 100vh !important;
  height: 100dvh !important;

  z-index: 2147483200 !important;

  display: none !important;
  align-items: center !important;
  justify-content: center !important;

  margin: 0 !important;
  padding: 18px !important;

  font-family: Arial, Helvetica, sans-serif !important;
}

.switch-poly-msb-modal.switch-poly-msb-open {
  display: flex !important;
}

.switch-poly-msb-overlay {
  position: absolute !important;
  inset: 0 !important;

  width: 100% !important;
  height: 100% !important;

  margin: 0 !important;
  padding: 0 !important;

  background:
    radial-gradient(circle at 20% 10%, rgba(30, 90, 168, 0.16), transparent 34%),
    radial-gradient(circle at 80% 90%, rgba(13, 46, 92, 0.10), transparent 36%),
    rgba(13, 46, 92, 0.24) !important;

  backdrop-filter: blur(9px) !important;
  -webkit-backdrop-filter: blur(9px) !important;

  opacity: 0;
}

.switch-poly-msb-open .switch-poly-msb-overlay {
  animation: switchPolyMsbOverlayIn 0.24s ease forwards !important;
}

.switch-poly-msb-is-closing .switch-poly-msb-overlay {
  animation: switchPolyMsbOverlayOut 0.20s ease forwards !important;
}

.switch-poly-msb-dialog {
  position: relative !important;
  z-index: 2 !important;

  width: fit-content !important;
  min-width: 0 !important;
  max-width: calc(100vw - 48px) !important;

  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;

  margin: 0 !important;
  padding: 20px 22px 22px !important;

  overflow: visible !important;

  border-radius: 22px !important;
  border: 1px solid rgba(30, 90, 168, 0.18) !important;

  color: #1d2327 !important;

  background:
    radial-gradient(circle at 12% 8%, rgba(30, 90, 168, 0.07), transparent 34%),
    radial-gradient(circle at 92% 12%, rgba(13, 46, 92, 0.05), transparent 28%),
    #ffffff !important;

  box-shadow:
    0 34px 90px rgba(13, 46, 92, 0.20),
    0 14px 26px rgba(13, 46, 92, 0.08) !important;

  transform-origin: center !important;
  opacity: 0;
}

.switch-poly-msb-open .switch-poly-msb-dialog {
  animation: switchPolyMsbDialogIn 0.34s cubic-bezier(.2,.9,.2,1) forwards !important;
}

.switch-poly-msb-is-closing .switch-poly-msb-dialog {
  animation: switchPolyMsbDialogOut 0.20s ease forwards !important;
}

.switch-poly-msb-header {
  width: 100% !important;

  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 18px !important;

  margin: 0 0 18px !important;
  padding: 0 0 14px !important;

  border-bottom: 1px solid rgba(13, 46, 92, 0.10) !important;
}

.switch-poly-msb-header-text {
  min-width: 0 !important;
  flex: 1 1 auto !important;
}

.switch-poly-msb-eyebrow {
  margin: 0 0 5px !important;
  padding: 0 !important;

  color: #1E5AA8 !important;
  font-size: 10px !important;
  font-weight: 900 !important;
  letter-spacing: 1.2px !important;
  text-transform: uppercase !important;
  line-height: 1.2 !important;
}

.switch-poly-msb-title {
  margin: 0 !important;
  padding: 0 !important;

  color: #0d2e5c !important;
  font-size: 22px !important;
  font-weight: 900 !important;
  line-height: 1.15 !important;
}

.switch-poly-msb-close {
  width: 34px !important;
  height: 34px !important;
  min-width: 34px !important;
  min-height: 34px !important;

  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;

  margin: -2px -2px 0 14px !important;
  padding: 0 !important;

  border: 0 !important;
  border-radius: 50% !important;

  color: #0d2e5c !important;
  background: rgba(30, 90, 168, 0.06) !important;

  cursor: pointer !important;

  font-size: 28px !important;
  font-weight: 600 !important;
  line-height: 1 !important;
  text-align: center !important;

  outline: none !important;
  box-shadow: none !important;

  transition:
    color 0.22s ease,
    background 0.22s ease,
    transform 0.22s ease !important;
}

.switch-poly-msb-close:hover {
  color: #ffffff !important;
  background: #1E5AA8 !important;
  transform: scale(1.04) !important;
}

.switch-poly-msb-flags {
  width: auto !important;

  display: flex !important;
  flex-wrap: nowrap !important;
  align-items: center !important;
  justify-content: center !important;

  gap: 12px !important;

  margin: 0 !important;
  padding: 0 !important;
}

.switch-poly-msb-flag-button {
  position: relative !important;

  width: 52px !important;
  height: 52px !important;
  min-width: 52px !important;
  min-height: 52px !important;

  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;

  margin: 0 !important;
  padding: 0 !important;

  border-radius: 50% !important;
  border: 1px solid rgba(30, 90, 168, 0.16) !important;

  color: #1E5AA8 !important;
  text-decoration: none !important;

  background: #ffffff !important;

  box-shadow:
    0 10px 22px rgba(13, 46, 92, 0.08),
    inset 0 0 0 1px rgba(255, 255, 255, 0.8) !important;

  overflow: visible !important;
  cursor: pointer !important;

  opacity: 0;
  transform: translateY(12px) scale(0.92);

  transition:
    transform 0.25s ease,
    border-color 0.25s ease,
    background 0.25s ease,
    box-shadow 0.25s ease !important;
}

.switch-poly-msb-open .switch-poly-msb-flag-button {
  animation: switchPolyMsbFlagIn 0.34s ease forwards !important;
}

.switch-poly-msb-open .switch-poly-msb-flag-button:nth-child(1) { animation-delay: 0.04s !important; }
.switch-poly-msb-open .switch-poly-msb-flag-button:nth-child(2) { animation-delay: 0.07s !important; }
.switch-poly-msb-open .switch-poly-msb-flag-button:nth-child(3) { animation-delay: 0.10s !important; }
.switch-poly-msb-open .switch-poly-msb-flag-button:nth-child(4) { animation-delay: 0.13s !important; }
.switch-poly-msb-open .switch-poly-msb-flag-button:nth-child(5) { animation-delay: 0.16s !important; }
.switch-poly-msb-open .switch-poly-msb-flag-button:nth-child(6) { animation-delay: 0.19s !important; }
.switch-poly-msb-open .switch-poly-msb-flag-button:nth-child(7) { animation-delay: 0.22s !important; }
.switch-poly-msb-open .switch-poly-msb-flag-button:nth-child(8) { animation-delay: 0.25s !important; }

.switch-poly-msb-flag-button:hover {
  transform: translateY(-3px) scale(1.05) !important;
  border-color: rgba(30, 90, 168, 0.55) !important;
  background: #f7fbff !important;
  box-shadow:
    0 14px 28px rgba(30, 90, 168, 0.16),
    inset 0 0 0 1px rgba(255, 255, 255, 0.8) !important;
}

.switch-poly-msb-flag-button-current {
  border-color: #1E5AA8 !important;
  background: #f2f7ff !important;
  box-shadow:
    0 0 0 3px rgba(30, 90, 168, 0.10),
    0 14px 30px rgba(30, 90, 168, 0.16) !important;
}

.switch-poly-msb-flag-button-current::after {
  content: "" !important;

  position: absolute !important;
  right: 3px !important;
  bottom: 3px !important;

  width: 11px !important;
  height: 11px !important;

  border-radius: 50% !important;

  background: #1E5AA8 !important;
  border: 2px solid #ffffff !important;

  box-shadow: 0 0 10px rgba(30, 90, 168, 0.55) !important;
}

.switch-poly-msb-flag-image {
  width: 32px !important;
  height: 32px !important;
  min-width: 32px !important;
  min-height: 32px !important;

  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;

  margin: 0 !important;
  padding: 0 !important;

  border-radius: 50% !important;
  overflow: hidden !important;

  background-position: center !important;
  background-repeat: no-repeat !important;
  background-size: cover !important;
  background-color: #eef5ff !important;

  box-shadow:
    0 0 0 1px rgba(13, 46, 92, 0.10),
    0 7px 14px rgba(13, 46, 92, 0.12) !important;
}

.switch-poly-msb-flag-image-text {
  color: #1E5AA8 !important;
  font-size: 10px !important;
  font-weight: 900 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.2px !important;
  background: #eef5ff !important;
}

.switch-poly-msb-screen-reader {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  clip-path: inset(50%) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

/* =========================================================
   FIX INSIDE EXACT WINDOW REPAIR HEADER
   ========================================================= */

.msb-exact-header-wrap .header__lang,
.msb-exact-header-wrap .header__lang--single {
  position: relative !important;
  z-index: 100005 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex: 0 0 auto !important;
  margin: 0 !important;
  padding: 0 !important;
  line-height: 0 !important;
  pointer-events: auto !important;
}

.msb-exact-header-wrap .header__lang > p,
.msb-exact-header-wrap .header__lang > div,
.msb-exact-header-wrap .header__lang .wp-block-shortcode,
.msb-exact-header-wrap .header__lang--single > p,
.msb-exact-header-wrap .header__lang--single > div,
.msb-exact-header-wrap .header__lang--single .wp-block-shortcode {
  margin: 0 !important;
  padding: 0 !important;
  line-height: 0 !important;
}

.msb-exact-header-wrap .header__lang .switch-poly-msb-root,
.msb-exact-header-wrap .header__lang--single .switch-poly-msb-root {
  position: relative !important;
  z-index: 100006 !important;
  height: 38px !important;
  min-height: 38px !important;
  line-height: 0 !important;
  pointer-events: auto !important;
}

.msb-exact-header-wrap .header__lang .switch-poly-msb-trigger,
.msb-exact-header-wrap .header__lang--single .switch-poly-msb-trigger {
  position: relative !important;
  z-index: 100007 !important;
  pointer-events: auto !important;
}

@media (max-width: 1024px) {
  .msb-exact-header-wrap .header__lang {
    display: flex !important;
    margin-left: auto !important;
  }
}

@media (max-width: 380px) {
  .switch-poly-msb-trigger {
    min-width: 52px !important;
    height: 36px !important;
    min-height: 36px !important;
    max-height: 36px !important;
    padding: 0 10px !important;
    gap: 6px !important;
  }

  .switch-poly-msb-trigger-flag {
    width: 18px !important;
    height: 18px !important;
    min-width: 18px !important;
    min-height: 18px !important;
  }

  .switch-poly-msb-current-code {
    font-size: 13px !important;
  }
}

/* =========================================================
   MOBILE MODAL
   ========================================================= */

@media (max-width: 700px) {
  .switch-poly-msb-modal {
    align-items: flex-end !important;
    justify-content: center !important;
    padding: 12px !important;
  }

  .switch-poly-msb-dialog {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    max-height: 86vh !important;

    padding: 20px 16px 18px !important;

    border-radius: 22px 22px 18px 18px !important;

    overflow-y: auto !important;
    overflow-x: hidden !important;
  }

  .switch-poly-msb-open .switch-poly-msb-dialog {
    animation: switchPolyMsbDialogMobileIn 0.34s cubic-bezier(.2,.9,.2,1) forwards !important;
  }

  .switch-poly-msb-is-closing .switch-poly-msb-dialog {
    animation: switchPolyMsbDialogMobileOut 0.20s ease forwards !important;
  }

  .switch-poly-msb-header {
    margin-bottom: 16px !important;
    padding-bottom: 14px !important;
  }

  .switch-poly-msb-title {
    font-size: 21px !important;
  }

  .switch-poly-msb-flags {
    display: grid !important;
    grid-template-columns: repeat(3, 50px) !important;
    justify-content: center !important;
    gap: 12px !important;
  }

  .switch-poly-msb-flag-button {
    width: 50px !important;
    height: 50px !important;
    min-width: 50px !important;
    min-height: 50px !important;
  }

  .switch-poly-msb-flag-image {
    width: 31px !important;
    height: 31px !important;
    min-width: 31px !important;
    min-height: 31px !important;
  }
}

@media (max-width: 390px) {
  .switch-poly-msb-flags {
    grid-template-columns: repeat(3, 46px) !important;
    gap: 11px !important;
  }

  .switch-poly-msb-flag-button {
    width: 46px !important;
    height: 46px !important;
    min-width: 46px !important;
    min-height: 46px !important;
  }

  .switch-poly-msb-flag-image {
    width: 28px !important;
    height: 28px !important;
    min-width: 28px !important;
    min-height: 28px !important;
  }
}

/* =========================================================
   ANIMATIONS
   ========================================================= */

@keyframes switchPolyMsbOverlayIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes switchPolyMsbOverlayOut {
  from { opacity: 1; }
  to { opacity: 0; }
}

@keyframes switchPolyMsbDialogIn {
  from {
    opacity: 0;
    transform: translateY(18px) scale(0.96);
    filter: blur(4px);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
  }
}

@keyframes switchPolyMsbDialogOut {
  from {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
  }

  to {
    opacity: 0;
    transform: translateY(14px) scale(0.97);
    filter: blur(3px);
  }
}

@keyframes switchPolyMsbFlagIn {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.92);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes switchPolyMsbDialogMobileIn {
  from {
    opacity: 0;
    transform: translateY(100%) scale(0.98);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes switchPolyMsbDialogMobileOut {
  from {
    opacity: 1;
    transform: translateY(0) scale(1);
  }

  to {
    opacity: 0;
    transform: translateY(100%) scale(0.98);
  }
}
