.screen-actions,
.logistica-pedidos-fora-filter-actions {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 6px;
}

/* Ações que submetem e percorrem uma faixa de datas. */
.screen-action-btn.period-range-submit,
.period-range-stepper .screen-action-btn {
  height: calc(1.5em + .75rem + 2px);
}

.period-range-submit,
.period-range-stepper {
  transform: translateY(-4px);
}

.period-range-stepper {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.period-range-stepper .compass-icon-button {
  width: calc(1.5em + .75rem + 2px);
  padding: 0;
}

.period-range-stepper > .screen-action-btn + .screen-action-btn {
  margin-left: 0;
}

@media (max-width: 767.98px) {
  .period-range-stepper {
    max-width: 100%;
  }

  .period-range-stepper > .screen-action-btn.compass-icon-button {
    min-width: 0;
    flex: 1 1 0;
  }
}

.screen-actions > form {
  gap: 0;
  margin: 0;
}

.screen-action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  height: 30px;
  padding: 0 10px;
  border: 1px solid #dee2e6;
  border-radius: var(--icon-btn-radius);
  color: #495057;
  background: #fff;
  font-size: .82rem;
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
  transition: color .16s ease, border-color .16s ease, background-color .16s ease;
}

.screen-action-btn:hover {
  color: #212529;
  background: #f1f3f5;
}

.screen-action-btn:focus-visible {
  color: #495057;
  background: #fff;
}

.screen-action-btn:disabled {
  cursor: wait;
  opacity: .7;
}

.screen-action-btn.is-active {
  color: #315a7a;
  border-color: #cfe0ee;
  background: #eef5fb;
}

.screen-action-btn-danger {
  color: #a61e2c;
  border-color: #ffc9c9;
  background: #fff5f5;
}

.screen-action-btn-danger:hover {
  color: #861421;
  background: #ffe3e3;
}

.screen-actions--spaced,
.screen-filter-actions.vendas-faturamento-actions {
  margin-bottom: 20px;
}

.menu-actions:has(+ .screen-actions),
.menu-actions:has(+ .screen-filter-actions),
.menu-actions:has(+ .vendas-faturamento-controls),
.menu-actions:has(+ .vendas-clientes-controls) {
  margin-bottom: 30px;
}

.vendas-page > .menu-actions:has(+ .vendas-faturamento-controls),
.vendas-page > .menu-actions:has(+ .vendas-clientes-controls),
.faturamento-page > .menu-actions:has(+ .screen-actions),
.faturamento-page > .menu-actions:has(+ .screen-filter-actions) {
  margin-bottom: 14px;
}

.menu-actions + .screen-actions,
.menu-actions + .screen-filter-actions,
.menu-actions + .vendas-faturamento-controls,
.menu-actions + .vendas-clientes-controls {
  margin-top: 0;
}

.screen-actions + .vendas-faturamento-search,
.screen-actions + .compass-banner + .vendas-faturamento-search,
.screen-filter-actions + .vendas-faturamento-search,
.screen-filter-actions + .compass-banner + .vendas-faturamento-search {
  margin-top: 0;
}

.screen-actions-toggle.is-active {
  color: #315a7a;
  border-color: #cfe0ee;
  background: #eef5fb;
}

.screen-actions-toggle:not(.is-active):hover,
.screen-actions-toggle:not(.is-active):focus-visible {
  color: #212529;
  background: #f1f3f5;
}

.screen-actions-toggle.is-active:hover,
.screen-actions-toggle.is-active:focus-visible {
  color: #24445d;
  border-color: #c1d6e8;
  background: #e1edf7;
}

@media (max-width: 767.98px), (hover: none) and (pointer: coarse) {
  .menu-actions:has(+ .screen-actions),
  .menu-actions:has(+ .screen-filter-actions),
  .menu-actions:has(+ .vendas-faturamento-controls),
  .menu-actions:has(+ .vendas-clientes-controls) {
    margin-bottom: 18px;
  }

  .screen-actions--spaced,
  .screen-filter-actions.vendas-faturamento-actions {
    margin-bottom: 16px;
  }

  .screen-actions--scroll,
  .vendas-faturamento-actions,
  .representacao-config-actions {
    display: flex;
    flex-wrap: nowrap;
    justify-content: flex-start;
    width: 100%;
    max-width: 100%;
    gap: .55rem;
    overflow-x: auto;
    overflow-y: hidden;
    padding-bottom: .25rem;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .screen-actions--scroll::-webkit-scrollbar,
  .vendas-faturamento-actions::-webkit-scrollbar,
  .representacao-config-actions::-webkit-scrollbar {
    display: none;
  }

  .screen-actions--scroll .screen-action-btn,
  .vendas-faturamento-actions .screen-action-btn,
  .representacao-config-actions .screen-action-btn {
    width: auto;
    flex: 0 0 auto;
    min-height: 32px;
    height: 32px;
    min-width: 0;
    max-width: calc(100vw - 3rem);
    padding: .35rem .8rem;
    font-size: .82rem;
    line-height: 1;
    white-space: nowrap;
  }
}
