.fav-dropdown {
    width: 22rem;
    max-width: 92vw;
    border: 0;
    border-radius: 0.75rem;
    box-shadow: 0 1rem 2.5rem rgba(0, 0, 0, 0.18);
    overflow: hidden;
}

.fav-dropdown__head {
    padding: 0.85rem 1rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.07);
}

.fav-dropdown__list {
    max-height: 360px;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: thin;
}

.fav-dropdown__list::-webkit-scrollbar {
    width: 6px;
}

.fav-dropdown__list::-webkit-scrollbar-thumb {
    background: #d3d8e0;
    border-radius: 6px;
}

.fav-clear {
    font-size: 0.75rem;
    font-weight: 600;
    color: #ff4252;
    background: transparent;
    border: 0;
    padding: 0;
    cursor: pointer;
}

.fav-clear:hover {
    text-decoration: underline;
}

.fav-filter-wrap {
    padding: 0.6rem 1rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.07);
}

.fav-item {
    display: flex;
    align-items: center;
    padding: 0.6rem 1rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    transition: background 0.2s;
}

.fav-item:hover {
    background: #f7f8fa;
}

.fav-item__img {
    width: 48px;
    height: 48px;
    flex-shrink: 0;
    object-fit: cover;
    border-radius: 0.5rem;
    border: 1px solid rgba(0, 0, 0, 0.08);
}

.fav-item__name {
    flex: 1;
    min-width: 0;
    margin: 0 0.75rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: #373f50;
    text-decoration: none;
}

.fav-item__name:hover {
    color: #fe696a;
    text-decoration: none;
}

.fav-remove {
    flex-shrink: 0;
    width: 30px;
    height: 30px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #7d879c;
    background: transparent;
    border: 0;
    border-radius: 50%;
    cursor: pointer;
    transition:
        background 0.2s,
        color 0.2s;
}

.fav-remove:hover {
    color: #fff;
    background: #ff4252;
}

.fav-empty {
    padding: 2rem 1rem;
    text-align: center;
    color: #7d879c;
}

.fav-empty i {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 2rem;
    color: #d3d8e0;
}

.fav-dropdown__foot {
    padding: 0.75rem 1rem;
    background: #f7f8fa;
}

@media (max-width: 991.98px) {
    #fav-tool .fav-dropdown {
        position: fixed !important;
        top: var(--fav-dropdown-top, 7.5rem) !important;
        right: 0.75rem !important;
        left: 0.75rem !important;
        width: auto;
        max-width: none;
        max-height: calc(
            100vh - var(--fav-dropdown-top, 7.5rem) - 0.75rem -
                env(safe-area-inset-bottom, 0px)
        );
        transform: none !important;
    }

    #fav-tool .fav-dropdown.show {
        display: flex;
        flex-direction: column;
    }

    .fav-dropdown__list {
        flex: 1 1 auto;
        min-height: 0;
        max-height: none;
    }
}
