/* =========================================================
   Archive Loop Item Toolbar
   ========================================================= */

.vector-loop-toolbar {
  display: flex;
  flex-flow: row wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.vector-loop-toolbar__results,
.vector-loop-toolbar__filter {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

/* Wrapper do filtro de ordenação (icone + label + select) */
.vector-loop-toolbar__filter-order {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

/* Badge de filtros ativos no botão de barra lateral */
.vector-loop-toolbar__active-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.4em;
  height: 1.4em;
  margin-left: .2em;
  padding: 0 .4em;
  border-radius: 999px;
  background: #97012f;
  color: #fff;
  font-size: .8em;
  line-height: 1;
}

.vector-loop-toolbar [hidden] {
  display: none !important;
}

.vector-loop-toolbar__results-icon,
.vector-loop-toolbar__filter-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 0;
}

.vector-loop-toolbar__results-text {
  line-height: 1.3;
}

.vector-loop-toolbar__filter-label {
  margin: 0;
  line-height: 1.3;
  cursor: pointer;
}

.vector-loop-toolbar__select {
  box-sizing: border-box;
  max-width: 100%;
  cursor: pointer;
  appearance: auto;
}

/* Botão "Menu Barra Lateral" — a visibilidade por breakpoint é aplicada por um
   <style> escopado à instância (render). Aqui só o baseline de layout. */
.vector-loop-toolbar__sidebar-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

/* Label visualmente oculta, mas acessível a leitores de tela */
.vector-loop-toolbar__filter-label.screen-reader-text {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ---- Estado de carregamento ---- */
.vector-loop-toolbar.is-loading {
  opacity: .7;
  pointer-events: none;
}

.vector-loop-toolbar.is-loading .vector-loop-toolbar__select {
  cursor: progress;
}

/* Grid associado durante o fetch */
.is-loading[aria-busy="true"] {
  position: relative;
  transition: opacity .2s ease;
  opacity: .55;
}

.vector-loop-toolbar.has-error {
  outline: 1px dashed #d63638;
  outline-offset: 2px;
}

/* ---- Avisos do editor ---- */
.vector-loop-toolbar--notice {
  display: block;
  padding: 12px 16px;
  border: 1px dashed #7d7d7d;
  border-radius: 4px;
  color: #555;
  background: rgba(0, 0, 0, .03);
  font-size: 13px;
  text-align: center;
}

.vector-loop-toolbar__editor-hint {
  flex-basis: 100%;
  margin-top: 8px;
  padding: 8px 12px;
  border-left: 3px solid #d63638;
  border-radius: 0 3px 3px 0;
  background: rgba(214, 54, 56, .08);
  color: #a02222;
  font-size: 12px;
  line-height: 1.4;
}