.vm-search-control {
    width: min(22rem, calc(100vw - 2rem));
    color: var(--vm-ink, #14261f);
    font-family: inherit;
}

.vm-search-toggle,
.vm-search-panel {
    border: 1px solid color-mix(in srgb, var(--vm-ink, #14261f) 16%, transparent);
    background: color-mix(in srgb, var(--vm-paper, #fffdf4) 94%, transparent);
    box-shadow: 0 12px 32px rgb(21 38 31 / 14%);
    backdrop-filter: blur(10px);
}

.vm-search-toggle {
    display: inline-flex;
    min-height: 2.75rem;
    align-items: center;
    gap: .55rem;
    padding: .55rem .8rem;
    border-radius: .75rem;
    color: inherit;
    font: inherit;
    font-weight: 750;
    cursor: pointer;
}

.vm-search-toggle svg {
    width: 1.15rem;
    height: 1.15rem;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-width: 2;
}

.vm-search-toggle:focus-visible,
.vm-search-input:focus-visible,
.vm-search-submit:focus-visible,
.vm-search-result:focus-visible,
.vm-search-source:focus-visible {
    outline: 3px solid #d8af58;
    outline-offset: 2px;
}

.vm-search-panel {
    margin-top: .55rem;
    padding: .85rem;
    border-radius: .9rem;
}

.vm-search-panel[hidden],
.vm-search-results[hidden] {
    display: none;
}

.vm-search-title {
    margin: 0 0 .65rem;
    font-size: .92rem;
    line-height: 1.5;
}

.vm-search-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: .45rem;
}

.vm-search-input,
.vm-search-submit {
    min-height: 2.75rem;
    border-radius: .65rem;
    font: inherit;
}

.vm-search-input {
    min-width: 0;
    border: 1px solid rgb(20 38 31 / 22%);
    background: #fff;
    color: #14261f;
    padding: .55rem .7rem;
}

.vm-search-submit {
    border: 0;
    background: #a52b1d;
    color: #fff;
    padding: .55rem .85rem;
    font-weight: 800;
    cursor: pointer;
}

.vm-search-submit:disabled {
    cursor: wait;
    opacity: .62;
}

.vm-search-status {
    min-height: 1.35rem;
    margin: .45rem 0 0;
    color: rgb(20 38 31 / 72%);
    font-size: .78rem;
}

.vm-search-results {
    max-height: min(17rem, 38vh);
    margin: .25rem 0 .45rem;
    padding: 0;
    overflow: auto;
    list-style: none;
}

.vm-search-results li + li {
    border-top: 1px solid rgb(20 38 31 / 10%);
}

.vm-search-result {
    display: block;
    width: 100%;
    padding: .65rem .2rem;
    border: 0;
    background: transparent;
    color: inherit;
    font: inherit;
    text-align: start;
    cursor: pointer;
}

.vm-search-result:hover {
    color: #8d2419;
}

.vm-search-result-name,
.vm-search-result-detail {
    display: block;
}

.vm-search-result-name {
    font-size: .87rem;
    line-height: 1.55;
}

.vm-search-result-detail {
    margin-top: .12rem;
    color: rgb(20 38 31 / 66%);
    font-size: .72rem;
    line-height: 1.55;
}

.vm-search-source {
    color: #6c3f18;
    font-size: .69rem;
    text-decoration-thickness: 1px;
    text-underline-offset: 2px;
}

@media (max-width: 680px) {
    .vm-search-control {
        width: min(18rem, calc(100vw - 4.75rem));
    }

    .vm-search-toggle span {
        max-width: 9rem;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .vm-search-panel {
        padding: .7rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .vm-search-control *,
    .vm-search-control *::before,
    .vm-search-control *::after {
        scroll-behavior: auto !important;
        transition-duration: .01ms !important;
    }
}
