/* Prescribed list search — scoped to .mn-prostheses */

.mn-prostheses {
  /* Figma-aligned palette (inputs + primary button) */
  --mn-prostheses-border: #d9dce7;
  --mn-prostheses-primary: #6f4cf3;
  --mn-prostheses-primary-hover: #5c3de9;
  --mn-prostheses-accent: #6f4cf3;
  --mn-prostheses-text: #1a1a1a;
  --mn-prostheses-muted: #555;
  --mn-prostheses-deleted-bg: #e8e8e8;
  --mn-prostheses-partd: #b00020;
  color: var(--mn-prostheses-text);
  max-width: 100%;
  background: #f7f9fd;
  padding: 1.25rem;
  border-radius: 16px;
}

.mn-prostheses__section {
  margin-bottom: 2rem;
}

.mn-prostheses__heading {
  font-size: 1.15rem;
  margin: 0 0 1rem;
  font-weight: 700;
}

.mn-prostheses__grid {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.mn-prostheses__field {
  flex: 1 1 280px;
}

.mn-prostheses__label {
  display: block;
  font-weight: 700;
  margin-bottom: 0.35rem;
}

.mn-prostheses__hint {
  margin: 0 0 0.5rem;
  font-size: 0.9rem;
  color: var(--mn-prostheses-muted);
}

.mn-prostheses__input,
.mn-prostheses__select {
  width: 100%;
  max-width: 28rem;
  padding: 0 1rem;
  min-height: 48px;
  border: 1px solid var(--mn-prostheses-border);
  border-radius: 9999px;
  font: inherit;
  background: #fff;
  color: inherit;
}

.mn-prostheses__input:focus,
.mn-prostheses__select:focus,
.mn-prostheses__button:focus {
  outline: 3px solid rgba(111, 76, 243, 0.35);
  outline-offset: 2px;
}

.mn-prostheses__combobox {
  position: relative;
  max-width: 28rem;
}

.mn-prostheses__listbox {
  position: absolute;
  left: 0;
  right: 0;
  z-index: 40;
  max-height: 14rem;
  overflow-y: auto;
  margin: 0.15rem 0 0;
  padding: 0;
  list-style: none;
  border: 1px solid var(--mn-prostheses-border);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.mn-prostheses__listbox--hidden {
  display: none;
}

.mn-prostheses__option {
  padding: 0.45rem 0.65rem;
  cursor: pointer;
}

.mn-prostheses__option:hover,
.mn-prostheses__option.is-active {
  background: rgba(111, 76, 243, 0.12);
}

.mn-prostheses__actions {
  margin-top: 1.25rem;
  text-align: center;
}

.mn-prostheses__button {
  cursor: pointer;
  min-height: 3rem;
  padding: 0.65rem 1.35rem;
  border: none;
  border-radius: 9999px;
  font-weight: 700;
  font-size: 0.95rem;
  font-family: inherit;
  background: var(--mn-prostheses-primary);
  color: #fff;
}

.mn-prostheses__button:hover {
  background: var(--mn-prostheses-primary-hover);
}

.mn-prostheses__button:active {
  background: var(--mn-prostheses-primary-hover);
  color: #fff;
}

.mn-prostheses__divider {
  text-align: center;
  font-weight: 700;
  margin: 2rem 0;
}

.mn-prostheses__status--error {
  color: var(--mn-prostheses-partd);
  font-weight: 600;
  margin: 0.5rem 0 0;
}

.mn-prostheses__results {
  margin-top: 2rem;
  scroll-margin-top: 1rem;
}

.mn-prostheses__results:focus {
  outline: none;
}

/* Results block */
.mn-prostheses-result__nav {
  margin: 1rem 0;
}

.mn-prostheses-result__link {
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.mn-prostheses-result__link:focus {
  outline: 3px solid var(--mn-prostheses-accent);
  outline-offset: 2px;
}

.mn-prostheses-result__title {
  font-size: 1.05rem;
  margin: 1rem 0;
}

.mn-prostheses-result__title--summary {
  color: #6b1a1a;
}

.mn-prostheses-result__table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.mn-prostheses-result__partd {
  color: var(--mn-prostheses-partd);
}

.mn-prostheses-result__disclaimer {
  margin: 2rem 0 1rem;
  font-size: 0.9rem;
  line-height: 1.5;
}

.mn-prostheses-result__footer .mn-prostheses-result__nav {
  text-align: center;
}

/* Match legacy .pha table container if parent styles expect it */
.mn-prostheses-result__table-wrap.table-container {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* Screen reader only (front-end; theme may not load admin styles) */
.mn-prostheses .screen-reader-text,
.mn-prostheses-result .screen-reader-text {
  border: 0;
  clip: rect(1px, 1px, 1px, 1px);
  clip-path: inset(50%);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute;
  width: 1px;
  word-wrap: normal !important;
}

.mn-prostheses--placeholder {
  padding: 1rem;
  border: 1px dashed #ccc;
}
