.search-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, .95);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity .35s cubic-bezier(.4, 0, .2, 1);
    visibility: hidden;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
}

.search-modal.show {
    opacity: 1;
    pointer-events: auto;
    visibility: visible;
}

.search-modal.hide {
    opacity: 0;
    pointer-events: none;
    visibility: hidden;
}

.search-modal-content {
    background: #fff;
    width: 100%;
    height: 100vh;
    height: 100dvh;
    position: relative;
    overflow: hidden;
    opacity: 0;
    transform: scale(.96) translateY(30px);
    transition: opacity .35s cubic-bezier(.4, 0, .2, 1), transform .35s cubic-bezier(.4, 0, .2, 1);
}

.search-modal.show .search-modal-content {
    opacity: 1;
    transform: scale(1) translateY(0);
}

.search-modal.hide .search-modal-content {
    opacity: 0;
    transform: scale(.96) translateY(30px);
}

.search-modal-body {
    padding: 0;
    height: 100%;
    overflow: hidden;
    position: relative;
    display: flex;
    flex-direction: column;
}

.search-modal-scroll {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 6rem;
    touch-action: pan-y;
    padding-top: 0;
}

.search-header-row {
    z-index: 1;
    width: 100%;
    flex-shrink: 0;
    background-color: #fff;
    padding: calc(.5rem + env(safe-area-inset-top, 0px)) 4px 4px;
}

.search-header-row__inner {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 2px 0 2px 12px;
}

.search-modal-body .search-button {
    border: none;
    cursor: pointer;
    background: transparent;
    display: flex;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    padding: 12px;
    margin: 0;
    color: #0c0c0c;
    -webkit-tap-highlight-color: transparent;
}

.search-modal-body .search-button svg {
    width: 24px;
    height: 24px;
    display: block;
}

.mobile-search-form {
    flex: 1 1 auto;
    min-width: 0;
    direction: rtl;
}

.mobile-search-field {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0;
    width: 100%;
    min-width: 0;
    padding: 0 .5rem 0 1rem;
    border: 0;
    border-radius: .5rem;
    background: #f5f5f7;
    transition: background-color .15s ease;
}

.mobile-search-field:focus-within {
    background: #eee;
}

.mobile-search-form .search-input {
    flex: 1 1 auto;
    width: 100%;
    min-width: 0;
    height: 40px;
    margin: 0;
    padding: 0 8px;
    border: 0;
    outline: 0;
    border-radius: 0;
    background: transparent;
    font-size: .75rem;
    line-height: 1.4;
    color: #101010;
    direction: rtl;
    box-sizing: border-box;
}

.mobile-search-form .search-input::placeholder {
    font-size: .75rem;
    font-weight: 400;
    color: #53565a;
    opacity: 1;
}

.mobile-search-icon {
    display: flex;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    color: #81858b;
    pointer-events: none;
}

.mobile-search-icon svg {
    width: 100%;
    height: 100%;
    display: block;
}

.mobile-search-form .search-loading {
    display: flex;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    color: #81858b;
}

.mobile-search-form .search-loading i {
    font-size: 1.2rem;
    animation: 1s linear infinite search-modal-spin;
}

@keyframes search-modal-spin {
    from {
        transform: rotate(0);
    }

    to {
        transform: rotate(360deg);
    }
}

#mobileSearchSuggest {
    width: 100%;
    min-height: 0;
}

.search-modal .desktop-search-popular {
    padding: 8px 1rem 12px;
}

@media screen and (max-width:991.98px) {
    .search-modal,
    .search-modal-content {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
    }

    .search-modal {
        width: 100vw !important;
        height: 100vh !important;
        height: 100dvh !important;
        max-height: 100vh !important;
        max-height: 100dvh !important;
        overflow: hidden;
        touch-action: none;
    }

    .search-modal-content {
        width: 100% !important;
        height: 100vh !important;
        height: 100dvh !important;
        max-height: 100vh !important;
        max-height: 100dvh !important;
    }

    .search-modal-body {
        height: 100%;
        max-height: 100vh;
        max-height: 100dvh;
        overflow: hidden;
    }

    .search-modal-scroll {
        -webkit-overflow-scrolling: touch;
    }
}
