.site-search-mobile {
    display: none;
}

.site-search-dialog:not([open]) {
    display: none;
}

.site-search-dialog {
    position: fixed;
    inset: 0;
    width: min(690px, calc(100% - 28px));
    max-height: calc(100dvh - 28px);
    margin: auto;
    padding: 0;
    border: 0;
    border-radius: 16px;
    background: #fff;
    color: #121212;
    box-shadow: 0 18px 60px rgba(0, 0, 0, .22);
    overflow: auto;
}

.site-search-dialog::backdrop {
    background: rgba(17, 17, 17, .55);
}

html:has(.site-search-dialog[open]) {
    overflow: hidden;
}

.site-search-panel {
    padding: clamp(16px, 4vw, 32px);
}

.site-search-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 18px;
}

.site-search-panel-header h2,
.site-search-page h1 {
    margin: 0;
    color: #121212;
    font-size: clamp(25px, 4vw, 36px);
    line-height: 1.2;
}

.site-search-close {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: #f1f1f1;
    cursor: pointer;
}

.site-search-close img {
    width: 20px;
    height: 20px;
    filter: brightness(0);
}

.site-search-form {
    margin: 0;
}

.site-search-label {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    clip-path: inset(50%);
    overflow: hidden;
    white-space: nowrap;
}

.site-search-fields {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
}

.site-search-fields input[type="search"],
.site-search-fields button {
    min-height: 48px;
    margin: 0;
    border: 1px solid #79736e;
    border-radius: 10px;
    font-size: 16px;
    line-height: 1.3;
}

.site-search-fields input[type="search"] {
    width: 100%;
    padding: 10px 12px;
    background: #fff;
    color: #121212;
}

.site-search-fields input::placeholder {
    color: #625b57;
    opacity: 1;
}

.site-search-fields button {
    padding: 0 18px;
    border-color: #121212;
    background: #121212;
    color: #fff;
    font-weight: 600;
    cursor: pointer;
}

.site-search-fields button:hover {
    background: #343434;
}

.site-search-quick {
    margin-top: 24px;
}

.site-search-quick > p,
.site-search-quick > h2 {
    margin: 0 0 10px;
    color: #312a26;
    font-size: 15px;
    font-weight: 600;
}

.site-search-chips,
.site-search-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.site-search-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.site-search-chips a {
    display: flex;
    align-items: center;
    min-height: 44px;
    padding: 8px 12px;
    border-radius: 8px;
    background: #f5f1ee;
    color: #28201c;
    font-size: 15px;
    line-height: 1.25;
}

.site-search-chips a:hover,
.site-search-close:hover,
.site-search-mobile:hover {
    background: #fbe7da;
    color: #121212;
}

.site-search-page {
    width: min(100%, 820px);
    min-height: 42vh;
    margin-inline: auto;
    padding-top: clamp(28px, 6vw, 62px);
    padding-bottom: clamp(40px, 7vw, 84px);
}

.site-search-page h1 {
    margin-bottom: 20px;
}

.site-search-suggested,
.site-search-results,
.site-search-empty {
    margin-top: 30px;
}

.site-search-suggested {
    padding: clamp(14px, 3vw, 22px);
    border-radius: 12px;
    background: #fcf2eb;
}

.site-search-suggested h2,
.site-search-results h2,
.site-search-empty h2 {
    margin: 0 0 6px;
    color: #121212;
    font-size: 21px;
    line-height: 1.3;
}

.site-search-list li {
    padding: 12px 0;
    overflow-wrap: anywhere;
}

.site-search-list li + li {
    border-top: 1px solid #e1dcd7;
}

.site-search-suggested li:last-child {
    padding-bottom: 0;
}

.site-search-list a,
.site-search-empty a {
    color: #763514;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.site-search-list a {
    font-size: 17px;
    font-weight: 600;
}

.site-search-list p,
.site-search-empty p {
    margin: 4px 0 0;
    color: #423c38;
    font-size: 15px;
    line-height: 1.55;
    overflow-wrap: anywhere;
}

.site-search-pagination {
    margin-top: 16px;
    color: #423c38;
    line-height: 1.8;
}

.site-search-pagination a {
    color: #763514;
    text-decoration: underline;
}

.site-search-dialog :focus-visible,
.site-search-page :focus-visible,
.site-search-mobile:focus-visible {
    outline: 2px solid #7a3818;
    outline-offset: 2px;
}

@media (max-width: 991.98px) {
    .site-search-mobile {
        position: absolute;
        top: 50%;
        right: 0;
        z-index: 121;
        display: grid;
        place-items: center;
        width: 44px;
        height: 44px;
        transform: translateY(-50%);
        border-radius: 50%;
        background: #f1f1f1;
    }

    .site-search-mobile img {
        width: 22px;
        height: 22px;
    }
}

.site-search-live {
    margin-top: 8px;
    padding: 6px 12px;
    border: 1px solid #e1dcd7;
    border-radius: 10px;
    background: #fffaf6;
}

.site-search-dialog .site-search-live {
    max-height: 42dvh;
    overflow: auto;
    overscroll-behavior: contain;
}

.site-search-live-heading,
.site-search-live-message {
    margin: 5px 8px 2px;
    color: #423c38;
    font-size: 14px;
    line-height: 1.45;
}

.site-search-live-heading {
    font-weight: 600;
}

.site-search-live ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.site-search-live ul + .site-search-live-heading {
    margin-top: 10px;
    padding-top: 8px;
    border-top: 1px solid #e1dcd7;
}

.site-search-live a {
    display: block;
    min-height: 44px;
    padding: 9px 8px;
    border-radius: 6px;
    color: #763514;
    font-size: 15px;
    line-height: 1.45;
    text-decoration: underline;
    text-underline-offset: 3px;
    overflow-wrap: anywhere;
}

.site-search-live a:hover,
.site-search-live a:focus-visible {
    background: #fbe7da;
}
