*,
*:before,
*:after {
  box-sizing: border-box;
}
body {
  margin: 0;
  font-family:
    -apple-system,
    BlinkMacSystemFont,
    Segoe UI,
    sans-serif;
  font-size: 14px;
}
.picker {
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.picker-loading {
  padding: 12px;
  color: #666;
}
.picker-current {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: #f0f4ff;
  border: 1px solid #0047bb;
  border-radius: 4px;
}
.picker-current svg {
  width: 24px;
  height: 24px;
  color: #0047bb;
  flex-shrink: 0;
}
.picker-current button {
  margin-left: auto;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 18px;
  color: #666;
  padding: 0 4px;
  line-height: 1;
}
.picker-current button:hover {
  color: #333;
}
.picker-search {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 14px;
  outline: none;
}
.picker-search:focus {
  border-color: #0047bb;
}
.picker-count {
  margin: 0;
  font-size: 12px;
  color: #888;
}
.picker-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(40px, 1fr));
  gap: 4px;
  max-height: 420px;
  overflow-y: auto;
}
.picker-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 1;
  background: none;
  border: 1px solid transparent;
  border-radius: 4px;
  cursor: pointer;
  color: #333;
  padding: 6px;
  transition:
    background 0.1s,
    border-color 0.1s,
    color 0.1s;
}
.picker-icon:hover {
  background: #f0f4ff;
  border-color: #0047bb;
  color: #0047bb;
}
.picker-icon--selected {
  background: #0047bb;
  border-color: #0047bb;
  color: #fff;
}
.picker-icon svg {
  width: 100%;
  height: 100%;
  max-width: 20px;
  max-height: 20px;
}
