/*
 * NWT_WasmSearch dropdown. Plain CSS so it works in any theme. Override the
 * custom properties in the theme to change the colours.
 */
.nwt-wasmsearch {
    --nwt-wasmsearch-background: #fff;
    --nwt-wasmsearch-border: #c2c2c2;
    --nwt-wasmsearch-active: #f0f0f0;
    --nwt-wasmsearch-muted: #666;

    position: absolute;
    z-index: 1000;
    box-sizing: border-box;
    max-height: 70vh;
    margin: 0;
    padding: 4px 0;
    overflow-y: auto;
    list-style: none;
    text-align: left;
    background: var(--nwt-wasmsearch-background);
    border: 1px solid var(--nwt-wasmsearch-border);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.nwt-wasmsearch[hidden] {
    display: none;
}

.nwt-wasmsearch__item,
.nwt-wasmsearch__all {
    margin: 0;
    cursor: pointer;
}

.nwt-wasmsearch__item a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 10px;
    color: inherit;
    text-decoration: none;
}

.nwt-wasmsearch__image {
    flex: none;
    width: 40px;
    height: 40px;
    object-fit: contain;
}

.nwt-wasmsearch__name {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.nwt-wasmsearch__price {
    flex: none;
    font-weight: 600;
    white-space: nowrap;
}

.nwt-wasmsearch__all {
    margin-top: 4px;
    padding: 8px 10px;
    color: var(--nwt-wasmsearch-muted);
    border-top: 1px solid var(--nwt-wasmsearch-border);
}

.nwt-wasmsearch .is-active {
    background: var(--nwt-wasmsearch-active);
}

.nwt-wasmsearch mark {
    font-weight: 700;
    color: inherit;
    background: none;
}

/* Read by screen readers, not shown. */
.nwt-wasmsearch__status {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}
