// Trigger sits inside the thin footer. Visual height stays small
// (~28px) but the tap target meets the AAA 44×44 minimum from
// ADR-0016 by extending vertical padding to the full footer height
// — the surrounding `<nav>` clips at footer bounds.
.locale-switcher__trigger {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  min-height: 2.75rem;
  margin: -0.5rem 0;
  padding: 0 0.5rem;
  border-radius: 0.25rem;
  background: transparent;
  border: 0;
  color: inherit;
  font-size: inherit;
  font-weight: 500;
  cursor: pointer;
  transition:
    background-color 0.12s ease-out,
    color 0.12s ease-out;

  &:hover {
    background-color: #f3f4f6;
    color: var(--color-brand-primary-500);

    :where(.dark) & {
      background-color: #1f2937;
      color: var(--color-brand-primary-300);
    }
  }

  &:focus-visible {
    outline: 2px solid var(--color-brand-primary-500);
    outline-offset: 2px;
  }
}

// Menu mirrors the theme-switcher styling so the two header/footer
// dropdowns read as one family.
.locale-switcher__menu {
  min-width: 10rem;
  margin-bottom: 0.25rem;
  padding: 0.25rem;
  background-color: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 0.5rem;
  box-shadow:
    0 4px 6px -1px rgba(0, 0, 0, 0.1),
    0 2px 4px -2px rgba(0, 0, 0, 0.05);

  :where(.dark) & {
    background-color: #111827;
    border-color: #1f2937;
  }
}

.locale-switcher__item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  min-height: 2.5rem;
  padding: 0.5rem 0.75rem;
  border-radius: 0.375rem;
  background: transparent;
  border: 0;
  color: #1f2937;
  font-size: 0.875rem;
  text-align: left;
  cursor: pointer;
  transition:
    background-color 0.12s ease-out,
    color 0.12s ease-out;

  :where(.dark) & {
    color: #f3f4f6;
  }

  &:hover {
    background-color: #f3f4f6;
    color: var(--color-brand-primary-500);

    :where(.dark) & {
      background-color: #1f2937;
      color: var(--color-brand-primary-300);
    }
  }

  &:focus-visible {
    outline: 2px solid var(--color-brand-primary-500);
    outline-offset: -2px;
  }
}

.locale-switcher__label {
  flex: 1 1 auto;
}

.locale-switcher__item--active {
  font-weight: 600;
  color: var(--color-brand-primary-500);

  :where(.dark) & {
    color: var(--color-brand-primary-300);
  }
}
