.c-search-modal {
    position: fixed;
    inset: 0;
    z-index: 40;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding-top: 80px;
}

.c-search-modal[hidden] {
    display: none;
}

.c-search-modal__backdrop {
    position: absolute;
    inset: 0;
    background: linear-gradient(to right bottom, rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.1));
    backdrop-filter: blur(2px);
}

.c-search-modal__dialog {
    position: relative;
    z-index: 1;
    width: min(512px, 95vw);
    background: #fff;
    border-radius: 8px;
    box-shadow: rgba(0, 0, 0, 0.1) 0 20px 25px -5px, rgba(0, 0, 0, 0.1) 0 8px 10px -6px;
    color: #000;
    font-family: ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
    font-size: 15px;
    font-weight: 400;
    line-height: 1.5;
}

.c-search-modal__bar {
    display: flex;
    align-items: center;
    padding: 20px 16px;
    background: #fff;
    border-radius: 8px;
}

@media (min-width: 40em) {
    .c-search-modal__bar {
        padding: 20px 28px;
    }
}

.c-search-modal__dialog.has-results .c-search-modal__bar {
    border-radius: 8px 8px 0 0;
    box-shadow: rgba(0, 0, 0, 0.1) 0 1px 3px 0, rgba(0, 0, 0, 0.1) 0 1px 2px -1px;
}

.c-search-modal__icon,
.c-search-modal__clear {
    flex: 0 0 auto;
    width: 16px;
    height: 16px;
    margin-right: 12px;
    color: #171717;
}

.c-search-modal__clear {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
}

.c-search-modal__clear[hidden],
.c-search-modal__icon[hidden] {
    display: none;
}

.c-search-modal__icon svg,
.c-search-modal__clear svg {
    display: block;
    width: 16px;
    height: 16px;
}

.c-search-modal__input {
    flex: 1;
    min-width: 0;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    color: #000;
    font: inherit;
    font-size: 16.5px;
    line-height: 1.5;
    outline: none;
    appearance: none;
}

.c-search-modal__input::placeholder {
    color: #a3a3a3;
}

.c-search-modal__input::-webkit-search-decoration,
.c-search-modal__input::-webkit-search-cancel-button,
.c-search-modal__input::-webkit-search-results-button,
.c-search-modal__input::-webkit-search-results-decoration {
    display: none;
}

.c-search-modal__cancel {
    display: none;
    flex: 0 0 auto;
    margin-left: 12px;
    padding: 0;
    border: 0;
    background: transparent;
    color: #737373;
    font: inherit;
    font-size: 14px;
    line-height: 1.5;
    cursor: pointer;
}

@media (max-width: 39.99em) {
    .c-search-modal__cancel {
        display: block;
    }
}

.c-search-modal__results,
.c-search-modal__status {
    max-height: calc(100vh - 172px);
    overflow-y: auto;
}

@media (min-width: 40em) {
    .c-search-modal__results,
    .c-search-modal__status {
        max-height: 70vh;
    }
}

.c-search-modal__status {
    padding: 16px 28px;
    color: #a3a3a3;
    font-size: 16.5px;
    line-height: 1.5;
}

.c-search-modal__group {
    padding: 12px 16px 0;
    border-top: 1px solid #e5e7eb;
}

@media (min-width: 40em) {
    .c-search-modal__group {
        padding-right: 28px;
        padding-left: 28px;
    }
}

.c-search-modal__label {
    margin-bottom: 4px;
    color: #a3a3a3;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.3px;
    line-height: 18px;
    text-transform: uppercase;
}

.c-search-modal a,
.c-search-modal a:hover,
.c-search-modal a:focus {
    color: inherit;
    transition: none;
}

.c-search-modal__option {
    display: block;
    margin: 0 -16px;
    padding: 12px 16px;
    cursor: pointer;
}

@media (min-width: 40em) {
    .c-search-modal__option {
        margin: 0 -28px;
        padding: 12px 28px;
    }
}

.c-search-modal__option.is-selected,
.c-search-modal__option:hover {
    background: #f5f5f5;
}

.c-search-modal__option--person,
.c-search-modal__option--tag {
    display: flex;
    align-items: center;
}

.c-search-modal__avatar {
    flex: 0 0 auto;
    width: 28px;
    height: 28px;
    margin-right: 8px;
    border-radius: 50%;
    background: #d4d4d4;
    object-fit: cover;
}

.c-search-modal__name,
.c-search-modal__title {
    color: #171717;
    font-size: 16.5px;
    font-weight: 500;
    line-height: 1.25;
}

.c-search-modal__name {
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.c-search-modal__hash {
    flex: 0 0 auto;
    margin: 0 8px 0 0;
    color: #a3a3a3;
    font-size: 14px;
    font-weight: 700;
    line-height: 21px;
}

.c-search-modal__title b,
.c-search-modal__excerpt b {
    font-weight: 700;
}

.c-search-modal__title b {
    color: #171717;
}

.c-search-modal__excerpt {
    margin: 0;
    overflow: hidden;
    color: #a3a3a3;
    font-size: 14px;
    font-weight: 400;
    line-height: 21px;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.c-search-modal__more {
    display: block;
    width: calc(100% - 32px);
    margin: 12px 16px;
    padding: 10px;
    border: 1px solid #e5e5e5;
    border-radius: 4px;
    background: transparent;
    color: #262626;
    font: inherit;
    font-weight: 600;
    line-height: 1.5;
    cursor: pointer;
}

@media (min-width: 40em) {
    .c-search-modal__more {
        width: calc(100% - 56px);
        margin-right: 28px;
        margin-left: 28px;
    }
}

.c-search-modal__more:hover {
    border-color: #d4d4d4;
    color: #000;
}
