.tool-rail,
.tools {
  position: fixed;
  right: 28px;
  top: 196px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 30;
}
.tool-button,
.tools > button {
  display: grid;
  place-items: center;
  padding: 7px;
  width: 38px;
  height: 38px;
  border: 1px solid #282626;
  border-radius: 0;
  background: #fff;
  color: #282626;
  cursor: pointer;
}
.tool-button svg,
.tools > button svg {
  width: 22px;
  height: 22px;
}
.tool-button[aria-expanded="true"],
.tools > button[aria-expanded="true"] {
  background: #282626;
  color: #fff;
}
.tool-panel {
  position: fixed;
  top: 196px;
  right: 80px;
  width: 290px;
  max-height: calc(100dvh - 220px);
  overflow: auto;
  z-index: 29;
  border: 1px solid #282626;
  background: #fff;
  padding: 22px;
  animation: panel-in 0.18s ease-out;
}
.tool-panel h2 {
  font-size: 16px;
  font-weight: 400;
  margin: 0 0 22px;
}
.tool-panel label,
.filter-fields label {
  display: flex;
  flex-direction: column;
  gap: 9px;
  font-size: 13px;
  color: #555;
  margin-bottom: 18px;
}
.tool-panel select,
.filter-fields select {
  font: inherit;
  padding: 10px;
  width: 100%;
  background: #fff;
  border: 1px solid #aaa;
  border-radius: 0;
  color: #282626;
}
.text-action {
  display: block;
  background: #fff;
  border: 0;
  border-bottom: 1px solid #282626;
  padding: 4px 0;
  margin: 20px 0 0 auto;
  font: inherit;
  font-size: 13px;
  color: #282626;
  cursor: pointer;
}
.panel-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.panel-actions a,
.panel-actions button,
.sort-choice {
  display: block;
  text-align: left;
  padding: 11px 12px;
  background: #fff;
  border: 1px solid #282626;
  font: inherit;
  font-size: 14px;
  cursor: pointer;
  text-decoration: none;
  color: #282626;
  width: 100%;
}
.sort-choice {
  border: 0;
  margin: 4px 0;
}
.sort-choice[aria-checked="true"] {
  background: #282626;
  color: #fff;
}
.tool-panel[hidden] {
  display: none !important;
}
@keyframes panel-in {
  from {
    opacity: 0;
    transform: translateX(8px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}
@media (max-width: 700px) {
  .tool-rail,
  .tools {
    right: 16px;
    top: 150px;
  }
  .tool-panel {
    top: 150px;
    right: 66px;
    width: min(290px, calc(100vw - 82px));
    max-height: calc(100dvh - 170px);
  }
}
@media (prefers-reduced-motion: reduce) {
  .tool-panel {
    animation: none;
  }
}
.select-field,
.date-field {
  position: relative;
  display: block;
  width: 100%;
  min-width: 0;
}
.widget-native {
  position: absolute !important;
  inset: 0 auto auto 0 !important;
  width: 1px !important;
  height: 1px !important;
  opacity: 0 !important;
  pointer-events: none !important;
  clip-path: inset(50%);
  padding: 0 !important;
  margin: 0 !important;
}
.select-trigger {
  font: inherit;
  font-size: 14px;
  width: 100%;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 10px 12px;
  min-height: 42px;
  border: 1px solid #999;
  background: #fff;
  text-align: left;
  cursor: pointer;
  border-radius: 0;
  color: #282626;
}
.select-trigger span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.select-trigger svg {
  width: 16px;
  height: 16px;
  flex: none;
}
.select-trigger[aria-expanded="true"],
.date-trigger[aria-expanded="true"] {
  border-color: #282626;
  background: #f5f5f3;
}
.widget-popover,
.date-popover {
  position: fixed;
  z-index: 150;
  background: #fff;
  color: #282626;
  border: 1px solid #282626;
  padding: 10px;
  font:
    14px/1.5 ui-monospace,
    SFMono-Regular,
    Menlo,
    "PingFang SC",
    sans-serif;
  box-shadow: 0 8px 24px #0000000a;
  overflow: auto;
}
.option-search {
  font: inherit;
  width: 100%;
  padding: 10px;
  border: 1px solid #aaa;
  border-radius: 0;
  margin-bottom: 8px;
  outline-offset: 1px;
}
.option-list {
  max-height: 290px;
  overflow: auto;
  overscroll-behavior: contain;
}
.option {
  display: block;
  text-align: left;
  width: 100%;
  padding: 10px 12px;
  border: 0;
  border-radius: 0;
  background: #fff;
  font: inherit;
  color: inherit;
  cursor: pointer;
}
.option[aria-selected="true"] {
  background: #282626;
  color: #fff;
}
.option:focus-visible,
.option:hover {
  outline: 0;
  background: #eeeeeb;
  color: #282626;
}
.option[aria-selected="true"]:focus-visible {
  background: #282626;
  color: #fff;
}
.option-empty {
  color: #777;
  padding: 12px;
}
.date-field > input {
  padding-right: 46px !important;
}
.date-trigger {
  position: absolute;
  right: 1px;
  top: 1px;
  bottom: 1px;
  border: 0;
  border-left: 1px solid #ddd;
  background: #fff;
  width: 40px;
  padding: 10px;
  display: grid;
  place-items: center;
  cursor: pointer;
  color: #282626;
}
.date-trigger svg {
  width: 18px;
  height: 18px;
}
.date-popover {
  width: 300px !important;
  padding: 16px;
  max-height: 440px !important;
}
.date-popover button {
  font: inherit;
  color: inherit;
  border: 0;
  background: #fff;
  padding: 8px;
  cursor: pointer;
}
.date-precision {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border: 1px solid #aaa;
  margin-bottom: 12px;
}
.date-precision button + button {
  border-left: 1px solid #aaa;
}
.date-precision button[aria-pressed="true"] {
  background: #282626;
  color: #fff;
}
.date-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}
.date-heading > div {
  display: flex;
  gap: 4px;
}
.calendar-grid {
  display: grid;
  gap: 3px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.calendar-grid.day {
  grid-template-columns: repeat(7, minmax(0, 1fr));
}
.calendar-grid.day button {
  padding: 7px 0;
}
.calendar-grid button[aria-current="date"] {
  background: #282626;
  color: #fff;
}
.calendar-grid button:hover {
  outline: 1px solid #999;
}
.weekday {
  text-align: center;
  font-size: 12px;
  color: #777;
  padding: 8px 0;
}
.date-footer {
  display: flex;
  justify-content: space-between;
  border-top: 1px solid #ddd;
  margin-top: 12px;
  padding-top: 8px;
}
.date-footer button {
  font-size: 13px;
}
.date-popover button:focus-visible {
  outline: 2px solid #d40909;
  outline-offset: 1px;
}
@media (max-width: 600px) {
  .date-popover {
    width: min(300px, calc(100vw - 24px)) !important;
  }
  .select-trigger {
    min-height: 44px;
  }
}
