/* ===== Medicine Directory — Page-specific overrides ===== */

/* Toolbar right group */
.md-toolbar-right {
  display: flex; gap: 0.5rem; align-items: center; flex-wrap: wrap;
}

/* Medicine card form/strength line */
.md-card-strength {
  font-size: 0.6875rem; font-weight: 500; color: var(--muted-fg);
  margin-bottom: 0.5rem;
}

/* Manufacturer link inside card */
.md-card-mfr {
  font-size: 0.6875rem; color: var(--muted-fg); font-weight: 500;
  margin-bottom: 0.5rem; display: block;
}
.md-card-mfr a {
  color: var(--primary); text-decoration: none;
}
.md-card-mfr a:hover {
  text-decoration: underline;
}

/* Dosage form icon in card */
.md-card-form-icon {
  width: 2.5rem; height: 2.5rem; border-radius: 0.625rem;
  background: var(--secondary); color: var(--primary);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}

/* Searchable category dropdown (matches .br-sort toolbar controls) */
.md-select {
  position: relative; min-width: 11rem;
}
.md-select__trigger {
  display: inline-flex; align-items: center; justify-content: space-between;
  gap: 0.5rem; min-width: 11rem; cursor: pointer;
}
.md-select__trigger[aria-expanded="true"] .md-select__chevron {
  transform: rotate(180deg);
}
.md-select__chevron {
  flex-shrink: 0; color: var(--muted-fg); transition: transform 0.2s;
}
.md-select__label {
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.md-select__panel {
  position: absolute; top: calc(100% + 0.35rem); right: 0; z-index: 40;
  width: min(18rem, calc(100vw - 2rem));
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: 0 8px 24px -8px hsla(174, 30%, 20%, 0.18);
  overflow: hidden;
}
.md-select__search-wrap {
  display: flex; align-items: center; gap: 0.5rem;
  padding: 0.5rem 0.625rem; border-bottom: 1px solid var(--border);
  background: var(--card);
}
.md-select__search-wrap svg {
  flex-shrink: 0; color: var(--muted-fg);
}
.md-select__search {
  width: 100%; border: 0; outline: none; background: transparent;
  font-size: 0.8125rem; color: var(--fg);
}
.md-select__search::placeholder { color: var(--muted-fg); }
.md-select__list {
  list-style: none; margin: 0; padding: 0.25rem 0;
  max-height: 14rem; overflow-y: auto; overscroll-behavior: contain;
}
.md-select__option {
  padding: 0.5rem 0.75rem; font-size: 0.8125rem; color: var(--fg);
  cursor: pointer; line-height: 1.35;
}
.md-select__option:hover,
.md-select__option.is-focused {
  background: var(--muted);
}
.md-select__option.is-active {
  background: hsla(174, 55%, 40%, 0.1); color: var(--primary); font-weight: 600;
}
.md-select__option.is-hidden { display: none; }
.md-select__empty {
  padding: 0.75rem; font-size: 0.75rem; color: var(--muted-fg); text-align: center;
}
