/* DFS Catalog — Live Search v0.5.3 */

.dfs-header-search-form {
  position: relative;
}

.dfs-live-search {
  position: absolute;
  z-index: calc(var(--dfs-z-dropdown) + 5);
  top: calc(100% + 10px);
  right: 0;
  left: 0;
  overflow: hidden;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 22px 48px rgb(15 23 42 / 16%);
}

.dfs-live-search[hidden] {
  display: none;
}

.dfs-live-search__message {
  padding: 1rem 1.1rem;
  color: #526071;
  font-size: 0.92rem;
  line-height: 1.45;
}

.dfs-live-search__message.is-loading::before {
  display: inline-block;
  width: 12px;
  height: 12px;
  margin-right: 8px;
  border: 2px solid #d8e1ef;
  border-top-color: var(--dfs-color-brand);
  border-radius: 50%;
  content: "";
  vertical-align: -1px;
  animation: dfs-search-spin 0.72s linear infinite;
}

@keyframes dfs-search-spin {
  to { transform: rotate(360deg); }
}

.dfs-live-search__items {
  display: grid;
}

.dfs-live-search__item,
.dfs-live-search__item:visited {
  display: grid;
  min-width: 0;
  grid-template-columns: 58px minmax(0, 1fr) auto;
  gap: 0.85rem;
  align-items: center;
  padding: 0.8rem 1rem;
  border-bottom: 1px solid #edf1f6;
  color: #101828;
  text-decoration: none;
}

.dfs-live-search__item:hover,
.dfs-live-search__item:focus-visible {
  background: #f7f9fc;
  color: #101828;
}

.dfs-live-search__image {
  display: block;
  width: 58px;
  height: 58px;
  object-fit: contain;
  border-radius: 9px;
  background: #f5f7fb;
}

.dfs-live-search__image--placeholder {
  border: 1px solid #e7ebf1;
}

.dfs-live-search__item-copy {
  display: grid;
  min-width: 0;
  gap: 0.18rem;
}

.dfs-live-search__category {
  overflow: hidden;
  color: var(--dfs-color-brand-active);
  font-size: 0.68rem;
  font-weight: var(--dfs-weight-bold);
  letter-spacing: 0.055em;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.dfs-live-search__name {
  overflow: hidden;
  color: #101828;
  font-size: 0.92rem;
  font-weight: var(--dfs-weight-bold);
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dfs-live-search__price {
  justify-self: end;
  padding-left: 1.25rem;
  color: #101828;
  font-size: 0.9rem;
  font-weight: var(--dfs-weight-bold);
  white-space: nowrap;
}

.dfs-live-search__all,
.dfs-live-search__all:visited {
  display: flex;
  min-height: 48px;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.8rem 1rem;
  color: var(--dfs-color-brand-active);
  font-size: 0.85rem;
  font-weight: var(--dfs-weight-bold);
  text-decoration: none;
}

.dfs-live-search__all:hover,
.dfs-live-search__all:focus-visible {
  background: #f7f9fc;
  color: var(--dfs-color-brand-active);
}

/* Shop search stays full-width, but suggestions remain compact and readable. */
.dfs-shop-search .dfs-live-search {
  max-height: min(460px, 62vh);
  overflow-y: auto;
}

.dfs-shop-search .dfs-live-search__item {
  min-height: 78px;
}

.dfs-mobile-drawer__search .dfs-live-search {
  position: static;
  margin-top: 0.55rem;
  border-color: rgb(255 255 255 / 15%);
  background: #fff;
}


@media (max-width: 640px) {
  .dfs-live-search {
    top: calc(100% + 7px);
    border-radius: 12px;
  }

  .dfs-live-search__item,
  .dfs-live-search__item:visited {
    grid-template-columns: 50px minmax(0, 1fr);
    gap: 0.7rem;
    padding: 0.7rem 0.8rem;
  }

  .dfs-live-search__image {
    width: 50px;
    height: 50px;
  }

  .dfs-live-search__price {
    grid-column: 2;
    justify-self: start;
    padding-left: 0;
    font-size: 0.8rem;
  }

}

@media (prefers-reduced-motion: reduce) {
  .dfs-live-search__message.is-loading::before {
    animation: none;
  }
}
