/* Master search: header box, mobile icon and autocomplete list. */

.ms-desktop {
  display: none;
}

.ms-mobile-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  color: var(--ink);
}

@media (min-width: 640px) {
  .ms-desktop {
    display: block;
    flex: 1 1 auto;
    min-width: 0;
    max-width: 340px;
  }

  .ms-mobile-btn {
    display: none;
  }
}

@media (min-width: 1280px) {
  .ms-desktop {
    max-width: 280px;
  }
}

.ms {
  position: relative;
  width: 100%;
}

.ms-field {
  position: relative;
}

.ms-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  pointer-events: none;
}

.ms-input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--paper);
  color: var(--ink);
  font: inherit;
  font-size: 15px;
  padding: 10px 16px 10px 42px;
  outline: none;
}

.ms-input::placeholder {
  color: var(--muted);
}

.ms-input:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(14, 42, 84, 0.15);
}

.ms-list {
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  margin-top: 8px;
  z-index: 80;
  max-height: 70vh;
  overflow-y: auto;
  list-style: none;
  padding: 8px 0;
  margin-bottom: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 24px 40px -20px rgba(0, 0, 0, 0.35);
}

.ms-item a {
  display: block;
  padding: 10px 16px;
  color: inherit;
  text-decoration: none;
}

.ms-item.is-active a,
.ms-item a:hover {
  background: var(--paper);
}

.ms-name {
  display: block;
  font-weight: 600;
  color: var(--ink);
}

.ms-meta {
  display: block;
  font-size: 14px;
  color: var(--muted);
}

.ms-empty {
  padding: 12px 16px;
  font-size: 14px;
  color: var(--muted);
}

.ms-empty a {
  font-weight: 600;
  color: var(--brand);
}
