.lang-switcher {
  position: relative;
  z-index: 1000;
  flex-shrink: 0;
}

.lang-switcher__btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  height: 2.5rem;
  padding: 0 0.85rem;
  border: 1px solid #e5e7eb;
  border-radius: 0.375rem;
  background: #fff;
  color: #111827;
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.lang-switcher__btn:hover {
  background: #eff6ff;
  border-color: #bfdbfe;
  color: #2563eb;
}

.lang-switcher__btn[aria-expanded="true"] {
  background: #eff6ff;
  border-color: #93c5fd;
  color: #2563eb;
}

.lang-switcher__chevron {
  flex-shrink: 0;
  transition: transform 0.2s ease;
}

.lang-switcher__btn[aria-expanded="true"] .lang-switcher__chevron {
  transform: rotate(180deg);
}

.lang-switcher__list {
  position: absolute;
  top: calc(100% + 0.35rem);
  right: 0;
  left: auto;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.15rem;
  width: max-content;
  min-width: 11.5rem;
  max-width: min(16rem, calc(100vw - 1.5rem));
  max-height: min(70vh, 22rem);
  overflow-x: hidden;
  overflow-y: auto;
  margin: 0;
  padding: 0.4rem;
  list-style: none;
  border: 1px solid #e5e7eb;
  border-radius: 0.5rem;
  background: #fff;
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.12);
}

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

.lang-switcher__list li {
  display: block;
  width: 100%;
  margin: 0;
  padding: 0;
  line-height: normal;
  list-style: none;
}

.lang-switcher__link {
  display: block;
  width: 100%;
  box-sizing: border-box;
  padding: 0.55rem 0.75rem;
  border-radius: 0.375rem;
  color: #111827;
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1.3;
  text-decoration: none;
  text-align: left;
  white-space: nowrap;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.lang-switcher__link:hover {
  background: #eff6ff;
  color: #2563eb;
}

.lang-switcher__item--active {
  background: #dbeafe;
  color: #1d4ed8;
  font-weight: 600;
  pointer-events: none;
}

.lang-switcher--mobile {
  margin: 0 0 0.5rem;
  display: none;
  width: 100%;
}

.lang-switcher--mobile .lang-switcher__btn {
  width: 100%;
  justify-content: space-between;
}

.lang-switcher--mobile .lang-switcher__list {
  position: static;
  margin-top: 0.5rem;
  max-width: none;
  width: 100%;
  box-shadow: none;
}

.lang-switcher--crumb {
  order: 2;
  margin: 0;
  z-index: 40;
}

.lang-switcher--crumb .lang-switcher__list {
  left: 50%;
  right: auto;
  transform: translateX(-50%);
}

.breadcrumbs .container {
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.breadcrumbs .breadcrumb-list {
  order: 1;
}

header.bg-white > .container,
header.bg-white > .container > .flex {
  overflow: visible;
}

.header-auth-mobile {
  display: none;
}

@media (max-width: 1279px) {
  .lang-switcher:not(.lang-switcher--mobile) {
    display: block;
  }

  .lang-switcher__btn {
    height: 2.25rem;
    padding: 0 0.65rem;
    font-size: 0.8125rem;
  }
}

@media (max-width: 1023px) {
  .breadcrumbs .container {
    flex-direction: column;
    align-items: center;
    justify-content: center;
  }

  .lang-switcher--crumb {
    margin-top: 0.15rem;
  }

  .min-h-screen.flex.items-center.justify-center:has(> nav.breadcrumbs) {
    align-items: flex-start;
    padding-top: 8.5rem;
  }
}

@media (max-width: 767px) {
  .lang-switcher__btn {
    height: 2.25rem;
    padding: 0 0.5rem;
    font-size: 0.75rem;
  }

  .lang-switcher__current {
    max-width: 5.25rem;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .header-auth-mobile {
    display: flex !important;
    align-items: stretch;
    gap: 0.5rem;
    margin-top: 0.75rem;
    padding: 0.75rem 0.25rem 0.25rem;
    border-top: 1px solid #e5e7eb;
  }

  .header-auth-mobile a {
    flex: 1 1 0;
    justify-content: center;
    min-width: 0;
  }

  .header-auth-mobile a:not(.bg-primary) {
    display: none !important;
  }
}
