/* A single dropdown treatment for the public catalogs. */
.amethyst-select {
  --amethyst-select-bg: var(--white, #faf9f5);
  --amethyst-select-ink: var(--ink, #242325);
  --amethyst-select-line: #a99eae;
  --amethyst-select-active: #eee6f1;
  position: relative;
  display: block;
  min-width: 0;
  width: 100%;
}

.amethyst-select--dark {
  --amethyst-select-bg: #29272b;
  --amethyst-select-ink: #f4f0e8;
  --amethyst-select-line: #817984;
  --amethyst-select-active: #49404e;
}

.amethyst-select > select.amethyst-select__native,
.amethyst-select__name {
  position: absolute;
  width: 1px;
  height: 1px;
  min-width: 0;
  min-height: 0;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.amethyst-select > button.amethyst-select__control[type="button"] {
  position: relative;
  display: block;
  width: 100%;
  min-width: 0;
  min-height: 48px;
  margin: 0;
  padding: 11px 42px 11px 14px;
  border: 1px solid var(--amethyst-select-line);
  border-radius: 0;
  background: var(--amethyst-select-bg);
  color: var(--amethyst-select-ink);
  box-shadow: none;
  font: 400 16px/1.5 var(--sans, sans-serif);
  text-align: left;
  text-transform: none;
  letter-spacing: normal;
  cursor: pointer;
}

.amethyst-select .amethyst-select__control::after {
  position: absolute;
  top: calc(50% - 5px);
  right: 16px;
  width: 8px;
  height: 8px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg);
  content: "";
}

.amethyst-select .amethyst-select__control[aria-expanded="true"]::after {
  top: calc(50% - 1px);
  transform: rotate(225deg);
}

.amethyst-select .amethyst-select__control:focus,
.amethyst-select .amethyst-select__control:focus-visible {
  outline: none;
}

.amethyst-select .amethyst-select__control:focus-visible {
  background: var(--amethyst-select-active);
  box-shadow: none;
}

.amethyst-select .amethyst-select__control:disabled {
  opacity: .55;
  cursor: default;
}

.amethyst-select__value {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.amethyst-select__list {
  --amethyst-select-bg: var(--white, #faf9f5);
  --amethyst-select-ink: var(--ink, #242325);
  --amethyst-select-line: #a99eae;
  --amethyst-select-active: #eee6f1;
  position: fixed;
  z-index: 1000;
  margin: 0;
  padding: 4px 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  border: 1px solid var(--amethyst-select-line);
  border-radius: 0;
  background: var(--amethyst-select-bg);
  color: var(--amethyst-select-ink);
  box-shadow: 0 8px 24px rgba(24, 21, 27, .12);
  font: 400 16px/1.5 var(--sans, sans-serif);
}

.amethyst-select__list.amethyst-select--dark {
  --amethyst-select-bg: #29272b;
  --amethyst-select-ink: #f4f0e8;
  --amethyst-select-line: #817984;
  --amethyst-select-active: #49404e;
}

body[data-space-mode="dark"] [data-amethyst-select-context="blog"] {
  --amethyst-select-bg: #29272b;
  --amethyst-select-ink: #f4f0e8;
  --amethyst-select-line: #817984;
  --amethyst-select-active: #49404e;
}

.amethyst-select__list[hidden] {
  display: none;
}

.amethyst-select__option {
  min-height: 44px;
  padding: 10px 14px;
  cursor: pointer;
  overflow-wrap: anywhere;
}

.amethyst-select__option[aria-selected="true"] {
  font-weight: 600;
}

.amethyst-select__option.is-active {
  background: var(--amethyst-select-active);
}

.amethyst-select__option[aria-disabled="true"] {
  opacity: .45;
  cursor: default;
}

/* Line up the ultrasound group selector with the neighboring search field. */
.ap-uzi-filter-fields .amethyst-select {
  margin-top: 4px;
}

#amethyst-consultation-prices .ap-uzi-filter-fields:has(.amethyst-select) .ap-search {
  min-height: 48px;
}

/* Native fallback keeps square controls when scripting is unavailable. */
.doctor-directory-controls select,
.doctor-direction-mobile select,
.doctor-expertise-filters select,
.am-blog-page .am-blog-filters select {
  border-radius: 0;
}

.doctor-directory-controls select:focus,
.doctor-direction-mobile select:focus,
.doctor-expertise-filters select:focus,
.am-blog-page .am-blog-filters select:focus {
  outline: none;
  box-shadow: none;
}

.am-blog-page .am-blog-filters input:focus,
.am-blog-page .am-blog-filters input:focus-visible {
  outline: none;
  box-shadow: none;
}

.am-blog-page .am-blog-filters {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

@media (max-width: 650px) {
  .am-blog-page .am-blog-filters {
    grid-template-columns: minmax(0, 1fr);
  }
}
