/* Arabic Learning Games - shared WordPress interface-language control V1 */

.alg-site-language-menu-item {
  display: inline-flex;
  align-items: center;
  position: relative;
}

.alg-site-language-toggle,
.alg-site-language-toggle:hover,
.alg-site-language-toggle:focus,
.alg-site-language-toggle:active {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #ffffff;
  box-shadow: none;
  cursor: pointer;
}

.alg-site-language-toggle svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
}

.alg-site-language-toggle:hover,
.alg-site-language-toggle:focus-visible {
  background: rgba(255, 255, 255, 0.1);
  color: #39c5c0;
}

.alg-site-language-menu {
  position: absolute;
  z-index: 10010;
  top: calc(100% + 8px);
  right: 0;
  width: 184px;
  padding: 6px;
  border: 1px solid rgba(5, 41, 81, 0.14);
  border-radius: 10px;
  background: #ffffff;
  box-shadow: 0 10px 30px rgba(5, 41, 81, 0.2);
}

.alg-site-language-menu[hidden] {
  display: none !important;
}

.alg-site-language-option,
.alg-site-language-option:hover,
.alg-site-language-option:focus,
.alg-site-language-option:active {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 40px;
  margin: 0;
  padding: 7px 9px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: #052951;
  box-shadow: none;
  cursor: pointer;
  font-family: "Inter", "Cairo", "Segoe UI", sans-serif;
  font-size: 0.88rem;
  font-weight: 700;
}

.alg-site-language-option small {
  color: #6c7888;
  font-size: 0.7rem;
  font-weight: 600;
}

.alg-site-language-option:hover,
.alg-site-language-option:focus-visible,
.alg-site-language-option.is-selected {
  background: #eef8f7;
  color: #087f7b;
}

.alg-site-language-option.is-selected::before {
  content: "✓";
  color: #0ca5a0;
  font-weight: 900;
}

.alg-site-language-option:focus-visible {
  outline: 2px solid #ffb617;
  outline-offset: -2px;
}

html[data-alg-theme="dark"] .alg-site-language-menu {
  border-color: rgba(255, 255, 255, 0.14);
  background: #0b3159;
}

html[data-alg-theme="dark"] .alg-site-language-option {
  color: #ffffff;
}

html[data-alg-theme="dark"] .alg-site-language-option small {
  color: #b7c7d8;
}

html[data-alg-theme="dark"] .alg-site-language-option:hover,
html[data-alg-theme="dark"] .alg-site-language-option:focus-visible,
html[data-alg-theme="dark"] .alg-site-language-option.is-selected {
  background: rgba(57, 197, 192, 0.14);
  color: #59d6d1;
}

.alg-site-language-toggle:focus-visible {
  outline: 2px solid #ffb617;
  outline-offset: -3px;
}

@media (max-width: 767px) {
  .alg-site-language-toggle,
  .alg-site-language-toggle:hover,
  .alg-site-language-toggle:focus,
  .alg-site-language-toggle:active {
    width: 38px;
    height: 42px;
  }
}

@media (max-width: 380px) {
  .site-header .site-logo img,
  .site-header .site-logo img.header-image {
    width: 132px !important;
    max-width: 132px !important;
  }

  .alg-site-language-toggle,
  .alg-site-language-toggle:hover,
  .alg-site-language-toggle:focus,
  .alg-site-language-toggle:active {
    width: 34px;
  }

  .mobile-menu-control-wrapper .menu-bar-items a,
  .mobile-menu-control-wrapper .menu-toggle {
    padding-right: 8px;
    padding-left: 8px;
  }
}
