.search {
    position: relative;

    @at-root .page--home & {
        margin-top: 30px;
    }
    &__input {
        position: relative;
        width: 100%;
        height: 48px;
        padding: 0 45px;
        box-sizing: border-box;
        line-height: 48px;
        font-family: inherit;
        border: 2px solid $grey-l;
        border-radius: 10px;
        transition: all 200ms ease-in-out;
        z-index: 2;

        @at-root .page--home & {
            height: 60px;
            padding: 0 75px;
            font-size: 16px;
            border-radius: 20px;
        }
        &:focus {
            border-color: transparent;
            box-shadow: 0 0 0 1px $blue, 0 0 0 5px transparentize($blue, 0.9);
        }
        &::placeholder {
            color: $grey-text-light;
        }
    }

    &__icon,
    &__icon.icon {
        position: absolute;
        top: 0;
        bottom: 0;
        height: 100%;
        height: 100%;
        display: flex;
        align-items: center;
        justify-content: center;
        color: $grey-text-light;
        cursor: pointer;
        z-index: 3;

        &--search {
            left: 15px;

            @at-root .page--home & {
                left: 30px;
            }
        }
        &--clear {
            right: 15px;

            @at-root .page--home & {
                right: 30px;
            }
        }
    }
    &:not(.search--active) .search__icon--clear {
        display: none;
    }

    .fa-times {
        @include icon(getAssetUrl('media/icons/times.svg'));
        background-color: $grey-text-light;
        width: 15px;
        height: 15px;
        position: absolute;
        top: 50%;
        right: 3%;
        transform: translate(50%,-50%);
    }

    #search-results {
        max-height: calc(100vh - 200px);
        position: absolute;
        left: 0;
        right: 0;
        top: 48px;
        padding: 20px;
        box-sizing: border-box;
        border-radius: 10px;
        background-color: white;
        box-shadow: 0 0 30px transparentize($black-l, 0.9);
        overflow: auto;
        transition: all 200ms ease-in-out;
        z-index: 1;

        @at-root .page--home & {
            top: 70px;
            max-height: calc(100vh - 310px);
            min-height: 230px;
        }
        &:empty {
            pointer-events: none;
            opacity: 0;
            transform: translateY(-30px);
        }
        li {
            font-size: 14px;
            font-weight: normal;
            line-height: 1.4em;
            padding: 20px 20px 0 20px;
            border-radius: 10px;
            transition: all 200ms ease-in-out;

            &::after {
                content: '';
                width: 100%;
                padding-top: 20px;
                margin: auto;
                display: block;
                border-bottom: 1px solid $blue-xl-border;
            }
            &:hover {
                background-color: $blue-xl;
            }
            &:last-child::after {
                border-bottom: none;
            }
        }
        p {
            word-break: break-all;
        }
        mark {
            background: transparent;
            font-weight: 600;
            color: $black;
            text-decoration: underline;
        }
        a {
            color: inherit;
        }
        .title {
            color: $blue;
            font-weight: 600;
            font-size: 16px;
            display: inline-block;
            margin-bottom: 10px;

            mark {
                color: $blue;
                font-weight: bold;
            }
        }
        .subtitle {
            margin-bottom: 10px;
        }
        .content p {
            margin: 5px 0;
        }
        .breadcrumbs {
            padding: 0;
            font-size: 12px;
            background-color: transparent;
            gap: 10px;
            margin: 0 0 20px 0;

            span {
                &:first-child::before {
                    display: none;
                }
                &::before {
                    margin-right: 10px;
                }
            }
        }
    }
}
