/* ============================================================================
   TOOLBAR - Same style as artworks.hbs
   ============================================================================ */
.toolbar {
  background: var(--surface);
  /*position: sticky;*/
  top: 0;
  z-index: 100;
}

.toolbar__inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  border-radius: var(--radius-md);
  background: var(--card-bg);
  gap: 1rem;
  padding: 0.5rem 1rem;
}

.toolbar__left {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
}

.toolbar__center {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.toolbar__right {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.toolbar__left a {
  text-decoration: none;
  color: var(--text);
}

/* Search Input */
.search-input {
  position: relative;
}

.search-input__field {
  padding: 8px 14px 8px 36px;
  border: 1px solid rgba(128,128,128,0.2);
  border-radius: var(--radius-md);
  background: var(--surface, #fff);
  font-size: 0.85rem;
  color: var(--text);
  width: 300px;
  transition: all 0.2s;
}

.search-input__field:focus {
  outline: none;
  border-color: var(--ui-accent);
  width: 260px;
}

.search-input__field::placeholder {
  color: var(--text-muted, #999);
}

.search-input__icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted, #999);
  pointer-events: none;
}

/* View Toggle */
.view-toggle {
  display: flex;
  align-items: center;
  border: 1px solid rgba(128,128,128,0.2);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.view-toggle__btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: none;
  background: transparent;
  cursor: pointer;
  transition: all 0.2s;
  color: var(--text, #666);
}

.view-toggle__btn:hover {
  background: rgba(128,128,128,0.08);
}

.view-toggle__btn.active {
  background: var(--ui-accent, #111);
  color: var(--surface-base);
}

.view-toggle__btn svg {
  width: 16px;
  height: 16px;
}

/* Sort Dropdown */
.sort-dropdown {
  position: relative;
}

.sort-dropdown__trigger {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border: 1px solid rgba(128,128,128,0.2);
  border-radius: var(--radius-md);
  background: var(--surface, #fff);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text);
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}

.sort-dropdown__trigger:hover {
  border-color: rgba(128,128,128,0.4);
}

.sort-dropdown__trigger svg {
  width: 16px;
  height: 16px;
  opacity: 0.5;
}

.sort-dropdown__menu {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 4px;
  min-width: 180px;
  background: var(--surface, #fff);
  border: 1px solid rgba(128,128,128,0.15);
  border-radius: var(--radius-md);
  box-shadow: 0 10px 40px rgba(0,0,0,0.12);
  padding: 8px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: all 0.2s;
  z-index: 200;
}

.sort-dropdown.open .sort-dropdown__menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.sort-dropdown__item {
  display: block;
  width: 100%;
  padding: 10px 12px;
  border: none;
  background: transparent;
  text-align: left;
  font-size: 0.85rem;
  color: var(--text);
  cursor: pointer;
  border-radius: var(--radius-md);
  transition: background 0.15s;
}

.sort-dropdown__item:hover {
  background: rgba(128,128,128,0.08);
}

.sort-dropdown__item.active {
  font-weight: 600;
  color: var(--ui-accent, #E85B79);
}


/* Series Tab Pills */
.series-pills {
  display: flex;
  background: rgba(128,128,128,0.08);
  border-radius: 10px;
  padding: 4px;
  gap: 4px;
}

.series-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text, #666);
  cursor: pointer;
  transition: all 0.2s;
  border: none;
  background: transparent;
  white-space: nowrap;
}

.series-pill:hover {
  color: var(--ui-accent, #666);
}

.series-pill.active {
  background: var(--surface, #fff);
  color: var(--text, #666);
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.series-pill__count {
  background: rgba(128,128,128,0.15);
  padding: 2px 8px;
  border-radius: 50px;
  font-size: 0.75rem;
  font-weight: 600;
}

.series-pill.active .series-pill__count {
  background: var(--ui-accent, #E85B79);
  color: var(--surface-base);
}

/* Series Pills Label - Aligned with pills */
.series-pills__label {
  display: inline-flex;
  align-items: center;
  padding: 8px 12px 8px 8px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-muted, #666);
  white-space: nowrap;
}




/* ═══════════════════════════════════════════════════════════
   MOBILE RESPONSIVE
   ═══════════════════════════════════════════════════════════ */
@media (max-width: 575.98px) {

  .toolbar__inner {
    display: grid;
    grid-template-columns: auto;
    gap: .5rem;
    padding: .25rem .5rem;
    max-width: 100%;
    overflow: hidden;
  }

  /* Constrain toolbar__left to prevent overflow */
  .toolbar__left {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow: hidden;
  }

  /* Series pills: horizontal scroll within constrained width */
  .series-pills {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE/Edge */
  }

  .series-pills::-webkit-scrollbar {
    display: none; /* Chrome/Safari */
  }

  .toolbar__right {
    display: none;
  }

  /* Hide center column on mobile */
  .toolbar__center {
    display: none;
  }

}