/* r66 — Locale switcher: collapsed by default (menu-button-links.js sets display:block when open) */

#kc-locale {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  z-index: 1000;
}

#kc-locale-wrapper {
  display: flex;
  justify-content: flex-end;
}

#kc-locale-dropdown.menu-button-links {
  position: relative;
}

#kc-current-locale-link {
  appearance: none;
  -webkit-appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin: 0;
  padding: 0.4rem 0.7rem;
  border: 1px solid #d1d5db;
  border-radius: 999px;
  background: #fff;
  color: #111827;
  font: inherit;
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1.2;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

#kc-current-locale-link::after {
  content: "";
  width: 0.4rem;
  height: 0.4rem;
  margin-left: 0.15rem;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg) translateY(-1px);
  opacity: 0.7;
}

#kc-current-locale-link:hover,
#kc-current-locale-link:focus-visible {
  border-color: #2563eb;
  color: #1d4ed8;
  outline: none;
}

#kc-current-locale-link[aria-expanded="true"] {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

/* Critical: hide menu until JS opens it (display:block) */
#kc-locale .pf-c-dropdown__menu,
#kc-locale #language-switch1 {
  display: none;
  position: absolute;
  top: calc(100% + 0.35rem);
  right: 0;
  left: auto;
  min-width: 12rem;
  margin: 0;
  padding: 0.35rem;
  list-style: none;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 0.75rem;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.12);
  z-index: 1001;
}

#kc-locale .pf-c-dropdown__menu-item,
#kc-locale #language-switch1 a {
  display: block;
  padding: 0.55rem 0.75rem;
  border-radius: 0.5rem;
  color: #111827;
  text-decoration: none;
  font-size: 0.875rem;
  white-space: nowrap;
}

#kc-locale .pf-c-dropdown__menu-item:hover,
#kc-locale #language-switch1 a:hover,
#kc-locale .pf-c-dropdown__menu-item:focus,
#kc-locale #language-switch1 a:focus {
  background: #eff6ff;
  color: #1d4ed8;
  outline: none;
}
