/* v470: magnifier chip and the slim field that replaces it.
   Same light gold outline as the category chips. The open field
   leaves the next chip cut off at the edge. Motion stays off when
   the visitor asked for less. */

.lib-search {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  min-width: 44px;
  min-height: 44px;
}

.lib-search-chip.lib-chip {
  width: 44px;
  min-width: 44px;
  height: 44px;
  min-height: 44px;
  padding: 0;
  justify-content: center;
  gap: 0;
}

.lib-search-icon {
  width: 15px;
  height: 15px;
}

.lib-chips > .lib-search.is-open {
  width: min(16.5rem, calc(100% - 46px));
  max-width: calc(100% - 46px);
}

.lib-search-field {
  position: relative;
  z-index: 0;
  display: flex;
  align-items: center;
  box-sizing: border-box;
  width: 100%;
  height: 44px;
  min-height: 44px;
  padding: 0 0 0 0.9rem;
  border: 0;
  background: transparent;
  color: #f8e7a8;
}

.lib-search-field[hidden],
.lib-search-chip[hidden],
.lib-search-empty[hidden] {
  display: none !important;
}

.lib-search-field::before {
  content: "";
  position: absolute;
  z-index: -1;
  left: 0;
  right: 0;
  top: 50%;
  height: 35px;
  transform: translateY(-50%);
  border: 1px solid #f3dc9a;
  border-radius: 999px;
  background: #000;
  pointer-events: none;
}

.lib-search-input {
  flex: 1 1 auto;
  width: 100%;
  min-width: 0;
  height: 44px;
  margin: 0;
  padding: 0;
  border: 0;
  outline: 0;
  background: transparent;
  box-shadow: none;
  color: #f8e7a8;
  font-family: var(--body, Outfit, system-ui, sans-serif);
  font-size: 0.98rem;
  font-weight: 300;
  line-height: 1.2;
  letter-spacing: 0.01em;
  caret-color: #e8c878;
  -webkit-appearance: none;
  appearance: none;
}

.lib-search-input::-webkit-search-decoration,
.lib-search-input::-webkit-search-cancel-button,
.lib-search-input::-webkit-search-results-button {
  display: none;
  -webkit-appearance: none;
}

.lib-search-input::placeholder {
  color: rgba(248, 231, 168, 0.46);
  font-weight: 300;
}

.lib-search-close {
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  margin: 0;
  padding: 0 0.15rem 0 0;
  border: 0;
  background: transparent;
  color: #e8c878;
  font-family: var(--body, Outfit, system-ui, sans-serif);
  font-size: 1.15rem;
  font-weight: 300;
  line-height: 1;
  cursor: pointer;
}

.lib-search-chip:focus-visible,
.lib-search-close:focus-visible,
.lib-search-input:focus-visible {
  outline: 2px solid #e8c878;
  outline-offset: 2px;
}

.lib-search-empty {
  margin: 0.85rem 0 0;
  color: rgba(246, 237, 211, 0.72);
  font-family: var(--body, Outfit, system-ui, sans-serif);
  font-size: 1.02rem;
  font-weight: 300;
  line-height: 1.45;
}

@media (prefers-reduced-motion: no-preference) {
  .lib-search.is-open .lib-search-field {
    animation: lib-search-in 160ms ease;
  }
}

@keyframes lib-search-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .lib-search,
  .lib-search-field,
  .lib-search-chip,
  .lib-search-close,
  .lib-search-empty {
    transition: none;
    animation: none;
  }
}
