.woocommerce-ordering {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.woocommerce-ordering select {
  display: none;
}

.atlbr-sorting__toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 0;
  background: none;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #111;
  cursor: pointer;
  padding: 12px 8px;
  border-radius: 999px;
  transition: background-color 0.2s ease;
  -webkit-tap-highlight-color: transparent;
}

.atlbr-sorting__toggle .material-symbols-outlined {
  font-size: 20px;
  transition: transform 0.2s ease;
}

.woocommerce-ordering.is-open .atlbr-sorting__toggle .material-symbols-outlined {
  transform: rotate(180deg);
}

.atlbr-sorting__toggle:active {
  background-color: rgba(0, 0, 0, 0.08);
}

.atlbr-sorting__panel {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  min-width: 220px;
  max-width: min(320px, calc(100vw - 24px));
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.14);
  border-radius: 12px;
  padding: 16px;
  display: none;
  flex-direction: column;
  gap: 12px;
  z-index: 50;
}

.woocommerce-ordering.is-open .atlbr-sorting__panel {
  display: flex;
}

.atlbr-sorting__options {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 0;
  padding: 0;
  border: 0;
}

.atlbr-sorting__option {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.95rem;
  cursor: pointer;
}

.atlbr-sorting__option input {
  accent-color: #111;
}

.atlbr-sorting__actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

.atlbr-sorting__submit {
  background: #111;
  color: #fff;
  border: 0;
  border-radius: 999px;
  padding: 8px 16px;
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  cursor: pointer;
}

.atlbr-sorting__close {
  background: none;
  border: 0;
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  cursor: pointer;
  color: #6c6c6c;
}

@media (max-width: 640px) {
  .atlbr-sorting__panel {
    min-width: 200px;
  }
}
