/* Global search box and filter trigger. Keep search/filter UI here. */
.search {
  position: relative;
  display: inline-grid;
  align-items: center;
  min-width: 0;
}

.search input {
  width: 260px !important;
  height: var(--field-h);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 0 14px 0 34px !important;
  outline: 0;
  background-color: var(--panel);
  background-image: url("data:image/svg+xml,%3Csvg width='16' height='16' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='10.5' cy='10.5' r='6.5' stroke='%237b8797' stroke-width='2'/%3E%3Cpath d='M15.5 15.5L21 21' stroke='%237b8797' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: 11px 50%;
  background-size: 15px 15px;
  color: var(--text);
}

.search.has-search-filter input {
  box-sizing: border-box;
  padding-right: 44px !important;
}

.search input:focus {
  border-color: color-mix(in srgb, var(--accent) 48%, var(--line));
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 14%, transparent);
}

.filter-icon {
  width: 15px;
  height: 15px;
  position: relative;
  display: block;
}

.filter-icon::before {
  content: "";
  position: absolute;
  left: 1px;
  right: 1px;
  top: 3px;
  height: 1.5px;
  border-radius: 999px;
  background: currentColor;
  box-shadow:
    0 4.5px 0 currentColor,
    0 9px 0 currentColor;
}

.filter-icon::after {
  content: "";
  position: absolute;
  width: 3.5px;
  height: 3.5px;
  border-radius: 999px;
  background: var(--panel);
  border: 1.5px solid currentColor;
  left: 4px;
  top: 0.5px;
  box-shadow:
    5px 4.5px 0 -1.5px var(--panel),
    5px 4.5px 0 0 currentColor,
    1px 9px 0 -1.5px var(--panel),
    1px 9px 0 0 currentColor;
}

.search.has-search-filter > .payroll-search-filter {
  all: unset;
  box-sizing: border-box;
  position: absolute !important;
  right: 8px !important;
  top: 50% !important;
  width: 22px !important;
  height: 22px !important;
  display: grid;
  place-items: center;
  border: 0 !important;
  border-radius: 3px;
  padding: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  color: #64748b;
  transform: translateY(-50%) !important;
  cursor: pointer;
  z-index: 2;
}

.search.has-search-filter > .payroll-search-filter:hover,
.search.has-search-filter > .payroll-search-filter:focus-visible {
  border: 0 !important;
  background: color-mix(in srgb, var(--accent) 8%, transparent);
  box-shadow: none !important;
  color: var(--accent);
  outline: 0 !important;
}

body.loads-mode .search input {
  width: clamp(235px, 18vw, 285px) !important;
}
