button,
input,
select,
textarea {
  font: inherit;
}

button,
a,
input,
textarea,
select {
  -webkit-tap-highlight-color: transparent;
}

.toolbar {
  display: grid;
  gap: 14px;
  margin-bottom: 20px;
}

.search {
  position: relative;
  flex: 1;
}

.search svg {
  position: absolute;
  left: 16px;
  top: 15px;
  color: var(--muted);
}

.search input {
  padding-left: 48px;
  background: var(--surface);
  box-shadow: var(--field-shadow);
}

.search-actions {
  display: flex;
  gap: 8px;
}

.filters {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

input:not([type=checkbox]),
select,
textarea {
  display: block;
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  border: 1px solid transparent;
  border-radius: 12px;
  background: var(--surface-2);
  color: var(--ink);
  font-size: 16px;
}

textarea {
  resize: vertical;
}

input[type=checkbox] {
  width: 20px;
  height: 20px;
  accent-color: var(--accent);
  vertical-align: middle;
  margin-right: 10px;
}

label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 8px;
}

.field {
  margin-bottom: 20px;
}

.field:last-child {
  margin-bottom: 0;
}

.helptext {
  font-size: 13px;
  color: var(--muted);
}

.errorlist {
  list-style: none;
  padding: 0;
  margin: 8px 0;
  color: var(--danger);
  font-size: 14px;
}

.field-error input,
.field-error textarea {
  border-color: var(--danger);
}

.form-card {
  max-width: 680px;
}

.form-actions {
  display: flex;
  gap: 12px;
  margin-top: 26px;
}

#request-error {
  color: var(--danger);
  margin: 10px 0;
}

#request-error[hidden] {
  display: none;
}

@media(min-width:680px) {
  .toolbar {
    grid-template-columns: 1fr auto;
    align-items: center;
  }
}

@media(min-width:1024px) {
  .directory-row.selected {
    background: var(--surface-2);
  }
}

.search-actions {
  flex-wrap: wrap;
  min-width: 0;
}
.search-actions .search {
  flex: 1 1 180px;
  min-width: 0;
}
.search-actions select {
  flex: 1 1 140px;
  width: auto;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  clip-path: inset(50%);
  overflow: hidden;
}

.master-prices {
  border: 0;
  padding: 0;
  margin: 8px 0 0;
  min-width: 0;
}

.master-prices legend {
  padding: 0 0 4px;
  font-size: 15px;
  font-weight: 600;
}

.master-photo-preview {
  width: 160px;
  height: 160px;
  border-radius: 28px;
  object-fit: cover;
}
