/* The catalogue switch uses Bootstrap's button group, themed with its component tokens. */
.shelf-picker {
  margin-top: 17px;
  display: grid;
  gap: 13px;
  justify-items: start;
}
.shelf-mode-switch {
  --bs-border-width: 1px;
  --bs-border-radius: 6px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--panel);
  gap: 4px;
}
.shelf-mode-switch .btn {
  --bs-btn-border-color: transparent;
  --bs-btn-color: var(--text);
  --bs-btn-hover-color: #fff;
  --bs-btn-hover-bg: #252525;
  --bs-btn-active-color: #101010;
  --bs-btn-active-bg: var(--accent);
  --bs-btn-active-border-color: var(--accent);
  --bs-btn-hover-border-color: var(--line);
  --bs-btn-focus-shadow-rgb: 171, 209, 141;
  --bs-btn-font-family: inherit;
  --bs-btn-font-size: .94rem;
  --bs-btn-font-weight: 550;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .55rem;
  min-height: 42px;
  padding: .5rem 1rem;
  white-space: nowrap;
}
.shelf-mode-switch.btn-group > .btn {
  border-radius: 5px;
  margin: 0;
}
.shelf-mode-switch .btn:focus-visible {outline: 2px solid var(--accent); outline-offset: 2px}
.shelf-mode-switch .mode-icon {
  width: 16px;
  height: 16px;
  flex: none;
  background-color: currentColor;
  mask: var(--mode-glyph) center / contain no-repeat;
}
.mode-icon-grid-1x2 {--mode-glyph: url('/assets/vendor/bootstrap-icons/grid-1x2.svg')}
.mode-icon-soundwave {--mode-glyph: url('/assets/vendor/bootstrap-icons/soundwave.svg')}
.shelf-picker .shelf-states {gap: 6px; align-items: center}
.shelf-picker .shelf-states[hidden] {display: none}
.shelf-picker .shelf-states a[aria-current] {background: transparent; border-color: var(--accent); color: var(--accent)}
.tea-shelf .shelf-control-row:has(+ .shelf-picker) .shelf-search {max-width: 43rem}
@media (max-width: 600px) {
  .shelf-control-row:has(+ .shelf-picker) {display: flex; flex-wrap: wrap; gap: 9px}
  .shelf-control-row:has(+ .shelf-picker) .shelf-search {flex-basis: 100%}
  .shelf-control-row:has(+ .shelf-picker) .shelf-count {margin-left: 0}
  .shelf-mode-switch .btn {padding-inline: .75rem}
}

/* Keep the first products in view, especially when ten tea types are available. */
.tea-shelf.listing {padding-top: clamp(18px, 1.7vw, 30px)}
.tea-shelf .shelf-heading h1 {font-size: clamp(2.25rem, 4.4vw, 4.65rem)}
.tea-shelf .shelf-departments {margin-top: 14px}
.tea-shelf .shelf-controls {padding-block: 15px; margin-bottom: 18px}
.tea-shelf .shelf-picker {min-width: 0; grid-template-columns: minmax(0, 1fr)}
@media (max-width: 600px) {
  .tea-shelf .shelf-heading p {display: none}
  .tea-shelf .shelf-heading h1 {max-width: none; font-size: clamp(1.85rem, 7.2vw, 2.7rem)}
  .tea-shelf .shelf-departments {margin-top: 7px}
  .tea-shelf .shelf-controls {padding-block: 12px}
  .shelf-picker .shelf-states {max-width: 100%; flex-wrap: nowrap; overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: thin; scrollbar-color: #555 transparent; padding-block: 2px 7px}
  .shelf-picker .shelf-states a {flex: none; white-space: nowrap}
  .shelf-mode-switch {max-width: 100%; gap: 2px; padding: 3px}
  .shelf-mode-switch .btn {font-size: .875rem; gap: .35rem; padding-inline: .6rem}
}
